shipments
Requires permission sales:shipment:list.
The tenant-wide Shipments list (outbound deliveries and return pickups), newest first. Filter by status group (tab), direction, a search over shipment / tracking / order / return number and customer name, a created-at window, and (staff with sales:sales_order:ship) whether the courier is paid. skip/take page it (take defaults to 25, at most 100). Rep-scoped: a shipment is listed when its order or return is visible. The cost columns (customer paid, courier charge, seller paid, courier payment) are filled only for callers with sales:sales_order:ship.
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
query Shipments {
shipments {
total
items {
id
orderNumber
returnNumber
shipmentNumber
trackingNumber
carrierName
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "query Shipments {\n shipments {\n total\n items {\n id\n orderNumber\n returnNumber\n shipmentNumber\n trackingNumber\n carrierName\n }\n }\n}"
}
EOF
Response:
{
"data": {
"shipments": {
"total": 0,
"items": [
{
"id": "id",
"orderNumber": "string",
"returnNumber": "string",
"shipmentNumber": "string",
"trackingNumber": "string",
"carrierName": "string"
}
]
}
}
}
shipments(
filter: ShipmentListFilterInput
skip: Int
take: Int
): ShipmentListPage!
Arguments
shipments.filter ● ShipmentListFilterInput input
Filter criteria for shipment list records. Omit to match all.
shipments.skip ● Int scalar
Number of records to skip. Send with take to page through results.
shipments.take ● Int scalar
Number of records to return.
Type
ShipmentListPage object
One page of the shipments list.