Shipments
Tracking is not a field on Order or OrderItem — it lives on the
Shipment type, read with getShipment(orderId). This is the same carrier +
tracking data Riverr pushes back to the customer's store, so it is what you
should read to surface fulfillment to your buyer.
note
getShipmentreturnsnulluntil the order has shipped (no shipment record exists yet) — poll for a non-null result.- An order can ship in multiple parcels.
getShipmentreturns the most recent shipment; the tracking fields (trackingCode,carrierName,carrierService) are nullable and may be null on manual shipments created before a label is bought.
Get Shipment for an Order
query {
getShipment(orderId: "order_123") {
id
orderId
trackingCode
carrierName
carrierService
createdAt {
_seconds
_nanoseconds
}
}
}
Get Shipments
Retrieve shipments filtered by shop.
query {
getShipments(shopId: "shop_123") {
id
orderId
trackingCode
carrierName
carrierService
createdAt {
_seconds
_nanoseconds
}
}
}
Filter Parameters
getShipments returns shipments scoped to the orders you own (results are
newest-first). Without a shopId it spans every shop you own.
| Parameter | Type | Status | Description |
|---|---|---|---|
shopId | ID | ✅ honored | Restrict to one of your shops |
orderIds | [ID!] | ✅ honored | Narrow to specific orders (only those you own are returned) |
limit | Int | ✅ honored | Cap the number of results (applied after the newest-first sort) |
status | String | ⛔ reserved | Accepted but not yet implemented — ignored |
carrier | String | ⛔ reserved | Accepted but not yet implemented — ignored |
note
status and carrier are reserved for a future release and are currently
ignored — filter on those client-side until this notice is removed.