Skip to content

Order GraphQL

Served by OrderModule on commercetools, OrderModule on medusa and OrderModule on sfcc.

Each operation has its own page with its arguments, an example and the engines that serve it. The types link to their fields on the order types page.

Operations

OperationDescriptionServed by
orderByPublicIdQueryGet order details for anonymous/public viewing using a public ID.commercetoolsmedusasfcc
orderBySignedLinkQueryGet order details from a signed order link, such as the one in an order confirmation email, for a buyer who may not be signed in.commercetoolsmedusasfcc

Types

TypeDescription
OrderObjectComplete order information including customer details, line items, and status
OrderActionReasonTypeEnumWhy an order cannot move on by itself.
OrderActorTypeEnumWho an order is waiting on.
OrderDeliveryObjectA delivery (shipment) of an order with track & trace information.
OrderDeliveryItemObjectHow much of one line item a delivery holds
OrderDeliveryStatusTypeEnumNormalized, engine-agnostic status of a delivery
OrderDiscountCodeObjectAn OrderDiscountCode represents a discount that was applied to the order.
OrderPaymentStateTypeEnumWhether an order has been paid for, and if not, why not.
OrderRequiredActionObjectWhy an order is waiting, and who it is waiting on.
OrderResultObjectPaginated result containing orders and metadata
OrderStatusCountObjectThe number of orders in one status
OrderStatusTypeEnum

Fields on other types

This domain adds these fields to types that another domain defines.

BusinessUnit

FieldTypeDescription
orderB2BOrderOne order, by the number a buyer quotes or by its id. Give exactly one -- giving both, or neither, is an error rather than a silent preference. The id is what a payment provider hands back on its return URL, so it is the key a buyer arrives with after paying. The order number is the one they read off a confirmation.Arguments: orderNumber, id
ordersB2BOrderResultThis business unit's orders, newest first. Cancelled ones are left out unless asked for by name: a cancelled order is not something that was bought, and reopening an unpaid order for editing cancels it, so the list would otherwise fill with twins. A search term matches the order number, the purchase-order reference, or the SKU of a line item. All three are matched in full rather than as a prefix: they are codes read off a confirmation, a purchase order or a packing slip and pasted in, not phrases to type part of. Product names are deliberately not searched. Free text over what an order contains needs a separate search index, and an order history that quietly stops finding anything the day that index is rebuilt is worse than one that never claimed to.Arguments: page, pageSize, searchTerm, status, createdFrom, createdUntil, placedByMe

Customer

FieldTypeDescription
orderOrderOne order, by the number a buyer quotes or by its id. Give exactly one -- giving both, or neither, is an error rather than a silent preference. The id is what a payment provider hands back on its return URL, so it is the key a buyer arrives with after paying. The order number is the one they read off a confirmation.Arguments: orderNumber, id
ordersOrderResultThis customer's orders, newest first. Cancelled ones are left out unless asked for by name: a cancelled order is not something that was bought, and reopening an unpaid order for editing cancels it, so the list would otherwise fill with twins. A search term matches the order number, the purchase-order reference, or the SKU of a line item. All three are matched in full rather than as a prefix: they are codes read off a confirmation, a purchase order or a packing slip and pasted in, not phrases to type part of. Product names are deliberately not searched. Free text over what an order contains needs a separate search index, and an order history that quietly stops finding anything the day that index is rebuilt is worse than one that never claimed to.Arguments: page, pageSize, searchTerm, status, createdFrom, createdUntil