acceptPendingOrder
Accepts a pending order, transitioning it from "pending" to "accepted" state.
This mutation is used when a pending order has been validated and is ready to be fulfilled. Orders in the "accepted" state are ready to be fulfilled and remain in this state during fulfillment.
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 "accepted" state
- Creates a new OrderStatus record with "ordered" status
- Returns the updated order with accepted 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
Parameters for AcceptPendingOrder
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.