updateDraftOrder
View as MarkdownUpdate an existing draft order
mutation
Requires one of commerce.order:create, commerce.order:update, commerce.order:cancel, or commerce.order:complete (use the scope that matches the operation).
Update an existing draft order
Required headers
| Header | Required | Description |
|---|---|---|
x-store-id | Yes | ID of the store the operation targets. Omitting it returns HTTP 200 with a GraphQL error: extensions.code: "UNAUTHENTICATED". |
Go to Authentication for credential setup.
Arguments
inputUpdateDraftOrderInput!requiredcontextOrderContextInputUpdate!requiredidID!requiredbillingOrderBillingInfoInputoptionalcartIdStringoptionalcustomerIdStringoptionaldiscounts[UpdateDiscountInput!]optionalexternalIdStringoptionalfees[UpdateFeeInput!]optionalfulfillmentModes[String!]optional — Automatically set based on lineItem fulfillment modes. This field is read-only.lineItemsUpdateDraftOrderLineItemsInputoptionalmetafields[OrderMetafieldInput!]optionalnotes[UpdateNoteInput!]optionalnumberStringoptionalshippingOrderShippingInfoInputoptionalshippingLines[UpdateShippingLineInput!]optionalstaffUserIds[String!]optionaltags[String!]optionaltaxes[UpdateOrderTaxInput!]optionaltotalsOrderTotalsInputoptional — Deprecated: Totals are now auto-calculated and should not be manually set
Possible returns
OrderOrder
Last updated on
How is this guide?