POST
/
connect
/
tariff
/
token
When you want to enable a customer to view the summary of their tariff anywhere in your app, update it or even revoke tariff access, specify a location_id in the request body. When you launch Connect, it will return the summary screen enabling tariff connection management.

Authorizations

Authorization
string
headerrequired

Authenticate with bearer_token you obtained from /login endpoint.

Body

application/json

Connect init session data.

direction
string
default: IMPORT

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

type
string
default: COMMODITY

Indicates tariff type you want to work with. Set to COMMODITY or NON_COMMODITY.

callback_uri
string
required

URI where you will receive callback at session end.

connect_web_uri
string

Connect-web URL. Required for Connect-web & Hosted connect. Not required for Connect-headless.

customer_id
string

FlatPeak customer_id. Connect will add or update the location for the customer ID you specified.

customer_reference_id
string

An ID for the customer from your system. Supply when you want to create a customer with this reference.

location_id
string

FlatPeak location_id. Specify when you want to show the tariff summary to the customer. Connect will return tariff summary route objects enabling your customer to manage tariff connection for that location.

location_reference_id
string

An identifier for a location from your system. Supply when you want to create a new location in FlatPeak with this reference. You can only supply either location_id or location_reference but not both.

tariff_id
string

FlatPeak tariff_id. Specify when you want to get customer to update specific tariff element. Use this parameter after receiving tariff event type webhooks, such as when tariff has expired.

postal_address
object

Information on the postal address.

Response

200 - application/json
connect_token
string

The connect_token.

expires_in
integer

Expiration time in seconds.

live_mode
boolean

Set to true if the object exists in live mode.