CartValidateAndProcessResponse
Response from validating a cart and, if nothing changed, processing it into an order.
Unlike cartProcess, this recalculates the whole cart first and refuses to place the order if the result differs from what the customer was last shown. Required for carts whose recalculationMode is CHANGED_ITEMS_ONLY, and usable for any cart.
type CartValidateAndProcessResponse {
cartOrderId: Int
status: CartValidateAndProcessStatus!
cart: Cart!
changes: [CartChange!]!
droppedAttributes: [CartDroppedAttribute!]!
order: Order
}
Fields
CartValidateAndProcessResponse.cartOrderId ● Int scalar
Unique identifier of the created order, or null when the status is CHANGED and no order was created.
CartValidateAndProcessResponse.status ● CartValidateAndProcessStatus! non-null enum
Whether the order was created (PROCESSED) or refused because the cart changed (CHANGED).
CartValidateAndProcessResponse.cart ● Cart! non-null object
The cart as it is after recalculating. Returned on both outcomes: on CHANGED it is what the customer should now be shown.
CartValidateAndProcessResponse.changes ● [CartChange!]! non-null object
Every difference between what the customer was last shown and the recalculated cart. Empty when the status is PROCESSED.
CartValidateAndProcessResponse.droppedAttributes ● [CartDroppedAttribute!]! non-null object
Attributes discarded instead of written onto the order, because their attribute description could not be resolved (CLOUD-3070). Empty when nothing was dropped.
CartValidateAndProcessResponse.order ● Order object
The order created from the cart. Null when the cart was not processed, i.e. when the status is CHANGED.
Returned By
cartValidateAndProcess mutation