Invalidate a retail order
POST/retail_orders/:id/actions/invalidate
note
This endpoint is a work in progress and may change before being stabilized.
Invalidate a previously created retail order. This action marks the order as invalid and prevents any further processing or fulfillment.
Use this endpoint when you need to invalidate an order that has not yet been completed or shortly after completion depending on the product to correct for user or technical issues.
Note: Once an order is invalidated, it cannot be reactivated or processed again. A new order needs to be created.
Request
Responses
- 200
- 400
- 404
- 500
Retail order invalidated successfully
Bad Request
Not Found
Internal Server Error
Error Codes
| HTTP Status | Class | Code | Description |
|---|---|---|---|
| 404 | not_found | entity_not_found | Entity not found |
| 400 | invalid_state | order_processing | The order is still processing and cannot be invalidated |
| 400 | invalid_state | order_invalidated | The order has already been invalidated |
| 400 | invalid_state | order_failed | The order already failed |
| 400 | invalid_state | order_invalidation_period_expired | The order invalidation period has expired |