Skip to content

Update draft order

PUT/admin/v1/stores/{store_id}/draft-orders/{draft_id}
  • orders:write

Replace the draft. A draft already sent keeps its link, which shows the new quote. Send If-Match.

Path parameters

  • store_idstringrequired

    The store's ID, like store_01k8qs5s…. Apps get it with the install, in the OAuth redirect and the token response.

  • draft_idstringrequired

    The draft order's ID, like draft_01k8qs5s….

Headers

  • If-Matchstring · or null

    ETag from the last read, e.g. "v3"

  • shop-api-versionYYYY-MM

    The version to answer in. Without it, your app’s pinned version, else the newest.

Body

  • customer_idstring · or null

    An existing customer; their email, phone and language fill in what is left blank.

  • emailstring · or null
  • phonestring · or null
  • localestring · or null

    The customer's language for the invoice, e.g. ar.

  • linesarray of objects
  • shipping_addressobject · or null

    An address for a checkout. Named apart from customers' saved addresses in the API documents.

  • billing_addressobject · or null

    An address for a checkout. Named apart from customers' saved addresses in the API documents.

  • shippingobject | object · or null

    How the order is delivered.

Returns

200 Saved, priced.

Errors

  • 403forbiddenMissing permission.
  • 404not_foundNo such draft.
  • 409Already an order (draft_completed) or being paid (payment_in_progress).
  • 412precondition_failedChanged since read.
  • 422validation_failedValidation failed.