Cancellation Reasons
Get valid cancellation reason codes for a specific order. Call this endpoint before cancelling to retrieve the reason IDs accepted by the cancel endpoint. Available reason codes may vary depending on the current order state.
Get Cancellation Reasons
Include a Bearer token. See Authentication.
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| orderId | path | string | required | The order ID to fetch cancellation reasons for |
Response
Returns a list of cancellation reason objects. Each object contains a
reason id and a human-readable description.
Pass the id as cancellationReasonId in the
cancel endpoint.
| Field | Type | Description |
|---|---|---|
| id | string |
Reason code to pass as cancellationReasonId in the
cancel request
|
| description | string | Human-readable label for the cancellation reason |
Response Example
[
{ "id": "001", "description": "Buyer wants to cancel" },
{ "id": "002", "description": "Buyer found better price elsewhere" },
{ "id": "003", "description": "Product is no longer required" },
{ "id": "004", "description": "Duplicate order placed by mistake" },
{ "id": "005", "description": "Buyer wants to change address" },
{ "id": "006", "description": "Order placed by mistake" },
{ "id": "009", "description": "Item not available" },
{ "id": "010", "description": "Store is too far" },
{ "id": "011", "description": "Delivery time too long" },
{ "id": "012", "description": "Buyer not available at delivery location" }
]
Standard ONDC Cancellation Reason Codes
| Reason ID | Description | Notes |
|---|---|---|
| 001 | Buyer wants to cancel | |
| 002 | Buyer found better price elsewhere | |
| 003 | Product is no longer required | |
| 004 | Duplicate order placed by mistake | |
| 005 | Buyer wants to change address | |
| 006 | Order placed by mistake | Most commonly used |
| 009 | Item not available | |
| 010 | Store is too far | |
| 011 | Delivery time too long | |
| 012 | Buyer not available at delivery location |
Not all reason codes are available for every order. The set of valid codes returned by this endpoint may be narrower depending on how far along the fulfillment process the order is. Always use the IDs returned by this endpoint rather than hardcoding values.
Related Endpoints
| Endpoint | Purpose |
|---|---|
| Cancel |
Cancel an order using a cancellationReasonId from
this endpoint
|
| Status |
Check current fulfillment state and
cancellation_terms fees before cancelling
|
| Return Reasons | Fetch valid reason codes for returning a completed order |