POST
/
link
/
exchange
curl --request POST \
  --url https://production.trackstarhq.com/link/exchange \
  --header 'Content-Type: application/json' \
  --header 'x-trackstar-api-key: <x-trackstar-api-key>' \
  --data '{
  "auth_code": "auth_code",
  "customer_id": "customer_id",
  "connection_id": "<string>"
}'
{
  "access_token": "your_permanent_access_token",
  "connection_id": "unique_connection_id",
  "integration_name": "shipbob",
  "customer_id": "customer_id",
  "available_endpoints": [
    "get_inventory",
    "get_products"
  ]
}

Headers

x-trackstar-api-key
string
required

Your organization-level Trackstar API key.

Body

application/json
auth_code
string
required

The authorization code returned from the frontend after a user installs an integration.

customer_id
string | null

An identifier for your end customer.

connection_id
string

An optional existing connection ID. If provided, the connection is reinstalled instead of a new connection being created.

Response

200 - application/json
access_token
string
required

The permanent access token for the integration used to make requests to the Trackstar API.

connection_id
string
required

A unique connection ID for the integration.

integration_name
string
required

The name of the integration that was installed.

customer_id
string | null
required

An identifier for your end customer.

available_endpoints
string[]
required

A list of endpoints that the integration supports.