Skip to main content
POST
/
connect
/
sessions
Create a Connect session
curl --request POST \
  --url https://api.flatpeak.com/connect/sessions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "location_id": "loc_641b90b758fb8e6293716e40",
  "connect_url": "myapp://nova/flatpeak/connect",
  "callback_url": "myapp://nova/flatpeak/complete",
  "device_id": "dev_63a6087272941ef077a8fd3e",
  "route_options": {
    "advanced_tariff_capture": false,
    "tariff_name_capture": false,
    "contract_term_capture": false
  }
}
'
{
  "connect_token": "cot_65df3e949a785c52283026ec",
  "expires_in": 86400,
  "live_mode": true
}

Authorizations

Authorization
string
header
required

Authenticate with bearer you obtained from authentication endpoint.

Body

application/json

Connect init session data.

location_id
string
required

Flatpeak Locaiton ID

Example:

"loc_641b90b758fb8e6293716e40"

connect_url
string
required

URL the customer is redirected to during the Handling Callback step of the Provider Login Redirect. Specify either the URL where your Connect web app is hosted or a deep link into your native app.

Example:

"myapp://nova/flatpeak/connect"

callback_url
string
required

URL where the customer is redirected after they complete or exit their Connect session.

Example:

"myapp://nova/flatpeak/complete"

device_id
string

Flatpeak Device ID

Example:

"dev_63a6087272941ef077a8fd3e"

route_options
object

Response

Connect token object

connect_token
string

The connect_token.

Example:

"cot_65df3e949a785c52283026ec"

expires_in
integer

Expiration time in seconds.

Example:

86400

live_mode
boolean

Set to true if the object exists in live mode.