English
English
Appearance
English
English
Appearance
API : /api/integration/orders/cancel.json
Method: PATCH
Request Header
| key | value |
|---|---|
| X-pawdo-access-token | API KEY |
Request Body (JSON - raw)
| key | type | required | note |
|---|---|---|---|
| order_id | uuid | Required | ID of the order to cancel |
| lineitem_ids | uuid[] | Optional | List of line item IDs to cancel |
Note
lineitem_ids is provided: the system will only cancel the specified line items.[] is passed: the system will cancel the entire order.lineitem_ids must be valid UUIDs; empty strings "" are not allowed.Cancellation rules by order status
fulfillment_cost_paid has no value): can be cancelled entirely or by individual line item as desired.lineitem_ids does not include all the remaining line items of the order, the API returns the error partial cancellation is not allowed for paid orders.pending status: cannot be cancelled right away, the API returns the error order is pending, please try again later.cancel, cancel-produce, cancel-ship, cancel-shipout): the API returns the error order has already been cancelled.error, paid, awaiting, processing): the API returns the error order cannot be cancelled in current status.Example (Request)
{
"order_id": "425ec1f5-****-48b0-9acc-4093811a8ced",
"lineitem_ids": [
"c10d3fff-****-488b-90ac-3714a74da0e7"
]
}Example (Successful Response)
{
"message": "order cancelled",
"status": true
}Example (Error Response)
| status code | message | note |
|---|---|---|
| 400 | invalid request body | body is not in the correct format |
| 400 | validation failed | missing order_id, or lineitem_ids contains an invalid uuid |
| 404 | order not found | no order found for the given order_id |
| 422 | order is pending, please try again later | order is awaiting a fulfill request |
| 422 | order has already been cancelled | order is already in a cancelled status |
| 422 | order cannot be cancelled in current status | order has been paid but is in a status that does not allow cancellation |
| 422 | partial cancellation is not allowed for paid orders | order has been paid, only full cancellation is allowed |
Example error response (422):
{
"message": "order is pending, please try again later",
"status": false
}If you encounter any issues related to the cancel order API, please contact the Pawdo support team via Facebook for assistance.