Skip to main content

allocateFulfillment

Allocates a fulfillment in the V2 fulfillments state machine.

Allocates a fulfillment for orders in the "accepted" state with inventory allocation. The fulfillment will transition from "draft" to "allocated" state when inventory has been allocated. The fulfillment must already exist in "draft" state before it can be allocated.

Requirements

  • User must have allocate_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
  • Inventory allocation must exist and be completed for the order
  • Allocation information must be provided

Arguments

  • order_id (required): The ID of the order to allocate a fulfillment for
  • warehouse_id (required): The ID of the warehouse where the fulfillment will be processed
  • allocation_information (required): Information about the inventory allocation
  • 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 with allocation_item_id references
  • fulfillment_containers (optional): Array of fulfillment containers
  • metadata (optional): JSON metadata for the fulfillment

Behavior

  • Allocates fulfillment with "allocated" status
  • Links fulfillment to the specified order and warehouse
  • Links fulfillment items to inventory allocation items
  • Returns the allocated fulfillment
allocateFulfillment(
input: AllocateFulfillmentInput!
): OrderFulfillment!

Arguments

allocateFulfillment.input ● AllocateFulfillmentInput! non-null input

Parameters for AllocateFulfillment

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.