Get Customer Order
About
The customerOrder query retrieves detailed information for a specific order by its IRI identifier. Customers can only access their own orders — requesting another customer's order returns a not found error, preventing enumeration attacks. Use this query to:
- Display detailed order information
- Show order summary with line items and totals
- Track order status and shipping details
- View applied coupons and discounts
- Display invoiced and refunded amounts
Authentication
This query requires customer authentication:
- Authenticated customers: Provide a valid customer authentication token in the
Authorizationheader. Obtain this token via the Customer Login API.
Authorization: Bearer <accessToken>
X-STOREFRONT-KEY: <storefrontKey>Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
id | ID! | ✅ Yes | The IRI identifier of the customer order (e.g. /api/shop/customer-orders/1). |
Possible Returns
| Field | Type | Description |
|---|---|---|
incrementId | String! | Human-readable order number. |
status | String! | Order status: pending, processing, completed, canceled, closed, fraud. |
channelName | String! | Channel the order was placed on. |
isGuest | Int | Whether the order was placed as guest. |
customerEmail | String! | Customer email address. |
customerFirstName | String! | Customer first name. |
customerLastName | String! | Customer last name. |
shippingMethod | String | Shipping method code. |
shippingTitle | String | Shipping method display name. |
couponCode | String | Applied coupon code. |
isGift | Int | Whether the order is a gift. |
totalItemCount | Int! | Number of distinct items. |
totalQtyOrdered | Int! | Total quantity ordered. |
grandTotal | Float! | Grand total. |
baseGrandTotal | Float! | Base grand total. |
grandTotalInvoiced | Float | Grand total invoiced. |
baseGrandTotalInvoiced | Float | Base grand total invoiced. |
grandTotalRefunded | Float | Grand total refunded. |
baseGrandTotalRefunded | Float | Base grand total refunded. |
subTotal | Float! | Sub total. |
baseSubTotal | Float! | Base sub total. |
taxAmount | Float | Tax amount. |
baseTaxAmount | Float | Base tax amount. |
discountAmount | Float | Discount amount. |
baseDiscountAmount | Float | Base discount amount. |
shippingAmount | Float | Shipping amount. |
baseShippingAmount | Float | Base shipping amount. |
baseCurrencyCode | String! | Base currency code. |
channelCurrencyCode | String | Channel currency code. |
orderCurrencyCode | String! | Order currency code. |
items | OrderItemConnection | Paginated list of order line items. |
items.edges.node.id | ID! | IRI identifier of the order item. |
items.edges.node.sku | String! | Product SKU. |
items.edges.node.name | String! | Product name at time of order. |
items.edges.node.additional | String (JSON) | JSON-encoded string containing additional details captured at order time — selected attributes (e.g. color, size), booking slots, event tickets, configurable options, etc. The structure varies by product type. |
items.edges.node.qtyOrdered | Int! | Quantity ordered. |
items.edges.node.qtyShipped | Int! | Quantity shipped. |
items.edges.node.qtyInvoiced | Int! | Quantity invoiced. |
items.edges.node.qtyCanceled | Int! | Quantity canceled. |
items.edges.node.qtyRefunded | Int! | Quantity refunded. |
addresses | OrderAddressConnection | Paginated list of order addresses. |
addresses.edges.node.id | ID! | IRI identifier of the address. |
addresses.edges.node._id | ID! | Internal address identifier. |
addresses.edges.node.addressType | String! | Address type: billing or shipping. |
addresses.edges.node.parentAddressId | ID | Parent address ID if applicable. |
addresses.edges.node.customerId | ID | Associated customer ID. |
addresses.edges.node.cartId | ID | Associated cart ID if applicable. |
addresses.edges.node.orderId | ID | Associated order ID. |
addresses.edges.node.name | String | Full name for the address. |
addresses.edges.node.firstName | String! | First name. |
addresses.edges.node.lastName | String! | Last name. |
addresses.edges.node.companyName | String | Company name. |
addresses.edges.node.address | String! | Street address. |
addresses.edges.node.city | String! | City name. |
addresses.edges.node.state | String | State/Province code. |
addresses.edges.node.country | String! | Country code. |
addresses.edges.node.postcode | String | Postal code. |
addresses.edges.node.useForShipping | Boolean | Whether address is used for shipping. |
addresses.edges.node.email | String | Email address. |
addresses.edges.node.phone | String | Phone number. |
addresses.edges.node.gender | String | Gender. |
addresses.edges.node.vatId | String | VAT ID for the address. |
addresses.edges.node.defaultAddress | Boolean | Whether this is the default address. |
createdAt | DateTime! | Order creation timestamp. |
updatedAt | DateTime! | Order last update timestamp. |
Order Item additional Field
The additional field on each order item is a JSON-encoded string that contains all the product-specific details captured at the moment of purchase. This is essential for displaying exactly what the customer selected on order confirmation, invoice, and order history pages. The structure of this field varies depending on the product type.
| Product Type | additional Contains |
|---|---|
| Configurable | Selected attributes (e.g. Color, Size) with option_id, option_label, and attribute_name |
| Booking - Appointment / Default | Booking date, slot range (e.g. "28 April, 2026 11:00 AM"), and time slot timestamps |
| Booking - Rental | Rental period (date_from, date_to) or hourly slot details |
| Booking - Event | Selected event ticket types and quantities |
| Booking - Table | Reservation date, slot, and booking note |
| Downloadable | Selected downloadable link IDs and titles |
| Bundle | Selected bundle option products and quantities |
Example — Configurable Product
{
"locale": "en",
"quantity": 2,
"attributes": [
{ "option_id": "2", "option_label": "Blue", "attribute_name": "Color" },
{ "option_id": "7", "option_label": "M", "attribute_name": "Size" }
],
"is_buy_now": "0",
"product_id": "22"
}Example — Booking Appointment
{
"locale": "en",
"booking": {
"date": "2026-04-28",
"slot": "1777354200-1777356900"
},
"cart_id": 5144,
"quantity": 1,
"attributes": [
{ "option_id": 0, "option_label": "28 April, 2026 11:00 AM", "attribute_name": "Booking From" },
{ "option_id": 0, "option_label": "28 April, 2026 11:45 AM", "attribute_name": "Booking Till" }
],
"is_buy_now": "0",
"product_id": "2509"
}Example — Booking Event
{
"locale": "en",
"booking": {
"qty": { "7": "1", "8": "1" },
"slot": "1775457000-1777530600",
"ticket_id": 7
},
"cart_id": 5141,
"quantity": 1,
"attributes": [
{ "option_id": 0, "option_label": "Standard Entry Ticket", "attribute_name": "Event Ticket" },
{ "option_id": 0, "option_label": "06 April, 2026", "attribute_name": "Event From" },
{ "option_id": 0, "option_label": "30 April, 2026", "attribute_name": "Event Till" }
],
"is_buy_now": "0",
"product_id": "2508"
}Always parse this field as JSON in your application. Use the
attributesarray to render selected options on order detail pages, and thebookingobject for booking-specific products.
Error Handling
Order Not Found
{
"errors": [
{
"message": "Customer order with ID \"999\" not found.",
"locations": [{ "line": 2, "column": 3 }],
"path": ["customerOrder"]
}
]
}Unauthenticated Request
{
"errors": [
{
"message": "Customer is not logged in.",
"locations": [{ "line": 2, "column": 3 }],
"path": ["customerOrder"]
}
]
}Use Cases
- Display detailed order page in customer account
- Show order summary with all financial details
- Track shipping method and status
- View applied coupons and discounts
- Display invoiced and refunded amounts for order history
Notes
- Customer isolation: A customer can never see another customer's orders. Requesting another customer's order returns a 404, preventing enumeration attacks.
- Read-only: Only
GEToperations are available. Orders cannot be modified through this API. - Channel scoping: Orders are filtered by the customer's channel for multi-tenant isolation.
Related Resources
- Get All Customer Orders — Query all customer orders
- Place Order — Place a new order
- Get Customer Profile — Query customer profile

