Skip to content

Cancel an order created through the API ​

PATCH {base_url}/api/integration/orders/cancel.json

Field
order_idrequired
lineitem_idsLines to cancel. Empty: the whole order.
  • Not charged yet: cancel the whole order or some lines.
  • Charged (paid, error, awaiting, processing): the whole order only. What was charged is refunded to the store balance, even for items already made.
bash
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"]}'
json
{
  "message": "order cancelled",
  "status": true
}
HTTPmessageWhen
400validation failed, detail in errororder_id missing
404order not found
409order was not created via APIUse cancel-ship
422order has already been cancelled
422order is pending, please try again laterBeing sent to production right now: retry in a minute
422partial cancellation is not allowed for paid orders
422order cannot be cancelled in current statusShipped
500failed to cancel orderAlso 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.