Skip to main content

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_order permission
  • 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_items array (optional)

**Shipping Address Fields** (all optional):

  • shipping_address - Full address input object
  • ship_to_name - Name of the recipient
  • ship_to_email - Email of the recipient
  • ship_to_phone - Phone number of the recipient
  • ship_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 shipping
  • billing_address - Full address input object
  • bill_to_name - Name for billing
  • bill_to_email - Email for billing
  • bill_to_phone - Phone number for billing
  • bill_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.