Cancel booking

#affiliate

https://api.worldota.net/api/b2b/v3/hotel/order/cancel/
ℹ️
This call is required for the bookings made for the test hotel.

The call allows to cancel only successfully confirmed orders.

⚠️
When canceling a non-refundable booking, penalties will be real.

Request example

curl --user '<KEY_ID>:<API_KEY>' 'https://api.worldota.net/api/b2b/v3/hotel/order/cancel/' \
--header 'Content-Type: application/json' \
--data '{
  "partner_order_id": "0b370500-5321-4046-92c5-5982f1a64fc6"
}'

Request body

Response

Response example

{
  "data": {
    "amount_payable": {
      "amount": "42.73",
      "currency_code": "EUR"
    },
    "amount_refunded": {
      "amount": "50.00",
      "currency_code": "EUR"
    },
    "amount_sell": {
      "amount": "92.73",
      "currency_code": "EUR"
    }
  },
  "error": null,
  "status": "ok"
}

Errors

The error field has the value specified in the headers below.

order_not_found

  • The order is finished with other than the completed or rejected status.
  • The order with the partner_order_id field value isn’t found.

order_not_cancellable

  • The stay period has already started.
  • You don’t have permission to cancel non-refundable bookings. Contact your account manager.

sandbox_restriction

An attempt to cancel the real hotel in the test environment.

lock

This error occurs if requests for an endpoint meet both conditions:

Several requests use the same partner_order_id field value. One request is sent twice within a short amount of time.

unknown

The error occurs if something else has gone wrong.