Shipments
Endpoints under /api2/shipment to register the order shipment with single or batch tracking, list existing shipments, look one up individually, add tracks to an existing shipment and resend customer emails.
Overview
The shipments resource covers the entire logistics record: shipment creation (full or partial), tracking inclusion (single or multi-parcel), email resend and listing for carrier reconciliation. For shared family rules (pagination, dates, HTTP statuses, items handling), see the main Orders page.
track_number or tracks[] batch.shipment_id, order_id or order_increment_id.shipment, shipments, shippment, shippments.order_item_id or sku + qty.List shipments.
entity_id, created_at, updated_at, increment_id.Examples
GET /api2/shipment?page=1&limit=50&include_pagination=1
Authorization: Bearer {{token}}
GET /api2/shipment?order_id=123
Authorization: Bearer {{token}}
{
"page": 1,
"limit": 50,
"include_pagination": 1,
"order_increment_id": "100000123",
"created_from": "2026-01-01",
"created_to": "2026-12-31"
}
shipments. Lookup by ID or single increment_id uses shipment. Recognized aliases: /api2/shipments, /api2/shippment, /api2/shippments. The recommended canonical route is /api2/shipment.Get a single shipment.
GET /api2/shipment?id=789
Authorization: Bearer {{token}}
GET /api2/shipment?increment_id=100000078
Authorization: Bearer {{token}}
Create a shipment fully or partially. The payload may include initial tracking via track_number (single object) or tracks (list).
true, sends the shipment email after saving.carrier_code, title and track_number.Full shipment with single tracking
POST /api2/shipment/create
Authorization: Bearer {{token}}
Content-Type: application/json
{
"order_increment_id": "100000123",
"send_email": true,
"comment": "Shipment created by integration.",
"carrier_code": "custom",
"title": "Carrier",
"track_number": "BR123456789"
}
Partial shipment with tracking list
POST /api2/shipment/create
Authorization: Bearer {{token}}
Content-Type: application/json
{
"order_id": 123,
"items": [
{"order_item_id": 10, "qty": 1},
{"sku": "PRODUCT-001", "qty": 2}
],
"tracks": [
{
"carrier_code": "custom",
"title": "Carrier",
"track_number": "BR123456789"
}
]
}
Adds a tracking entry to an existing shipment. Does not create a shipment for the order. May receive shipment_id directly or resolve via order when there is a single shipment.
By shipment_id
POST /api2/shipment/track
Authorization: Bearer {{token}}
Content-Type: application/json
{
"shipment_id": 789,
"carrier_code": "custom",
"title": "Carrier",
"track_number": "BR123456789"
}
By order_increment_id
POST /api2/shipment/track
Authorization: Bearer {{token}}
Content-Type: application/json
{
"order_increment_id": "100000123",
"carrier_code": "custom",
"title": "Carrier",
"track_number": "BR123456789"
}
By order_id
POST /api2/shipment/track
Authorization: Bearer {{token}}
Content-Type: application/json
{
"order_id": 123,
"carrier_code": "custom",
"title": "Carrier",
"track_number": "BR123456789"
}
shipment_id or the shipment's increment_id to avoid ambiguity. Compatibility: POST /api2/shipment also creates tracking.Resend the shipment email. Identify it with shipment_id, id or increment_id.
POST /api2/shipment/email
Authorization: Bearer {{token}}
Content-Type: application/json
{
"shipment_id": 789,
"comment": "Resend requested by integration."
}
Supported usage patterns
Tested and certified combinations for the Shipments resource.
GET /api2/shipment?created_from=2026-05-07&include_pagination=1GET /api2/shipment?order_increment_id=100000123POST /api2/shipment/create + carrier_code + track_numberPOST /api2/shipment/create + tracks[]POST /api2/shipment/track + shipment_idPOST /api2/shipment/emailIntegration recommendations
Recommended
- Send
tracks[]whenever the order may have multiple parcels or carriers. - For orders with more than one shipment, identify
shipment_idexplicitly when adding tracking to avoid ambiguity. - Use the canonical route
/api2/shipmentin new code; aliases exist only for legacy compatibility.
Avoid
- Relying on the
/api2/shippmentor/api2/shippmentsaliases in new code. - Trusting
send_email=truealone instead of an explicit resend via/api2/shipment/emailafter SMTP failures. - Mixing
order_idandorder_increment_idin the same payload.
Orders with multiple shipments
When an order has more than one shipment, the /api2/shipment/track endpoint returns 400 Ambiguous shipment for order if it receives only order_id. Capture the shipment_id from the listing and pass it explicitly.
Common errors
| Status | Sample body | When it happens |
|---|---|---|
400 | {"error": "Invalid item"} | An items entry without order_item_id/sku or with non-positive qty. |
400 | {"error": "Cannot create shipment"} | The order no longer accepts further shipping (e.g. fully shipped or canceled). |
400 | {"error": "Ambiguous shipment for order"} | POST /api2/shipment/track resolved by an order with multiple shipments — provide shipment_id. |
401 | {"error": "Unauthorized"} | Missing Authorization or expired token. |
404 | {"error": "Order not found"} | Unknown order_id or order_increment_id. |
404 | {"error": "Shipment not found"} | Unknown shipment_id or increment_id. |
409 | {"error": "Conflict on save"} | Duplicate or deadlock on concurrent writes. |