orderCancel - admin-graphql - MUTATION
Version: 2024-01
Description:
Cancels an order.
Access Scopes
`write_orders` access scope. Also: This action cannot be reversed.
Arguments
-
notifyCustomer:
Boolean -
Whether to send a notification to the customer about the order cancellation.
-
orderId:
ID! -
The ID of the order to be canceled.
-
reason:
OrderCancelReason! -
The reason for canceling the order.
-
refund:
Boolean! -
Whether to refund the amount paid by the customer.
-
restock:
Boolean! -
Whether to restock the inventory committed to the order. For unpaid orders fulfilled from locations that have been deactivated, inventory will not be restocked to the deactivated locations even if this argument is set to true.
-
staffNote:
String -
A staff-facing note about the order cancellation. This is not visible to the customer.
Returns
-
job:
Job
The job that asynchronously cancels the order.
-
orderCancelUserErrors:
OrderCancelUserError!
The list of errors that occurred from executing the mutation.
-
userErrors:
UserError!
The list of errors that occurred from executing the mutation.
Examples