Track Parcels
There are two ways to know where a parcel is: ask, or be told. Being told is better — see Notifications — but polling is available and is what most integrations start with.
The current state
curl --request GET \
--url https://logistics.api.{{BASE_ENV_URL}}/v1/parcels/{{PARCEL_ID}}/status \
--header 'Authorization: Bearer {{ACCESS_TOKEN}}'Returns the state the parcel is in right now. The full list of states, and which transitions are possible, is in Parcels life cycle — and note that the sequence differs between express and cross-dock modalities.
Alongside the state, the status carries what you need to follow the delivery itself:
| Field | What it holds |
|---|---|
driver | name, phone and photo_url of the assigned driver. null until a driver is assigned. |
asset | The vehicle: reg_plate and model name. |
tracking.eta_to_accept | Seconds until a driver is expected to be assigned, while the delivery is still looking for one. |
tracking.location | The driver's current position. |
tracking.routes.pick_up / drop_off | The route to the pickup point (before pickup) and to the drop-off. |
tracking.tracking_url | Public live tracking page for the parcel. |
delivery_attempt | The outcome of the delivery, with its proofs or the failure reason. |
The same fields arrive in the parcel notification, so you do not need to poll for them.
The full history
curl --request GET \
--url https://logistics.api.{{BASE_ENV_URL}}/v1/parcels/{{PARCEL_ID}}/timeline \
--header 'Authorization: Bearer {{ACCESS_TOKEN}}'Returns every state the parcel has been through and when, which is what you want when reconstructing what happened to a delivery after the fact. It only works for parcels updated in the last 30 days; for older parcels, GET /v1/parcels/{id} still returns the current state.
The whole parcel
curl --request GET \
--url https://logistics.api.{{BASE_ENV_URL}}/v1/parcels/{{PARCEL_ID}} \
--header 'Authorization: Bearer {{ACCESS_TOKEN}}'Returns the complete parcel: state, both locations, contacts, dimensions and price. This call is enough to reconcile a parcel whose notifications you missed.
Several parcels at once
curl --request GET \
--url 'https://logistics.api.{{BASE_ENV_URL}}/v1/parcels?states=intransit' \
--header 'Authorization: Bearer {{ACCESS_TOKEN}}'Returns a paginated list of your parcels, optionally filtered by state. Use this to reconcile, not to poll for a single delivery.
Do not poll tightlyPolling a single parcel in a loop will run into the rate limiter and tells you nothing that a webhook would not have told you sooner. Subscribe to a notification and use these endpoints to reconcile.
Showing tracking to your recipient
If what you want is to let the person receiving the parcel follow it, you do not need to build that: see Parcel tracker.
When it fails
| Status | Meaning |
|---|---|
401 | Missing or invalid access token. |
403 | The parcel is not yours. |
404 | No parcel with that ID. |
Updated about 1 month ago
