Skip to main content
POST
/
costs
/
session
/
{id}
Calculate energy cost by session ID
curl --request POST \
  --url https://api.flatpeak.com/costs/session/{id} \
  --header 'Authorization: Bearer <token>'
{
  "message": "Connect is processing link to tariff source."
}

Authorizations

Authorization
string
header
required

Authenticate with bearer you obtained from authentication endpoint.

Path Parameters

id
string
required

Flatpeak session_reference_id from meter record as submitted by you via /meters endpoints.

Query Parameters

tariff_direction
string

Specifies the tariff direction; set to IMPORT, EXPORT, or LOCAL. Defaults to IMPORT.

Example:

"IMPORT"

Response

account_id
string
required

Flatpeak account id.

Example:

"acc_661677911f2197045e6cf1b1"

id
string

Flatpeak unique object ID that represents this response.

Example:

"ecs_65ea3fb185c1541f247c251e"

object
string

Flatpeak object type. I.e. energy_cost.

Example:

"energy_cost"

object_id
string

Flatpeak object location_id or device_id cost data is for.

Example:

"dev_65e6d8334c8d715963d99db3"

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.

tariff_direction
string

Specified tariff direction. Possible values are IMPORT, EXPORT or LOCAL.

Example:

"IMPORT"

location_timezone
string

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

Example:

"Europe/London"

currency_code
string

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

Example:

"EUR"

energy_units
string

Units of energy measure.

Example:

"WH"

data
object[]