cancelOrder
Cancels the order: moves it to the cancelled state, its primary delivery to cancelled while that is still open, and its primary payment to cancelled while nothing is paid yet (open or reminded). A delivery or payment in any other state is left as it is. Shopware's default order state machine cancels an open or in_progress order only; from any other state the mutation fails with CONFLICT and changes nothing. Cancelling cancels the order's fulfillment orders that are not shipped yet and releases their reserved stock; fulfillment orders of an order managed by an external system, e.g. one imported from Shopify, stay untouched. Does nothing for what is already cancelled, so calling it again after a failure completes the cancellation. Fires the flows configured for every state change. Returns the order.
Required scopes
The token needs the orders:write access scope.
cancelOrder(
id: ID!
): Order!
Arguments
cancelOrder.id ● ID! non-null scalar
ID of the order to cancel.
Type
Order object
A customer order.