Skip to main content

createDraftFulfillment

Creates a new draft fulfillment in the V2 fulfillments state machine.

Draft fulfillments can be created for orders in the "accepted" state. The fulfillment will be created with a "draft" status and can be modified before being allocated.

Requirements

  • User must have create_fulfillment permission
  • Valid brand context must be provided (via argument or X-Brand-Id header)
  • Order must exist and be in "accepted" state (for V2 orders)
  • Warehouse must exist

Arguments

  • order_id (required): The ID of the order to create a fulfillment for
  • warehouse_id (required): The ID of the warehouse where the fulfillment will be processed
  • fulfillment_integration_id (optional): The ID of the fulfillment integration to use
  • external_id (optional): External system reference ID
  • fulfillment_order_number (optional): Custom fulfillment order number
  • fulfillment_items (optional): Array of fulfillment items
  • fulfillment_containers (optional): Array of fulfillment containers
  • metadata (optional): JSON metadata for the fulfillment

Behavior

  • Creates fulfillment with "draft" status
  • Links fulfillment to the specified order and warehouse
  • Returns the created fulfillment
createDraftFulfillment(
input: CreateDraftFulfillmentInput!
): OrderFulfillment!

Arguments

createDraftFulfillment.input ● CreateDraftFulfillmentInput! non-null input

Parameters for CreateDraftFulfillment

Type

OrderFulfillment object

This type represents an order fulfillment. An order can have multiple fulfillments, each one associated with a warehouse and a party that fulfilled the order.