Skip to main content
GET
/
devices
/
{device_id}
/
schedule
Retrieve a device schedule
curl --request GET \
  --url https://api.flatpeak.com/devices/{device_id}/schedule
{
  "id": "sch_65ea3fb185c1541f247c251e",
  "object": "schedule",
  "device_id": "dev_6563a6757360a6d6a628e839",
  "live_mode": true,
  "timezone": "Europe/London",
  "data": [
    {
      "start_time": "2022-02-01T20:14:00Z",
      "end_time": "2022-02-02T06:00:00Z",
      "partial": true,
      "schedule": [
        {
          "start_time": "2022-02-02T02:00:00Z",
          "end_time": "2022-02-02T04:30:00Z",
          "energy_flow_direction": "IMPORT",
          "power_kw": 4.31231,
          "vpp_event": true
        }
      ]
    }
  ],
  "time_created": "2022-01-24T14:15:22Z"
}

Path Parameters

device_id
string
required

Flatpeak Device ID

Response

200 - application/json

Example response

id
string
required

Flatpeak Schedule ID.

Example:

"sch_65ea3fb185c1541f247c251e"

object
string
required

Object type, i.e. schedule.

Example:

"schedule"

device_id
string
required

Flatpeak Device ID.

Example:

"dev_6563a6757360a6d6a628e839"

live_mode
boolean
required

Set to true if device is not simulated.

timezone
string
required

Device timezone.

Example:

"Europe/London"

data
object[]
required

Schedule sequence object.

time_created
string
required

Time when the object was created, in UTC.

Example:

"2022-01-24T14:15:22Z"