POST
/
costs
/
interval
/
{id}

Authorizations

Authorization
string
header
required

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
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.

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.

Response

200 - application/json
account_id
string
required

FlatPeak account id.

carbon_units
string

Units of carbon emissions measure.

currency_code
string

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

data
object[]
direction
string

Indicates energy direction. Supported values are IMPORT and EXPORT.

energy_units
string

Units of energy measure.

id
string

FlatPeak unique object ID that represents this response.

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.

location_timezone
string

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

object
string

FlatPeak object type. I.e. energy_cost.

object_id
string

FlatPeak object location_id or device_id cost data is for.