Use this method to cancel a booking.

Table of Contents
  1. URL Endpoint
  2. JSON Response Schema
  3. JSON Response Example

Use this method to cancel a booking after a user-initiated action. The booking is not removed from our database. Its status changes to cancelled and allotment is restored.

URL Endpoint

/reservation/cancel/{res_id}

Ownership

In order to cancel a booking you must be the owner. Ownership is defined as follows:

  • For Hotelier API accounts all property bookings.
  • For Source API accounts only bookings made by that source.
  • For Agent API accounts only bookings made by that agent.

Warning

The API user is responsible for notifying the property and the customer of the cancellation.

If you also like our system to send a cancellation confirmation e-mail make sure you pass the confirmation_email parameter. Alternatively, you can call /reservation/confirmation_email after a successful cancellation to send the cancellation confirmation e-mail.

Cancellation Fees & Handling

API user is responsible for correctly applying cancellation fees when required or handling the cancellation based on hotel terms. Failure to do so may result in a ban.

Additional Parameters

NAME TYPE RANGE / SET REQUIRED DEFAULT EXAMPLE NOTES
confirmation_email flag NO &confirmation_email Send cancellation confirmation e-mail to the customer and hotelier.
- The default is to NOT send any automated e-mails.
- Only available via POST request as a Form param.
reason string NO &reason=Change%20of%20plans Pass cancellation reason.
- Only available via POST request as a Form param.

JSON Response Schema

{
  "method": "https://rest.reserve-online.net/reservation/cancel/12345678",
  "http_method": "GET",
  "http_code": 200,
  "error_code": "OK",
  "error_msg": "",
  "params": [],
  "data": {
    "result":STRING, // Cancellation result. Enumerated value: OK in case of successful Cancellation.
    "cancellation_penalty_amount":MONEY, // (Optional) Cancellation penalty fee. If equals to 0, there is no penalty. If field is missing, penalty could not be defined most likely due to misconfiguration.
    "cancellation_penalty_currency":STRING // (Optional) Cancellation penalty fee currency. Always same to reservation currency.
  }
}
	

JSON Response Example