Skip to content

Get Customer Order Shipment

About

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

  • Display shipment details on a tracking page
  • Show tracking number and carrier information
  • View shipped items and quantities
  • Track individual shipment status
  • Display shipment creation and tracking details
  • Build shipment tracking interfaces

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
idInt!✅ YesThe numeric ID of the shipment to retrieve.

Possible Returns

FieldTypeDescription
idID!IRI identifier of the shipment.
_idID!Numeric shipment ID.
statusString!Shipment status: pending, shipped, delivered, cancelled.
trackNumberStringCarrier tracking number for shipment tracking.
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.

Error Handling

Shipment Not Found

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

Unauthenticated Request

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

Invalid Shipment ID

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

Use Cases

  • Display single shipment tracking details on a dedicated page
  • Show tracking number for carrier tracking websites
  • View shipped items and quantities for a specific shipment
  • Track individual shipment status and delivery progress
  • Build detailed shipment information pages
  • Integrate with carrier tracking APIs using tracking numbers

Notes

  • Customer isolation: A customer can only view shipments from their own orders. Requesting another customer's shipment returns a 404, preventing enumeration attacks.
  • Read-only: Only GET operations are available. Shipments cannot be modified through this API.
  • Tracking information: The trackNumber field can be used to track the shipment on the carrier's website.
  • Item-level details: Each shipment item includes SKU and quantity for order fulfillment verification.
  • Status tracking: Monitor shipment status changes from pending to shipped to delivered.

Released under the MIT License.