This section describes the APIs for calculating the delivery price, creating an order and retrieving the status history of a shipment.
All requests are sent to {BASE_URL}/api/v2/orders/....
The base URL and token are provided by Starex.
Authorization: Bearer {TOKEN}
Content-Type: application/json
Accept: application/json
Accept-Language: en
-401 is returned.
Methods:
| Method | Endpoint | Purpose |
|---|---|---|
| POST | /api/v2/orders/calculate |
Calculate the delivery price |
| POST | /api/v2/orders/create |
Create an order (shipment) |
| GET | /api/v2/orders/trace |
Status history of a shipment |
4500000
means 45,000 UZS.
The service field defines where the shipment is delivered and
which other fields become required.
service | Type | Required fields |
|---|---|---|
1 |
To the door (courier delivers to the address) | receiver_district_id + receiver_address |
2 |
To a pickup point (picked up at a branch) | receiver_branch_id |
District and branch IDs come from the Dictionaries section.
service = 1 the field receiver_branch_id is
ignored, and with service = 2 the field
receiver_district_id is ignored.
Lets you check the delivery price before creating an order.
POST
{BASE_URL}/api/v2/orders/calculate
| Parameter | Type | Required | Description |
|---|---|---|---|
sender_district_id | integer | Yes | Sender district ID |
sender_address | string | No | Sender address |
service | integer | Yes | 1 — to the door, 2 — to a pickup point |
receiver_district_id | integer | Yes for service=1 | Receiver district ID |
receiver_branch_id | integer | Yes for service=2 | Branch (pickup point) ID |
receiver_address | string | No | Receiver address |
weight | number | Yes | Weight in kg (for example 1.5) |
POST {BASE_URL}/api/v2/orders/calculate
Authorization: Bearer {TOKEN}
Content-Type: application/json
{
"sender_district_id": 12,
"sender_address": "Amir Temur street, 1",
"receiver_district_id": 45,
"receiver_address": "Mustaqillik street, 20",
"weight": 1.5,
"service": 1
}
{
"success": true,
"data": {
"price": 4500000,
"from_town": { "code": 3922, "name": "TASHKENT" },
"to_town": { "code": 3969, "name": "SAMARKAND" },
"mass": 1.5,
"service": { "code": 1, "name": "Courier delivery" }
}
}
| Field | Type | Description |
|---|---|---|
price | integer | Delivery price, in tiyin |
from_town.code | integer|null | Sender city code (Starex internal code) |
from_town.name | string|null | Sender city name |
to_town.code | integer|null | Receiver city code |
to_town.name | string|null | Receiver city name |
mass | number|null | Weight used for the calculation (kg) |
service.code | integer|null | Delivery type code |
service.name | string|null | Delivery type name |
service = 2 (pickup point) to_town may come back
empty — in that case the destination is defined by the branch.
Creates a new shipment and returns its barcode.
POST
{BASE_URL}/api/v2/orders/create
| Parameter | Type | Required | Description |
|---|---|---|---|
sender_district_id | integer | Yes | Sender district ID |
sender_person | string | No | Sender name |
sender_phone | string | No | Sender phone |
sender_address | string | No | Sender address |
service | integer | Yes* | 1 — to the door, 2 — to a pickup point |
receiver_district_id | integer | Yes for service=1 | Receiver district ID |
receiver_branch_id | integer | Yes for service=2 | Branch (pickup point) ID |
receiver_person | string | Yes** | Receiver name (individual) |
receiver_company | string | Yes** | Receiver company name |
receiver_phone | string | Yes | Receiver phone |
receiver_address | string | No | Receiver address (needed for door delivery) |
weight | number | No | Weight, kg |
* Technically the field may be omitted, but then the shipment goes
out without a destination — always send 1 or 2.
** At least one of receiver_person or
receiver_company must be provided.
receiver_person and
receiver_company at the same time — if both are
present, the receiver name will not reach the shipment. Send only
receiver_person for individuals and only
receiver_company for companies.
POST {BASE_URL}/api/v2/orders/create
Authorization: Bearer {TOKEN}
Content-Type: application/json
{
"sender_district_id": 12,
"sender_person": "Ali Valiyev",
"sender_phone": "998901234567",
"sender_address": "Amir Temur street, 1",
"receiver_district_id": 45,
"receiver_person": "Vali Aliyev",
"receiver_phone": "998907654321",
"receiver_address": "Mustaqillik street, 20",
"weight": 1.5,
"service": 1
}
{
"sender_district_id": 12,
"sender_person": "Ali Valiyev",
"sender_phone": "998901234567",
"receiver_branch_id": 7,
"receiver_person": "Vali Aliyev",
"receiver_phone": "998907654321",
"weight": 1.5,
"service": 2
}
{
"success": true,
"data": {
"order_code": "AB123456789UZ",
"price": 4500000,
"api_response": {
"orderNo": "123456",
"barcode": "AB123456789UZ",
"error": 0,
"errorMessage": null,
"errorMessageRu": null,
"orderPrice": 45000
}
}
}
| Field | Type | Description |
|---|---|---|
order_code | string|null | Barcode — used in all further requests and in the webhook |
price | integer|null | Shipment price, in tiyin |
api_response.orderNo | string|null | Internal shipment number |
api_response.barcode | string|null | Barcode |
api_response.error | integer|null | 0 — success, any other value — error |
api_response.errorMessage | string|null | Error message |
api_response.errorMessageRu | string|null | Error message in Russian |
api_response.orderPrice | number|null | Price (in UZS, not tiyin) |
"success": true. Always check
data.api_response.error: 0 means the shipment was
created, anything else means it was not.
Example of a failed creation:
{
"success": true,
"data": {
"order_code": null,
"price": null,
"api_response": {
"orderNo": null,
"barcode": null,
"error": 1,
"errorMessage": "Wrong town code",
"errorMessageRu": "Неверный код города",
"orderPrice": null
}
}
}
Returns the status history of a single shipment by its barcode.
GET
{BASE_URL}/api/v2/orders/trace
| Parameter | Type | Required | Description |
|---|---|---|---|
barcode | string | Yes | Shipment barcode |
GET {BASE_URL}/api/v2/orders/trace?barcode=AB123456789UZ
Authorization: Bearer {TOKEN}
Accept: application/json
{
"success": true,
"data": {
"barcode": "AB123456789UZ",
"date": "2026-06-10 09:00:00",
"weight": 1.5,
"recipient": "Vali Aliyev",
"trace": [
{ "code": 1, "name": "Новый", "advanced": "NEW", "statetime": "2026-06-10 09:00:00", "branch": "Tashkent central warehouse", "description": "Order accepted" },
{ "code": 9, "name": "Доставлен", "advanced": "COMPLETE", "statetime": "2026-06-15 14:30:00", "branch": "Samarkand branch", "description": "Delivered to the recipient" }
]
}
}
| Field | Type | Description |
|---|---|---|
barcode | string | Shipment barcode |
date | string|null | Acceptance date and time |
weight | number|null | Weight (kg) |
recipient | string|null | Recipient |
trace[] | array | Status history (ascending by time) |
trace[].code | integer | Status code (section 6) |
trace[].name | string|null | Status name (in Russian) |
trace[].advanced | string|null | Language-neutral mnemonic code (for example NEW) |
trace[].statetime | string|null | Status timestamp |
trace[].branch | string|null | Name of the branch or warehouse where the status was recorded |
trace[].description | string|null | Additional comment for the status |
If the barcode is not found:
{
"success": false,
"error": {
"code": -404,
"message": "Data not found"
}
}
Every shipment status is identified by a numeric code. The same
codes are used in three places:
trace[].code in the shipment statuses response;state inside the webhook payload;code in the status dictionary.The dictionary request resolves the codes:
GET
{BASE_URL}/api/v2/dictionaries/states
{
"success": true,
"data": [
{ "code": 0, "name": "Ожидает синхронизации", "advanced": "AWAITING_SYNC" },
{ "code": 1, "name": "Новый", "advanced": "NEW" },
{ "code": 9, "name": "Доставлен", "advanced": "COMPLETE" }
]
}
| Field | Type | Description |
|---|---|---|
code | integer | Status code |
name | string|null | Status name (in Russian) |
advanced | string|null | Stable, language-neutral mnemonic code |
On failure the response contains success = false and an
error object:
{
"success": false,
"error": {
"code": -2006,
"message": "District is required"
}
}
| Code | HTTP | Reason |
|---|---|---|
422 | 422 | Field validation (for example, missing receiver_phone) |
401 | 401 | Token missing or invalid |
-423 | 423 | Account is locked |
-401 | 200 | No access to the “Orders” service |
-500 | 200 | Access settings for your account are incomplete — contact Starex |
-2001 | 200 | Sender district not found |
-2002 | 200 | Receiver district not found |
-2004 | 200 | Receiver branch not found |
-2005 | 200 | Neither receiver_person nor receiver_company was sent |
-2006 | 200 | service=1 but receiver_district_id is missing |
-2007 | 200 | service=2 but receiver_branch_id is missing |
-404 | 200 | Shipment not found (for trace) |
100 | 200 | Unexpected internal error |
Accept-Language header: uz, ru or
en.