POST
/
costs
/
interval
/
{id}

Authorizations

Authorization
string
headerrequired

Authenticate with bearer_token you obtained from /login endpoint.

Path Parameters

id
string
required

FlatPeak location_id or device_id.

Query Parameters

aggregation
string

Aggregation interval, supported values are DAY, MONTH.

direction
string
default: IMPORT

Indicates direction you want to work with. Set to IMPORT or EXPORT. Defaults to IMPORT.

include_tariff
boolean

Set to true if you want to include tariff data.

include_carbon
boolean

Set to true if you want to include carbon intensity data.

Body

application/json
start_time
string

Period start time. In RFC3339 format e.g. 2023-06-15T09:00:00Z or with time-offset, e.g. 2023-06-15T08:00:00+01:00.

end_time
string

Period end time. In RFC3339 format e.g. 2023-06-15T09:00:00Z or with time-offset, e.g. 2023-06-15T08:00:00+01:00.

Response

200 - application/json
id
string

FlatPeak unique object ID that represents this response.

object
string

FlatPeak object type. I.e. energy_cost.

object_id
string

FlatPeak object location_id or device_id cost data is for.

live_mode
boolean

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

direction
string

Indicates energy direction. Supported values are IMPORT and EXPORT.

location_timezone
string

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

currency_code
string

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

energy_units
string

Units of energy measure.

carbon_units
string

Units of carbon emissions measure.

data
object[]
account_id
string
required

FlatPeak account id.