GET
/
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

Authorization
string
header
required

Authenticate with bearer_token you obtained from /login endpoint.

Query Parameters

location_id
string

Filter by FlatPeak Location ID.

starting_after
string

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.

limit
integer

A limit on the number of objects to be returned. Can range between 1 and 100, and the default is 30.

ending_before
string

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

200
application/json
object
string
required

Represents the object’s type. i.e. list.

Example:

"list"

url
string
required

Represents url slug for the object.

Example:

"/schedules"

has_more
boolean
required

Is set to true if more objects are available.

data
object[]