Authorization
In this guide, you can find easy steps to get an API key and learn how Tracksuite’s API authentication works.
Steps to get an API key
Section titled “Steps to get an API key”- Sign in to the Tracksuite Portal.
- Go to the API & Webhooks section in Settings.
- Copy the API key.
Authenticate an API request
Section titled “Authenticate an API request”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" } } ] }'What your API key can access
Section titled “What your API key can access”Your API key can only access trackings created by that account. Querying a tracking number from another account returns not found.
Authentication failures
Section titled “Authentication failures”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" } |
