Use this method to cancel and purge (rollback) a booking.

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

If for whatever reason you want to undo a successful booking action, you can use this method.

For example, if you handle the payment transaction in an automated fashion and the payment transaction fails, you can use this method to revert the actual booking. Or you may have to book additional services from a 3rd-party that may fail and want the ability to rollback WebHotelier's booking.

URL Endpoint

/purge/{res_id}

Ownership

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

  • For Hotelier API accounts, bookings of that property.
  • For Source API accounts, only bookings made by that source.
  • For Agent API accounts, only bookings made by that agent.
  • For Corporate API accounts, only bookings made by that company.
  • For Operator API accounts, bookings of the operator's properties.

Bookings received from channels through the Channel Manager cannot be purged through the API, for any account type. They must be cancelled at the channel.

Grace Period Warning

This method is only available for 60 minutes after a successful booking.

Warning

Do not use this endpoint if booking confirmation e-mails are sent by webhotelier, regardless of whether they are enabled through the confirmation_email parameter or API account configuration.

JSON Response Schema

{
	"method": "https://rest.reserve-online.net/purge/12345678",
	"http_method": "GET",
	"http_code": 200,
	"error_code": "OK",
	"error_msg": "",
	"params": [],
	"data": {
		"result":STRING, // Purge result. Enumerated value: OK in case of successful purge.
	}
}
	

JSON Response Example