completeOrder
Completes an order, transitioning it to the "fulfilled" state.
This mutation manually completes an order. Typically, orders are automatically completed by the system when all fulfillments have been shipped. However, this mutation allows for manual completion if needed.
Requirements
- User must have
complete_orderpermission - Valid brand context must be provided (via argument or X-Brand-Id header)
- Order must exist and be in "ordered" or "in_progress" state
- Order must be using the V2 aggregate (internal_version = "v2")
Behavior
- Transitions order to "fulfilled" state
- Creates a new OrderStatus record with "fulfilled" status
- Returns the updated order with fulfilled status
Errors
OrderNotFoundError: Order ID does not existInvalidStateError: Order is not in ordered or in_progress stateInvalidVersionError: Order is not using V2 aggregateValidationError: Order does not meet completion requirements
completeOrder(
input: CompleteOrderInput!
): V2Order!
Arguments
completeOrder.input ● CompleteOrderInput! non-null input common
Parameters for CompleteOrder
Type
V2Order object orders
The V2 order type. This type represents a V2 order in the system with only the fields necessary for draft creation and details.