Errors
order_not_amendable
The courier collected the goods, so you cannot change the order.
HTTP 422invalid_request_error
Why it happens
The order is picked_up, arrived_for_delivery, delivered or cancelled.
You can change an order up to and including arrived_for_pickup.
Why. A change tells the courier to do something different. After collection, the courier is on the way and the change has no effect.
How to fix it
Read status before you send a PATCH.
There is no method to change an order after collection. Speak to the fleet.
If you change the schedule, the same rules as creation apply. The change can give
pickup_buffer_violation or
no_shift_coverage.
Example response
{
"error": {
"type": "invalid_request_error",
"code": "order_not_amendable",
"message": "An order that has been picked up cannot be amended.",
"doc_url": "https://docs.univooz.com/errors/order_not_amendable",
"request_id": "req_01KZCCF8ZH4M7XQ2VB9RSTNPKD"
}
}