Skip to main content

createPendingOrder

Creates a new pending order.

Pending orders can have incomplete data and support all optional order properties. The order will be created with a "pending" status and can be modified before being committed.

Requirements

  • User must have create_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 pending 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

  • Creates order with "pending" status
  • All properties are optional and can be modified later
  • Returns the created order with pending status
createPendingOrder(
input: CreatePendingOrderInput!
): V2Order!

Arguments

createPendingOrder.input ● CreatePendingOrderInput! non-null input

Parameters for CreatePendingOrder

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.