Skip to content

Authorization

In this guide, you can find easy steps to get an API key and learn how Tracksuite’s API authentication works.

  1. Sign in to the Tracksuite Portal.
  2. Go to the API & Webhooks section in Settings.
  3. Copy the API key.

Each Tracksuite API key is a unique string that identifies a user.

Put the key in the Authorization header. The request below shows where it goes:

curl --location --request POST 'https://api.tracksuite.net/api/v1/routers/create' \
--header 'Authorization: your_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
"data": [
{
"referId": "order-10001",
"rawTrackingNumber": "9400111899223857461234",
"metadata": {
"carrierCode": "usps"
}
}
]
}'

Your API key can only access trackings created by that account. Querying a tracking number from another account returns not found.

When a request is not authenticated, Tracksuite returns one of these errors:

Status Description
401 Missing or invalid API key. { "message": "Unauthorized" }
401 API key expired. { "message": "Token expired" }
403 Account disabled. { "message": "User disabled" }