saveDraftOrder
Saves a draft order.
Draft orders can have incomplete data and support all optional order properties. The order will be created with a "draft" status and can be modified before being committed.
Requirements
- User must have
update_orderpermission - Valid brand context must be provided (via argument or X-Brand-Id header)
- Order number must be unique within the brand context (if provided)
Arguments
All arguments are optional except for the brand context. This allows for flexible draft order creation where data can be added incrementally.
- **Order Identification**:
order_number(optional, must be unique if provided) - **Brand Context**:
brand_id(optional, can be provided via X-Brand-Id header instead) - **Sales Channel**:
sales_channel_id(optional, system may use default) - **Order Items**:
order_itemsarray (optional)
**Shipping Address Fields** (all optional):
shipping_address- Full address input objectship_to_name- Name of the recipientship_to_email- Email of the recipientship_to_phone- Phone number of the recipientship_to_company- Company name for the recipient
**Billing Address Fields** (all optional):
ship_to_same_as_bill_to- Boolean flag (default: true) indicating if billing address matches shippingbilling_address- Full address input objectbill_to_name- Name for billingbill_to_email- Email for billingbill_to_phone- Phone number for billingbill_to_company- Company name for billing
Behavior
- Saves order with "draft" status
- All properties are optional and can be modified later
- Returns the saved order with draft status
saveDraftOrder(
input: SaveDraftOrderInput!
): V2Order!
Arguments
saveDraftOrder.input ● SaveDraftOrderInput! non-null input
Parameters for SaveDraftOrder
Type
V2Order object
The V2 order type. This type represents a V2 order in the system with only the fields necessary for draft creation and details.