English
English
Appearance
English
English
Appearance
PATCH {base_url}/api/integration/orders/cancel.json
| Field | ||
|---|---|---|
order_id | required | |
lineitem_ids | Lines to cancel. Empty: the whole order. |
paid, error, awaiting, processing): the whole order only. What was charged is refunded to the store balance, even for items already made.curl -X PATCH "{base_url}/api/integration/orders/cancel.json" \
-H "X-pawdo-access-token: $PAWDO_TOKEN" \
-H "Content-Type: application/json" \
-d '{"order_id": "d689c4d1-f3dc-4c3b-ba65-ceb494ac0cec", "lineitem_ids": ["aad33abd-01be-4953-bd81-ed408da7ff6d"]}'{
"message": "order cancelled",
"status": true
}| HTTP | message | When |
|---|---|---|
| 400 | validation failed, detail in error | order_id missing |
| 404 | order not found | |
| 409 | order was not created via API | Use cancel-ship |
| 422 | order has already been cancelled | |
| 422 | order is pending, please try again later | Being sent to production right now: retry in a minute |
| 422 | partial cancellation is not allowed for paid orders | |
| 422 | order cannot be cancelled in current status | Shipped |
| 500 | failed to cancel order | Also when a lineitem_ids entry is not a line of the order, or is already cancelled. Nothing changed. |
For any order of the store, with a reason and the refund in the answer, use cancel-ship.
If you have any questions about the API, please contact the Pawdo support team via Facebook.