Skip to content

Orders

Once a customer completes checkout, the resulting order is available through customer.orders. The order carries the items, statuses, delivery and tracking information, payment method breakdown, discounts, and the flags that drive any “cancel order” UI in the account section.

All order mutations require authentication.

See also Returns for the self-service returns flow that operates on the same orders.

Listing the customer’s orders

Orders are paginated and can be filtered by status (OUTSTANDING, DISPATCHED, COMPLETED) or by a specific order number. Use the status filter to drive the account-section tabs.

query CustomerOrders {
customer {
orders(
filter: { status: OUTSTANDING }
offset: 0
limit: 10
) {
total
hasMore
orders {
orderNumber
createdAt
status
totalQuantity
totalCost {
amount
currency
displayValue
}
deliveryCost {
amount
currency
displayValue
}
cancellable
invoiceCount
discounts {
amount {
amount
currency
displayValue
}
message {
value
}
}
}
}
}
}

Viewing a single order

Filter by orderNumber to fetch a single order, then expand product- and payment-level fields. Each product carries its own status, dispatched/cancelled/refunded counts, tracking URLs, and cancellable / reorderable flags. Products that belong to the same specialOfferGroup must be cancelled as a group.

query OrderDetail {
customer {
orders(filter: { orderNumber: "ORD-12345" }, limit: 1) {
orders {
orderNumber
status
createdAt
dispatchedAt
totalCost {
amount
currency
displayValue
}
deliveryAddress {
line1
town
postcode
country
}
usedPaymentMethods {
paymentType
amountSpent {
amount
currency
displayValue
}
paymentCard {
cardType
obfuscatedCardNumber
}
giftCard {
cardUuid
cardNumber
}
}
cancellable
eligibleForSelfServiceDenialOfReceipt
denialOfReceiptForm
products {
sku
productVariant {
title
images {
thumbnail
}
}
quantity
costPerUnit {
amount
currency
displayValue
}
status
dispatchDate
deliveryDateRange {
from
to
}
deliveryMethod
specialOfferGroup
trackingUrls
cancellable
reorderable
cancellableQuantity
cancelledQuantity
pendingCancelQuantity
dispatchedQuantity
refundedQuantity
pendingRefundQuantity
replacementQuantity
pendingReplaceQuantity
}
}
}
}
}

Tax invoices

query TaxInvoices {
customer {
taxInvoices(orderNumber: "ORD-12345")
}
}

Cancelling an entire order

Check the order’s top-level cancellable flag before exposing this action. The reason field is required and drives the platform’s cancellation reporting.

mutation CancelOrder {
cancelOrder(
input: {
orderNumber: "ORD-12345"
reason: NO_LONGER_REQUIRED
}
)
}

The full set of reasons is AMENDMENTS_NEEDED, DISCOUNT_CODE_ISSUE, DUPLICATE_ORDER, FOUND_CHEAPER_ELSEWHERE, NO_LONGER_REQUIRED, ORDERED_WRONG_ITEM, WAITED_TOO_LONG.

Cancelling specific products

Use cancelOrderProducts for partial cancellations. Quantities must be at most each product’s cancellableQuantity. This mutation cannot be used for products inside a special-offer group — use cancelOrderSpecialOfferGroups for those.

mutation CancelOrderProducts {
cancelOrderProducts(
input: {
orderNumber: "ORD-12345"
products: [
{ sku: 10000001, quantity: 1, reason: ORDERED_WRONG_ITEM }
{ sku: 10000002, quantity: 2, reason: NO_LONGER_REQUIRED }
]
}
)
}

Cancelling a special-offer group

When products are part of a special-offer group they need to be cancelled together. Group them in the cancellation UI using OrderProduct.specialOfferGroup and submit each group with its own reason.

mutation CancelOrderSpecialOfferGroups {
cancelOrderSpecialOfferGroups(
input: {
orderNumber: "ORD-12345"
groups: [{ group: "GROUP-A", reason: NO_LONGER_REQUIRED }]
}
)
}