Skip to main content

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
  • getShipment returns null until the order has shipped (no shipment record exists yet) — poll for a non-null result.
  • An order can ship in multiple parcels. getShipment returns 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.

ParameterTypeStatusDescription
shopIdID✅ honoredRestrict to one of your shops
orderIds[ID!]✅ honoredNarrow to specific orders (only those you own are returned)
limitInt✅ honoredCap the number of results (applied after the newest-first sort)
statusString⛔ reservedAccepted but not yet implemented — ignored
carrierString⛔ reservedAccepted 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.