Skip to main content
GET
/
connect
/
tariff
/
token
Exchange a connect token
curl --request GET \
  --url https://api.flatpeak.com/connect/tariff/token \
  --header 'Authorization: Bearer <token>'
{
  "id": "cot_65e0839faca22517d5d51cd5",
  "object": "connect_token",
  "live_mode": true,
  "customer_id": "cus_65e421d1daa4a24082b4f590",
  "customer_reference_id": "CUS0123456789",
  "location_id": "loc_641b90b758fb8e6293716e40",
  "location_reference_id": "LOC0123456789",
  "is_tariff_processed": true,
  "complete_action": "SAVE",
  "time_created": "2023-05-05T18:37:27Z",
  "time_expiry": "2023-12-28T03:00:00Z"
}

Authorizations

Authorization
string
header
required

Authenticate with bearer_token you obtained from /login endpoint.

Query Parameters

connect_token
string

Flatpeak Connect completion token.

Example:

"cot_65e0839faca22517d5d51cd5"

Response

Example response

id
string
required

Flatpeak connect_token id.

Example:

"cot_65e0839faca22517d5d51cd5"

object
string
required

Flatpeak object name, i.e. connect_token.

Example:

"connect_token"

live_mode
boolean
required

Set to true when object is in live mode.

Example:

true

location_id
string
required

Flatpeak location id.

Example:

"loc_641b90b758fb8e6293716e40"

location_reference_id
string
required

An identifier for a location from your system.

Example:

"LOC0123456789"

is_tariff_processed
boolean
required

Set to true when related tariff element has been processed and rates are available.

time_created
string
required

Time when the object was created, in UTC.

Example:

"2023-05-05T18:37:27Z"

time_expiry
string
required

Time when the token will expire. Expired tokens cannot be claimed.

Example:

"2023-12-28T03:00:00Z"

customer_id
string

Flatpeak customer ID.

Example:

"cus_65e421d1daa4a24082b4f590"

customer_reference_id
string

An ID for the customer from your system.

Example:

"CUS0123456789"

complete_action
string

Final page action when the session is completed. SAVE if the tariff element was connected, or DISCONNECT if the user disconnected it. May be empty for historic sessions.

Example:

"SAVE"