GET
/
tariffs
/
elements
curl --request GET \
  --url https://api.flatpeak.com/tariffs/elements \
  --header 'Authorization: Bearer <token>'
{
  "object": "list",
  "url": "/tariffs",
  "has_more": false,
  "data": [
    {
      "id": "trf_66ba584eb6923d7c3b942ef6",
      "object": "tariff",
      "location_id": "loc_641b90b758fb8e6293716e40",
      "live_mode": true,
      "is_linked": false,
      "connection_type": "MANUAL",
      "direction": "IMPORT",
      "type": "COMMODITY",
      "status": "CONNECTED",
      "timezone": "Europe/London",
      "display_name": "Flexible Go 2023",
      "provider_id": "prv_63a6087272921ef075a8fd3e",
      "market_rates": false,
      "contract_start_date": "2023-01-24T00:00:00Z",
      "contract_end_date": "2024-01-24T00:00:00Z",
      "schedule": [
        {
          "months": [
            "All"
          ],
          "days_and_hours": [
            {
              "days": [
                "All"
              ],
              "hours": [
                {
                  "valid_from": "05:00:00",
                  "valid_to": "23:30:00",
                  "rate": [
                    {
                      "fixed": 23.431,
                      "to_kwh": 30.5,
                      "surcharge_fixed": 0.12,
                      "surcharge_percentage": 0.05
                    }
                  ]
                }
              ]
            }
          ]
        }
      ],
      "time_created": "2023-05-05T05:37:27Z",
      "account_id": "acc_661677911f2197045e6cf1b1"
    }
  ]
}

Authorizations

Authorization
string
header
required

Authenticate with bearer_token you obtained from /login endpoint.

Query Parameters

direction
any

Filter by tariff direction, supported values are IMPORT and EXPORT.

type
string

Filter by tariff type, supported values are COMMODITY and NON_COMMODITY.

Example:

"COMMODITY"

location_id
string
required

Filter by FlatPeak Location ID.

Example:

"loc_641b90b758fb8e6293716e40"

starting_after
string

Specifies a cursor for pagination use; provider_id defines the place in the list. To retrieve the next page in the list include starting_after where ID is the last ID in the currently retrieved list.

ending_before
string

Specifies a cursor for pagination use; provider_id defines the place in the list. To retrieve the previous page in the list include ending_before where is the first ID in the currently retrieved list.

limit
integer

A limit on the number of objects to be returned. Can range between 1 and 100, and the default is 30.

Response

200
application/json
Example response
object
string
required

Represents the object’s type. i.e. list.

Example:

"list"

url
string
required

Represents url slug for the object.

Example:

"/tariffs"

has_more
boolean
default:false
required

Is set to true if more objects are available.

data
object[]