update_draft_order
Modify an open draft order's customer, email, note, tags, or line items. Line items replace existing items entirely—read current items first to preserve them. Cannot update completed drafts.
Instructions
Modify an existing OPEN draft order's customer, email, note, tags, or line items. Important: if lineItems is provided, it REPLACES the existing items entirely (not a merge or append) — read the current items first if you need to preserve any. Cannot update completed drafts; those are real orders. To pause and pick up a draft later, leave it OPEN and re-invoke update later; nothing here triggers payment.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | GID of the draft order to update. Cannot update completed drafts (those are real orders — use the order tools). | |
| lineItems | No | If provided, REPLACES the entire current line-items array — this is a replace, not a merge. To add or remove specific items you must read the current items first and resubmit the full set. | |
| customerId | No | New customer GID to attach. Pass to swap or set the customer. | |
| No | New email for the order. | ||
| note | No | New internal note. Replaces any prior note. | |
| tags | No | New tag set. Replaces existing tags entirely. |