acceptPendingOrder
Accepts a pending order, transitioning it from "pending" to "ordered" state.
This mutation is used when a pending order has been validated and is ready to be fulfilled. Orders in the "ordered" state are ready to be fulfilled and advance to "in_progress" when fulfillments are sent.
Requirements
- User must have
update_orderpermission - Valid brand context must be provided (via argument or X-Brand-Id header)
- Order must exist and be in "pending" state
- Order must be using the V2 aggregate (internal_version = "v2")
- Order must have at least one order item with nonzero quantity
- Product must exist in EC for each order item
Behavior
- Transitions order from "pending" to "ordered" state
- Creates a new OrderStatus record with "ordered" status
- Returns the updated order with ordered status
Errors
OrderNotFoundError: Order ID does not existInvalidStateError: Order is not in pending stateInvalidVersionError: Order is not using V2 aggregateValidationError: Order does not meet acceptance requirements (no items, missing products, etc.)
acceptPendingOrder(
input: AcceptPendingOrderInput!
): V2Order!
Arguments
acceptPendingOrder.input ● AcceptPendingOrderInput! non-null input common
Parameters for AcceptPendingOrder
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.