API for working with shipments
All requests are sent to {BASE_URL}/api/v2/....
The base URL, token and access details are provided by Starex.
Every request must carry a Bearer token. The token is issued to you personally by Starex — do not share it.
Authorization: Bearer {TOKEN}
Accept: application/json
Token-related errors:
| Case | HTTP | error.code |
|---|---|---|
| Token not provided | 401 | 401 |
| Token is invalid | 401 | 401 |
| Account is locked | 423 | -423 |
| No access to the service | 200 | -401 |
-401 — in that
case contact Starex.
Response texts (error messages, dictionary names) are controlled by the
Accept-Language header. Supported values:
uz, ru, en.
uz and ru only. Requesting them with
en returns error -210.
Successful response:
{
"success": true,
"data": { }
}
Error:
{
"success": false,
"error": {
"code": -401,
"message": "You do not have permission to perform this action"
}
}
success field, not just the HTTP status.
A validation error (HTTP 422) additionally contains details:
{
"success": false,
"error": {
"code": 422,
"message": "The given data was invalid.",
"details": {
"receiver_phone": ["The receiver phone field is required."]
}
}
}
| Code | Meaning |
|---|---|
422 | Field validation error (see details) |
401 | Token missing or invalid |
-401 | No permission for this action |
-423 | Account is locked |
-404 | Data not found |
-210 | Selected language is not supported for this operation |
-500 | Insufficient data to continue (access settings are incomplete) |
-2001 | Sender district not found |
-2002 | Receiver district not found |
-2004 | Receiver branch not found |
-2005 | Receiver company or person name must be provided |
-2006 | District is required |
-2007 | Branch is required |
100 | Unexpected internal error |
orders/trace request.