Skip to content

Get Customer Order Shipments

About

The customerOrderShipments query retrieves all shipments for a specific customer order identified by its order ID. Customers can only access shipments from their own orders — requesting another customer's shipments returns a not found error, preventing enumeration attacks. Use this query to:

  • Display shipment tracking information
  • Show shipped items and quantities
  • Track shipping status and carrier details
  • View tracking numbers and shipping numbers
  • Display shipment creation timestamps
  • Show item-level shipment details

Authentication

This query requires customer authentication:

  • Authenticated customers: Provide a valid customer authentication token in the Authorization header. Obtain this token via the Customer Login API.
Authorization: Bearer <accessToken>
X-STOREFRONT-KEY: <storefrontKey>

Arguments

ArgumentTypeRequiredDescription
orderIdInt!✅ YesThe numeric order ID for which to retrieve shipments.

Possible Returns

FieldTypeDescription
idID!IRI identifier of the shipment.
_idID!Numeric shipment ID.
statusString!Shipment status: pending, shipped, delivered, cancelled.
trackNumberStringCarrier tracking number.
carrierTitleStringCarrier name (e.g. FedEx, UPS, Standard Post).
totalQtyInt!Total quantity of items in the shipment.
createdAtDateTime!Shipment creation timestamp.
itemsShipmentItemConnectionPaginated list of shipment line items.
items.edges.node.idID!IRI identifier of the shipment item.
items.edges.node.nameString!Product name in the shipment.
items.edges.node.skuString!Product SKU.
items.edges.node.qtyInt!Quantity shipped.
shippingNumberStringUnique shipping number for the shipment.
totalCountInt!Total number of shipments for the order.

Error Handling

Order Not Found

json
{
  "errors": [
    {
      "message": "Customer order with ID \"999\" not found.",
      "locations": [{ "line": 2, "column": 3 }],
      "path": ["customerOrderShipments"]
    }
  ]
}

Unauthenticated Request

json
{
  "errors": [
    {
      "message": "Customer is not logged in.",
      "locations": [{ "line": 2, "column": 3 }],
      "path": ["customerOrderShipments"]
    }
  ]
}

Invalid Order ID

json
{
  "errors": [
    {
      "message": "Invalid order ID provided.",
      "locations": [{ "line": 2, "column": 3 }],
      "path": ["customerOrderShipments"]
    }
  ]
}

Use Cases

  • Display shipment tracking page in customer account
  • Show tracking numbers and carrier information
  • Display shipped items and quantities
  • Track shipment status and delivery progress
  • Build shipment history timeline
  • Show carrier-specific tracking links

Notes

  • Customer isolation: A customer can only view shipments from their own orders. Requesting shipments for another customer's order returns a 404, preventing enumeration attacks.
  • Read-only: Only GET operations are available. Shipments cannot be modified through this API.
  • Tracking information: Tracking numbers are only available for shipments with carrier information.
  • Item-level details: Each shipment item includes SKU and quantity information for order fulfillment tracking.

Released under the MIT License.