callback URL supplied by the caller.rowId passed in the request must correspond to an existing, active row of the target order.quantity for each row must be lower than or equal to the quantity currently residual on that row (this API reduces quantities, it does not increase them).callback used by Four Way Shop to asynchronously notify the client of success/failure and to return the order ID must be handled (How Testing callback response).callback URL able to receive the asynchronous outcome of the operation.POST request to Orchestrated Cancel order, passing the transactionId, the list of items (each with rowId and the new residual quantity), and the callback URL.transactionId).success: true and echoes the transactionId, acknowledging that the request has been accepted for processing.callback URL with the final outcome, reporting the updated (residual) quantity for each affected rowId.{ success, message }.vo.callback, with body { success, transactionId, items, message }.{ success: false, message: "<message>" }.| Message | Condition |
|---|---|
Invalid request: transactionId is mandatory | transactionId (cartId) missing from the body |
Invalid request: items is mandatory | items missing or empty |
Invalid request: productId and quantity are mandatory for each item | an item without rowId or without quantity |
Invalid request: duplicate rowId in items | two or more items with the same rowId |
Document not found for passed transactionId | the order does not exist or is cancelled |
Invalid request: cart is not associated to any order | the order does not exist or is cancelled |
Invalid request: order not found for passed transactionId | the linked order does not exist or is cancelled |
Invalid request: order manually managed | manually managed order |
Invalid request: order is not Click&Collect | the order is not click&Collect managed |
Invalid request: orchestrationConfigId not found for order | the order does not exist or is cancelled |
Invalid request: order is configured to use network stock | the orchestration configuration does not exist, or is use network stock, not manageable by this API) |
Invalid request: some rows are invalid | the number of order rows retrieved does not match the number of requested items (non-existent rowIds) |
Invalid request: All rows must be of the same cart | a retrieved row belongs to an order different from the order |
Invalid row: <rowId> | the row is cancelled |
Invalid request: Only products can be cancelled | the row is not of type PRODUCT (e.g. a service) |
Invalid request: quantity to cancel is greater than available quantity for rowId: <rowId>quantityToCancel: <n> quantityAvailableToCancel: <n> | the quantity requested for cancellation exceeds the quantity still cancellable (order quantity − already cancelled − already fulfilled/invoiced) |
{ success: false, transactionId, items, message }.| Message | Internal code | Condition |
|---|---|---|
Invalid request: order not found | ORDER_NOT_FOUND | the order no longer exists or is cancelled |
Invalid request: order manually managed | ORDER_NOT_ORCHESTRATED | the order switched to manual management between the request and the processing |
Invalid request: order is not Click&Collect | ORDER_NOT_CLICK_AND_COLLECT | the order is not click&Collect managed |
Invalid request: row <rowId> not found in order <orderId> | ROW_NOT_FOUND | the requested row is no longer among the order's active rows |
Invalid request: quantity to cancel is greater than available quantity for rowId: <rowId>. quantityToCancel: <n>, quantityAvailableToCancel: <n> | — | re-check of the quantity available for cancellation (may change compared to the synchronous check, e.g. due to concurrent cancellations/fulfillments) |
Invalid request: not enough RDC rows to cancel for rowId: <rowId>. quantityToCancel: <n>, availableRDCRows: <n> | — | there are not enough RDC rows linked to the order row to cover the requested cancellation quantity |
{
"success": true,
"transactionId": "6df90aa5-7598-4135-9e26-e7a7aa6f40c5",
"items": [
{
"rowId": "c7667656-fc18-4d2b-a7c2-2129df32251f",
"quantity": 1
}
]
}success: indicates whether the cancellation was ultimately applied.transactionId: matches the transactionId of the order, allowing the caller to correlate the callback with the request that triggered it.items: the list of affected rows, each reporting the rowId and the final residual quantity actually applied by the OMS (which may differ from the quantity originally requested, see Alternate Flows).