Cancel one or more order lines

To cancel an order line item, call the Cancel order lines API. Specify the purchase order for the order line you want to cancel.

For example, call /v3/orders/{purchaseOrderId}/cancel

In your request, specify the orderLines with the line number.

To view an acceptable schema, an example request, and a response sample, see Cancel order lines in the Reference.

Upon success, response will provide the status “Cancelled” with the appropriate Order cancellation reason.

About order cancellation reason codes

When you cancel an order, you need to provide a value for the cancellationReason field. For a list of all order cancellation values, see Cancel order lines in the API Reference.


cancellationReasonDescription
CUSTOMER_REQUESTED_SELLER_TO_CANCELUse this code if the customer requested the cancellation.
SELLER_CANCEL_PRICING_ERRORUse this code if the seller finds a price mismatch for the item order line.
SELLER_CANCEL_OUT_OF_STOCKUse this code when the item is out of stock. Walmart will mark the specific item as out of stock in the selected warehouse. To make the item available for sale again, you should replenish its inventory.
SELLER_CANCEL_FRAUD_STOP_SHIPMENTUse this code only if there is confirmation that the order was fraudulent. If you suspect fraud, you can reach out to Walmart Risk Prevention team as advised in the API Reference.
SELLER_CANCEL_ADDRESS_NOT_SERVICEABLEUse this code when the customer’s address cannot be serviced by the seller or shipping carrier.