Create a connect token
In order launch a session with Connect you need a connect_token
.
Connect tokens serve single purpose of authenticating your customer’s session with Connect and are dismissed as soon as you exchanged the token for location_id
once your customer’s session with Connect has ended.
location_id
in the request body. When you launch Connect, it will return the summary screen enabling tariff connection management.Authorizations
Authenticate with bearer_token
you obtained from /login endpoint.
Body
Connect init session data.
Indicates tariff direction you want to work with. Set to IMPORT
or EXPORT
.
Indicates tariff type you want to work with. Set to COMMODITY
or NON_COMMODITY
.
URI where you will receive callback at session end.
Connect-web URL. Required for Connect-web & Hosted connect. Not required for Connect-headless.
FlatPeak customer_id
. Connect will add or update the location for the customer ID you specified.
An ID for the customer from your system. Supply when you want to create a customer with this reference.
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.
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.
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.
Information on the postal address.
Response
The connect_token
.
Expiration time in seconds.
Set to true
if the object exists in live mode.
Was this page helpful?