POST/v1/orders/cancel
Cancel Order
Cancelling an order may not always be possible depending on the order status. You should check the responses below carefully and manage successful/unsuccessful responses in your system. Orders can not be cancelled once they are shipped.
Making a Request
Include the headers and order data in your request.
POST
/v1/orders/cancelcurl -X POST https://api.mpodx.com/v1/orders/cancel \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{ //... your order data }'
The Cancel Order Model
Properties
- Name
- Type
- string
- Description
- The MPODx order reference (required).
Data Structure
Example data structure
{
"order_ref": "PKG12345"
}
Cancel Order
Used when you want to cancel an order
This information shows you how to cancel an order.Review the responses carefully and handle them in your system.
The data below shows the required fields for this API call.
Required Fields
{
"order_ref": "PKG12345"
}
200 - Successful Response
{
"message":"Order cancelled successfully",
"status":"success",
"data":{
"order_ref":"PKG12345"
}
}
200 - Error Response
{
"message":"Order cannot be cancelled",
"status":"error",
"data":{
"order_ref":"PKG12345"
}
}