Skip to main content
POST
/
schedules
/
soc
/
{id}
Schedule by state of charge
curl --request POST \
  --url https://api.flatpeak.com/schedules/soc/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "location_id": "loc_641b90b758fb8e6293716e40",
  "schedule_horizon": 24
}
'
{
  "id": "ssc_65ea3fb185c1541f247c251e",
  "object": "schedule_soc",
  "live_mode": true,
  "device_id": "dev_6563a6757360a6d6a628e839",
  "location_id": "loc_641b90b758fb8e6293716e40",
  "location_timezone": "Europe/London",
  "currency_code": "GBP",
  "time_created": "2022-01-24T14:15:22Z",
  "account_id": "acc_661677911f2197045e6cf1b1",
  "data": [
    {
      "start_time": "2022-02-01T20:14:00Z",
      "end_time": "2022-02-02T06:00:00Z",
      "energy": {
        "units": "WH",
        "value": 34000
      },
      "cost": {
        "value": 928.372,
        "confidence": 1
      },
      "schedule": [
        {
          "start_time": "2022-02-02T02:00:00Z",
          "end_time": "2022-02-02T04:30:00Z",
          "power": {
            "units": "W",
            "value": 11000
          },
          "vpp_event": false
        }
      ]
    }
  ],
  "request": {
    "schedule_horizon": "24"
  }
}

Authorizations

Authorization
string
header
required

Authenticate with bearer you obtained from authentication endpoint.

Path Parameters

id
string
required

Flatpeak device_id.

Body

application/json
location_id
string
required

Flatpeak location ID.

Example:

"loc_641b90b758fb8e6293716e40"

schedule_horizon
number

Number of hours into the future for which the schedule should be generated. Flatpeak may return a shorter schedule if sufficient data is unavailable. When omitted, the maximum available horizon is used.

Example:

24

Response

Example response

id
string
required

Flatpeak schedule id.

Example:

"ssc_65ea3fb185c1541f247c251e"

object
string
required

Represents the object’s type.

Example:

"schedule_soc"

live_mode
boolean
required

Has the value true if the object exists in live mode or the value false if the object exists in test mode.

Example:

true

device_id
string
required

Flatpeak device ID.

Example:

"dev_6563a6757360a6d6a628e839"

location_id
string
required

Flatpeak location ID.

Example:

"loc_641b90b758fb8e6293716e40"

location_timezone
string
required

The timezone at the location, in 'tz database format'. I.e. 'Europe/Berlin'.

Example:

"Europe/London"

currency_code
string
required

Currency code for cost of energy measure. Always returned in large currency units.

Example:

"GBP"

time_created
string<date-time>
required

Time when this object was created, in UTC.

Example:

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

account_id
string
required

Flatpeak account ID.

Example:

"acc_661677911f2197045e6cf1b1"

data
object[]

This object that contains device schedules.

request
object