Service objects
- Introduction
- API Authorization
- Connect Authorization
- Events
- Customers
- Locations
- Tariff elements
- Devices
Reporting
- Metering
- Cost calculations
- Tariff rates
Planning
List schedules
Returns list of all schedules.
curl --request GET \
--url https://api.flatpeak.com/schedules \
--header 'Authorization: Bearer <token>'
{
"object": "list",
"url": "/schedules",
"has_more": true,
"data": [
{
"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
Query Parameters
Filter by FlatPeak Location ID.
Specifies a cursor for pagination use; provider_id defines the place in the list. To retrieve the next page in the list include starting_after where ID is the last ID in the currently retrieved list.
A limit on the number of objects to be returned. Can range between 1 and 100, and the default is 30.
Specifies a cursor for pagination use; provider_id defines the place in the list. To retrieve the previous page in the list include ending_before where is the first ID in the currently retrieved list.
Response
Represents the object’s type. i.e. list
.
"list"
Represents url slug for the object.
"/schedules"
Is set to true
if more objects are available.
FlatPeak schedule id.
"sch_65ea3fb185c1541f247c251e"
Represents the object’s type.
"schedule"
Has the value true if the object exists in live mode or the value false if the object exists in test mode.
true
FlatPeak location ID where this schedule applies.
"loc_641b90b758fb8e6293716e40"
The timezone at the location, in 'tz database format'. I.e. 'Europe/Berlin'.
"Europe/London"
Currency code for cost of energy measure. Always returned in large currency units.
"GBP"
Time when this object was created, in UTC.
"2022-01-24T14:15:22Z"
FlatPeak account ID.
"acc_661677911f2197045e6cf1b1"
Tariff cap. Specifies up to what price you are willing to pay to buy (or, in reverse, sell) energy.
Relative tariff cap. Where highest tariff over the requested period is 1 and lowest is 0.01, provide value up to which you are willing to by energy. Defaults to 100.
0.83
Absolute tariff cap in local currency using large units. Defaults to unlimited if no value is provided. Overrides relative
value if provided.
0.123
This object that contains device schedules.
FlatPeak device ID.
"dev_664525107c44d88a37ca1ad7"
"IMPORT"
Time when energy transfer can begin, in timezone of the original request.
"2022-02-01T20:14:00Z"
Time when energy transfer must be completed, in timezone of the original request.
"2022-02-02T06:00:00Z"
Savings provided by the schedule by applying (1) tariff shaving and (2) tariff based optimisation. The shaving is applied first.
Core schedule object.
Time when energy transfer must start, in timezone of the original request.
"2022-02-02T02:00:00Z"
Time when energy transfer must end, in timezone of the original request.
"2022-02-02T04:30:00Z"
Was this page helpful?
curl --request GET \
--url https://api.flatpeak.com/schedules \
--header 'Authorization: Bearer <token>'
{
"object": "list",
"url": "/schedules",
"has_more": true,
"data": [
{
"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"
}
]
}