curl --request POST \
--url https://api.flatpeak.com/schedules/amount/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"location_id": "loc_641b90b758fb8e6293716e40",
"max_power": {
"units": "W",
"value": "14000"
},
"shaving_threshold": {
"relative": 0.83,
"absolute": 0.123
},
"data": [
{
"device_id": "dev_65e6d8334c8d715963d99db3",
"direction": "IMPORT",
"start_time": "2022-02-01T20:14:00Z",
"end_time": "2022-02-02T06:00:00Z",
"max_power": {
"units": "W",
"value": 7000
},
"energy": {
"units": "WH",
"value": 24500
}
}
]
}'
{
"id": "sae_65ea3fb185c1541f247c251e",
"object": "schedule_amount",
"live_mode": true,
"location_id": "loc_641b90b758fb8e6293716e40",
"location_timezone": "Europe/London",
"currency_code": "GBP",
"max_power": {
"units": "W",
"value": 14000
},
"shaving_threshold": {
"relative": 0.83,
"absolute": 0.123
},
"tariff": {
"value": 928.372,
"confidence": 1
},
"savings": {
"value": 0.0239,
"percentage": 1.34
},
"data": [
{
"device_id": "dev_664525107c44d88a37ca1ad7",
"direction": "IMPORT",
"start_time": "2022-02-01T20:14:00Z",
"end_time": "2022-02-02T06:00:00Z",
"max_power": {
"units": "W",
"value": 7000
},
"energy": {
"units": "WH",
"value": 34000
},
"tariff": {
"value": 928.372,
"confidence": 1
},
"savings": {
"value": 0.2375,
"percentage": 0.11
},
"schedule": [
{
"start_time": "2022-02-02T02:00:00Z",
"end_time": "2022-02-02T04:30:00Z",
"power": {
"units": "W",
"value": 11000
}
}
]
}
],
"time_created": "2022-01-24T14:15:22Z",
"account_id": "acc_661677911f2197045e6cf1b1"
}
Find best times to consume or export energy based on:
curl --request POST \
--url https://api.flatpeak.com/schedules/amount/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"location_id": "loc_641b90b758fb8e6293716e40",
"max_power": {
"units": "W",
"value": "14000"
},
"shaving_threshold": {
"relative": 0.83,
"absolute": 0.123
},
"data": [
{
"device_id": "dev_65e6d8334c8d715963d99db3",
"direction": "IMPORT",
"start_time": "2022-02-01T20:14:00Z",
"end_time": "2022-02-02T06:00:00Z",
"max_power": {
"units": "W",
"value": 7000
},
"energy": {
"units": "WH",
"value": 24500
}
}
]
}'
{
"id": "sae_65ea3fb185c1541f247c251e",
"object": "schedule_amount",
"live_mode": true,
"location_id": "loc_641b90b758fb8e6293716e40",
"location_timezone": "Europe/London",
"currency_code": "GBP",
"max_power": {
"units": "W",
"value": 14000
},
"shaving_threshold": {
"relative": 0.83,
"absolute": 0.123
},
"tariff": {
"value": 928.372,
"confidence": 1
},
"savings": {
"value": 0.0239,
"percentage": 1.34
},
"data": [
{
"device_id": "dev_664525107c44d88a37ca1ad7",
"direction": "IMPORT",
"start_time": "2022-02-01T20:14:00Z",
"end_time": "2022-02-02T06:00:00Z",
"max_power": {
"units": "W",
"value": 7000
},
"energy": {
"units": "WH",
"value": 34000
},
"tariff": {
"value": 928.372,
"confidence": 1
},
"savings": {
"value": 0.2375,
"percentage": 0.11
},
"schedule": [
{
"start_time": "2022-02-02T02:00:00Z",
"end_time": "2022-02-02T04:30:00Z",
"power": {
"units": "W",
"value": 11000
}
}
]
}
],
"time_created": "2022-01-24T14:15:22Z",
"account_id": "acc_661677911f2197045e6cf1b1"
}
FlatPeak location_id
.
The response is of type object
.
Was this page helpful?