Use this method to send a confirmation e-mail for a successful booking.

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

After a successful booking, our system has the ability to send a confirmation e-mail to the customer as well as to the hotelier. This is the same e-mail message received after a successful booking on the booking engine. Use this method to send these e-mail messages in cases you don't provide such a mechanism.

If you never do any post-processing and never plan to use /purge, then you can safely pass the &confirmation_email parameter during /book instead of using this method.

URL Endpoint

/reservation/confirmation_email

Note

This method is only accessible using a POST request.

To get a response in JSON, make sure you are also sending the Accept: application/json header.

Method Parameters

NAME TYPE RANGE / SET REQUIRED DEFAULT EXAMPLE NOTES
res_id integer 10000000+ YES – &res_id=10000000 see ownership note
email string email, varchar(128) YES – &email=jsmith%40aol.com The e-mail address stored on the booking, used for verification. A different address returns "Booking not found."

Ownership

In order to send a confirmation e-mail for 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.

Note

The email parameter is not the recipient. The e-mail is sent to the recipients on file for the booking. For cancelled bookings, the cancellation confirmation e-mail is sent.

If the same e-mail was already requested for the booking in the previous 10 seconds, the request is ignored and the response contains "already_sent": true. E-mails are sent asynchronously, so a successful response or already_sent does not confirm delivery.

JSON Response Schema

{
	"method": "https://rest.reserve-online.net/reservation/confirmation_email",
	"http_method": "POST",
	"http_code": 200,
	"error_code": "OK",
	"error_msg": "",
	"params": [],
	"data": {
		"result":STRING, // Confirmation email result. Enumerated value: OK in case of success. 
		"already_sent":BOOLEAN // (Optional) Present with value true when the same e-mail was already requested in the previous 10 seconds
	}
}
	

JSON Response Example