- Introduction
- Authorization
- Events
- Customers
- Locations
- Tariff (elements)
- Devices
Connect
- Token management
- Session management
- Main pages
- Service pages
Cost reporting
- Meter submissions
- Cost calculations
- Raw tariff rates
Planning
Create an optimal consumption or export schedule for a given time window and energy amount.
Creates an import, export or a combined import/export schedule for a set of devices at a location you specify. Optimised by capabilities of your equipment, energy cost and carbon footprint.
POST
/
schedules
curl --request POST \
--url https://api.flatpeak.com/schedules \
--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": "sch_65ea3fb185c1541f247c251e",
"object": "schedule",
"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"
}
Authorizations
Body
application/json
Response
200
application/json
The response is of type object
.
Was this page helpful?
curl --request POST \
--url https://api.flatpeak.com/schedules \
--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": "sch_65ea3fb185c1541f247c251e",
"object": "schedule",
"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"
}