univoozAPI
Errors

order_not_cancellable

The time to cancel has passed, or the order is complete.

HTTP 422invalid_request_error

The time limit to cancel depends on who cancels.

Who cancelsLast status that permits it
You, the businessarrived_for_pickup
The fleetarrived_for_delivery

If your organization delivers its own orders, you are the fleet for those orders. Your limit is then arrived_for_delivery. For this type of organization, this error usually occurs at delivered.

Why. After picked_up, the courier has the goods. The decision is then not yours only.

Why it happens

  • The order passed your time limit.
  • The order is cancelled already. Univooz rejects a second cancellation.
  • The order is delivered. Nobody can cancel a delivered order. That is a return, and this API has no returns.

How to fix it

Read status before you cancel, and use the table above.

If you must stop the delivery after the limit, speak to the fleet.

Cancellation does not remove the charge. Univooz records the charge at creation.

Example response

{
  "error": {
    "type": "invalid_request_error",
    "code": "order_not_cancellable",
    "message": "An order that has been picked up cannot be cancelled by the business.",
    "doc_url": "https://docs.univooz.com/errors/order_not_cancellable",
    "request_id": "req_01KZCCF8ZH4M7XQ2VB9RSTNPKD"
  }
}

On this page