API referenceOrders
Cancel an order
POST /v1/orders/{reference}/cancel — stop a delivery.
POST
/v1/orders/{reference}/cancel{reference} is the Univooz reference or your externalOrderId.
curl -X POST https://api.univooz.com/v1/orders/ORD-260729-LD4Q/cancel \
-H "Authorization: Bearer uv_live_YOUR_KEY"Response
200 with the order object, at status: "cancelled".
Errors
| Status | Code |
|---|---|
| 401 | invalid_api_key |
| 404 | order_not_found |
| 422 | order_not_cancellable |
When you can cancel
| Who cancels | Last status that permits it |
|---|---|
| You, the business | arrived_for_pickup |
| The fleet | arrived_for_delivery |
After picked_up the courier has the goods, so only the fleet can cancel.
If your organization delivers its own orders, you are the fleet for those orders. Your
limit is then arrived_for_delivery.
After you cancel
- Univooz does not delete the order. It becomes
cancelledand you can still read it. cancelledis final. A second cancellation gives an error.- The charge stays. Univooz records it at creation.
- Univooz sends
order.cancelled.