Orders API2026-11Preview
Shipments
A parcel on its way to your customer. Its tracking goes back to the store the order came from, so your customer hears from you, not from us.
order.shipped fires when a shipment is created, with its tracking.
The Shipment object
idstring- Starts shp_.
order, fulfillment_orderstring- What it carries.
lanestring- saver or fast.
carrier, tracking_number, tracking_urlstring- Tracking, ready for your customer.
weight_ginteger- What the parcel weighed when we packed it.
shipping_chargedmoney- Shipping, handling fee and tax for the weighed parcel, in CN¥: what your balance paid.
pushed_to_channelboolean- Whether the store the order came from has the tracking. Shopify then emails it to your customer.
statusstring- in_transit, out_for_delivery, delivered, or exception (held, returned, lost).
shipped_at, delivered_atstring|null- When it left us, and when the carrier says it arrived.
{
"id": "shp_5r8w",
"order": "ord_3n7q",
"fulfillment_order": "fo_7k2m",
"lane": "saver",
"carrier": "YunExpress",
"tracking_number": "YT2630812345678",
"tracking_url": "https://t.17track.net/en#nums=YT2630812345678",
"weight_g": 176,
"shipping_charged": { "amount": "134.52", "currency": "CNY" },
"pushed_to_channel": true,
"status": "in_transit",
"shipped_at": "2026-11-03T06:00:00Z",
"delivered_at": null
}List shipments
GET/v1/shipments
Newest first. Filter by status to find the ones that need you.
Scopeorders:read
Query parameters
statusstring- Optional.
orderstring- Optional. An order id.
shipped_sincestring- Optional. A time.
limit, cursor- Pagination
curl "https://www.ninjabuy.com/api/v1/shipments?status=exception" \
-H "Authorization: Bearer $NINJABUY_API_KEY" \
-H "NinjaBuy-Version: 2026-11"HTTP/2 200 OK
{
"data": [
{
"id": "shp_5q1d",
"order": "ord_3m2b",
"tracking_number": "YT2630811190042",
"status": "exception"
}
],
"has_more": false,
"cursor": null
}Retrieve a shipment
GET/v1/shipments/{id}
One parcel, with its tracking.
Scopeorders:read
Path parameters
idstringrequired- The shipment's id.
Errors
| Status | Type | When |
|---|---|---|
| 404 | not-found | No such shipment on this account. |
curl "https://www.ninjabuy.com/api/v1/shipments/shp_5r8w" \
-H "Authorization: Bearer $NINJABUY_API_KEY" \
-H "NinjaBuy-Version: 2026-11"HTTP/2 200 OK
{
"id": "shp_5r8w",
"order": "ord_3n7q",
"fulfillment_order": "fo_7k2m",
"lane": "saver",
"carrier": "YunExpress",
"tracking_number": "YT2630812345678",
"tracking_url": "https://t.17track.net/en#nums=YT2630812345678",
"weight_g": 176,
"shipping_charged": { "amount": "134.52", "currency": "CNY" },
"pushed_to_channel": true,
"status": "in_transit",
"shipped_at": "2026-11-03T06:00:00Z",
"delivered_at": null
}Retrieve tracking events
GET/v1/shipments/{id}/tracking
The carrier's scans, oldest first, in English.
Scopeorders:read
Path parameters
idstringrequired- The shipment's id.
Errors
| Status | Type | When |
|---|---|---|
| 404 | not-found | No such shipment on this account. |
curl "https://www.ninjabuy.com/api/v1/shipments/shp_5r8w/tracking" \
-H "Authorization: Bearer $NINJABUY_API_KEY" \
-H "NinjaBuy-Version: 2026-11"HTTP/2 200 OK
{
"shipment": "shp_5r8w",
"status": "in_transit",
"events": [
{
"at": "2026-11-03T06:00:00Z",
"where": "Shenzhen, CN",
"status": "in_transit",
"description": "Left the NinjaBuy warehouse"
},
{
"at": "2026-11-05T22:10:00Z",
"where": "Shenzhen, CN",
"status": "in_transit",
"description": "Departed the origin country"
},
{
"at": "2026-11-09T19:40:00Z",
"where": "Los Angeles, US",
"status": "in_transit",
"description": "Arrived in the destination country"
}
]
}