Skip to main content
GET
Retrieve a location cost

Authorizations

Authorization
string
header
required

Bearer token obtained from POST /auth/tokens.

Path Parameters

location_id
string
required

Flatpeak Location ID.

Example:

"loc_641b90b758fb8e6293716e40"

Query Parameters

start_time
string<date-time>
required

Period start time. In RFC 3339 format for example 2023-06-15T09:00:00Z or with time offset, for example 2023-06-15T08:00:00+01:00.

Example:

"2026-11-07T05:31:56Z"

end_time
string<date-time>
required

Period end time. In RFC 3339 format for example 2023-06-15T09:00:00Z or with time offset, for example 2023-06-15T08:00:00+01:00.

Example:

"2026-12-07T05:31:56Z"

aggregate_by
enum<string>

Aggregation interval for a window: DAY or MONTH.

Available options:
DAY,
MONTH
Example:

"MONTH"

Response

200 OK: the calculated monetary cost of the imported or exported energy.

id
string
required

Flatpeak ID of this response.

Example:

"ecs_65ea3fb185c1541f247c251e"

object
enum<string>
required

Object type.

Available options:
energy_cost
Example:

"energy_cost"

device_id
string | null
required

Device the cost is for; null for location costs.

Example:

"dev_65e6d8334c8d715963d99db3"

live_mode
boolean
required

true for live data, false for test data.

timezone
string
required

Timezone at the location, tz database name such as Europe/Berlin.

Example:

"Europe/London"

currency_code
string
required

Currency of the cost values. Amounts are in large currency units.

Example:

"EUR"

data
object
required

Costs per energy flow direction.

account_id
string
required

Flatpeak Account ID.

Example:

"acc_661677911f2197045e6cf1b1"

session_reference_id
string | null

Present when the cost was requested by session_reference_id.

Example:

"SESSION1234567890"