Use this method to create a new reservation in WebHotelier

Table of Contents
  1. URL Endpoint
  2. Method Parameters
  3. Response

URL Endpoint

/book/{propertycode}

Warning

This method is only available via a secure connection.

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.

Warning

The API user is responsible for notifying the property and the customer of a successful reservation.

If you also like our system to send confirmation e-mails make sure you pass the confirmation_email parameter. However, you should NEVER pass the confirmation_email parameter if you plan to use the /purge. If there is any post-processing involved, you should use the /reservation/confirmation_email method on success.

Method Parameters

Basic

NAME TYPE RANGE / SET REQUIRED DEFAULT EXAMPLE NOTES
checkin date (ISO 8601) from today
to (today + 2 years)
YES &checkin=2017-02-28  
checkout date (ISO 8601) from (checkin + 1)
to (checkin + 30)
YES &checkout=2017-03-07
rate integer YES &rate=1000 The rate being booked.
price decimal YES &price=1000 The final booking price shown to the user. Must match actual booking price for the reservation to succeed.
rooms integer 1 – 5 NO 1 &rooms=1  
adults integer 1 – max capacity YES &adults=2 The value is PER ROOM.
children integer 0 – (max capacity-1) NO 0 &children=1 The value is PER ROOM.
infants integer 0 – (max capacity-1) NO 0 &infants=1 The value is PER ROOM.

Payment

NAME TYPE RANGE / SET REQUIRED DEFAULT EXAMPLE NOTES
cardNumber numeric credit card YES &cardNumber=4556455645564556  
cardType string AmEx ( American Express )
DIN ( Diners )
Disc ( Discover )
JCB
Maes ( Maestro )
MC ( MasterCard )
Visa
Union ( UnionPay )
YES &cardType=AmEx  
cardName string varchar(30) YES &cardName=John%20Smith
cardMonth integer 1-12 YES &cardMonth=6
cardYear integer 2017–2117 YES &cardYear=2018
cardCVV numeric 000–999 YES &cardCVV=123
cardIssue numeric 0000–9999 No &cardIssue=0154 Required only for Maestro

Customer information

NAME TYPE RANGE / SET REQUIRED DEFAULT EXAMPLE NOTES
firstName string varchar(30) YES 0 &firstName=John
lastName string varchar(30) YES 0 &lastName=Smith
email string email, varchar(128) YES 0 &email=jsmith%40aol.com
tel string varchar(30) NO &tel=00302101818998
country string ISO 3166-1-alpha-2 NO &country=US
region string varchar(30) NO &region=Oregon
location string varchar(30) NO &location=Portland
address string varchar(128) NO &address=128 mark avenue
postal string varchar(10) NO &postal=68100
company string varchar(64) NO &company=AcmeInc
purpose string varchar(128) NO &purpose=Business
remarks string text NO &remarks=1st%20floor%20please

Advanced

NAME TYPE RANGE / SET REQUIRED DEFAULT EXAMPLE NOTES
remote_country string ISO 3166-1-alpha-2 NO &remote_country=US Specifies remote user's country.
Required for Markets
remote_ip string Dot-decimal notation NO &remote_ip=94.71.170.105 Specifies remote user's ip address. This is an alternative to remote_country using IP address geolocation.
Required for Markets.
Only IPv4 supported.
referer string domain, varchar(255) NO &referer=www.domain.com
bk_code string varchar(255) NO &bk_code=SPECIALRATES Required for Private Rates
voucher string varchar(255) NO &voucher=VCH123 Unlocks special offers
attach flag NO &attach Include the new reservation in the response.
confirmation_email flag NO &confirmation_email Send confirmation e-mail to the customer and hotelier.
The default is to NOT send any automated e-mails.
NEVER use this param if you plan to rollback with /purge.
external_id string varchar(64) NO &external_id=EXT-123456 Pass an additional reservation identifier of your own. You can later look up the reservation by using this id with /reservation search method
price_override string Comma delimited list of {day}^{price} pairs NO &price_override=1^87.00,2^87.00,3^80.00 Override rate price by passing alternative daily rates. Number of day-price pairs must match the total number of nights. If this is a multi room booking, daily price is the total price for all rooms.
price_detax boolean NO false &price_detax=1 Only used in conjunction with price_override. When true, the price_override daily rates are considered to be the final prices with tax included. Otherwise the price is considered net without tax. It is strongly recommended to always pass price_detax=1 when using price_override since it is extremely complex to precisely calculate net and final prices in order to pass the price check validation.

You can use remote_country or remote_ip. If you use both, remote_country takes precedence and remote_ip is ignored.

Language / Locale

To specify remote user's language preference please send Accept-Language header as described in the Internationaliation section of our Getting Started guide.

Specifying the language may be required for Markets.



Experimental

Warning

These parameters are not officially supported and are subject to change.

Use with caution.

NAME TYPE RANGE / SET REQUIRED DEFAULT EXAMPLE NOTES
extra_[extra_id] integer quantity NO &extra_3=1 Book an extra service using its id.


Response

If successful, the API returns:

NAME TYPE RANGE / SET EXAMPLE NOTES
res_id integer 10000000
summaryUrl string URL https://example.reserve-online.net/
?res_id=292858&email=jsmith%40aol%2Ecom&tpl=2
Can be used to modify or change the reservation at a later point.
email string ( list ) email info@hotel.com A list of emails that can be used to notify the property of a successful reservation.

If the "attach" flag is present, then the new reservation's data are also included:

NAME TYPE RANGE / SET EXAMPLE NOTES
reservation JSON Reservation Retrieval attach flag must be present in the request for the reservation body to be returned.