Support

updateDraftOrder

View as Markdown

Update 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

HeaderRequiredDescription
x-store-idYesID 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

  • input UpdateDraftOrderInput! required
    • context OrderContextInputUpdate! required
    • id ID! required
    • billing OrderBillingInfoInput optional
    • cartId String optional
    • customerId String optional
    • discounts [UpdateDiscountInput!] optional
    • externalId String optional
    • fees [UpdateFeeInput!] optional
    • fulfillmentModes [String!] optional — Automatically set based on lineItem fulfillment modes. This field is read-only.
    • lineItems UpdateDraftOrderLineItemsInput optional
    • metafields [OrderMetafieldInput!] optional
    • notes [UpdateNoteInput!] optional
    • number String optional
    • shipping OrderShippingInfoInput optional
    • shippingLines [UpdateShippingLineInput!] optional
    • staffUserIds [String!] optional
    • tags [String!] optional
    • taxes [UpdateOrderTaxInput!] optional
    • totals OrderTotalsInput optional — Deprecated: Totals are now auto-calculated and should not be manually set

Possible returns

  • Order Order

Last updated on

How is this guide?