GET
/
tariffs
/
rates
/
{id}
curl --request GET \
  --url https://api.flatpeak.com/tariffs/rates/{id} \
  --header 'Authorization: Bearer <token>'
{
  "id": "rts_65e42cdd73e9f861edda35d7",
  "object": "tariff_rate",
  "live_mode": true,
  "location_id": "loc_65e42ce4d3b813479b252160",
  "currency_code": "EUR",
  "direction": "IMPORT",
  "last_updated": "2022-05-24T14:15:22Z",
  "next_update": "2022-05-24T15:15:22Z",
  "request": {
    "include_tariff": true,
    "include_carbon": true,
    "direction": "IMPORT",
    "start_time": "2022-05-24T14:15:22Z",
    "end_time": "2022-05-24T16:15:22Z"
  },
  "data": [
    {
      "valid_from": "2022-12-28T01:00:00Z",
      "valid_to": "2022-12-28T02:30:00Z",
      "tariff": {
        "rate": 4.998,
        "confidence": 1
      },
      "carbon": {
        "intensity": 42,
        "relative": 0.1,
        "confidence": 0.9
      }
    }
  ],
  "time_created": "2022-05-24T15:15:22Z"
}

Authorizations

Authorization
string
headerrequired

Authenticate with bearer_token you obtained from /login endpoint.

Path Parameters

id
string
required

FlatPeak location_id.

Query Parameters

start_time
string

Timestamp at when data will start, in RFC3339 format e.g. 2023-06-15T09:00:00Z. If none specified, current time will be used.

end_time
string
required

Timestamp at when data will end, in RFC3339 format e.g. 2023-06-15T09:00:00Z. The maximum period allowed between start_time and end_time for a single request is 90 days.

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.

direction
string
default: IMPORT

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

Response

200 - application/json
id
string

FlatPeak unique object id.

object
string

Represents the object’s type. I.e. rate.

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_id
string

The unique FlatPeak ID of the P.

currency_code
string

Currency at the location in ISO 4217.

direction
string

Direciton of tariff. Supported options are IMPORT and EXPORT.

last_updated
string

Time when rates were last updated.

next_update
string

Time when rates will be updated next

request
object

Your original request.

data
object[]

Rates response data.

time_created
string

Time when this response was calculated.