create_draft_order
Create a new draft order with line items, customer, shipping, and discount details. Opens draft in 'open' status for review before confirming.
Instructions
Create a new draft order. Side effect: creates a DraftOrder in "open" status. Requires at least one line_item with variant_id or title+price for custom items.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"line_items": "<line_items>"
},
"name": "create_draft_order"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | Order note visible to staff. | |
| tags | No | Comma-separated tags. | |
| No | Customer email for the draft order. | ||
| line_items | Yes | Line items to include. At least one required. | |
| customer_id | No | Associate with an existing customer. | |
| billing_address | No | Billing address object. | |
| applied_discount | No | Discount applied to the whole order (value, value_type, title). | |
| shipping_address | No | Shipping address object (first_name, last_name, address1, city, ...). |