Professional Documents
Culture Documents
2011
Project Name: HotelsPro XML 4.1 Hotel
Document Number / Version Number: v1.1
Contents
Contents................................................................................................................................. 2
1 General................................................................................................................................ 3
2 Files Debuging................................................................................................................... 10
3 Methods in detail................................................................................................................ 27
4 Appendix............................................................................................................................ 35
Revision History
Versio Date Description Modification Author
n
4.0.0.1 19/10/2010 Template document created Cuneyt CAVA
4.0.0.2 27/10/2010 General, Methods, Elements sections Unal TASDIZEN
are created
4.0.0.3 10/01/2011 General Section completed Olga OVALI
4.0.0.4 01/03/2011 Document updated Cuneyt CAVA
4.0.0.9 03/03/2011 Document completed Cuneyt CAVA
4.1.0.1 27/05/2011 WSDL changed Cuneyt CAVA
4.1.0.2 23/03/2012 Document updated Olga OVALI
4.1.1.0 18/07/2012 Document updated Olga OVALI
4.1.1.1 02/12/2013 Document updated Olga OVALI
4.1.1.2 14/10/2014 Document updated Olga OVALI
1 General
1.1 Introduction
HotelsPro XML booking system is an XML-based interface for HotelsPro affiliates that allows clients
to check availability and make bookings at thousands of hotels worldwide (using the client’s own
front-end system/site and HotelsPro system).
The booking process is fully supported by the database that holds all the destinations and product
information data the client will need.
To become an XML affiliate the client needs to be registered as HotelsPro agency at HotelsPro
website www.hotelspro.com firstly.
2. Web server with database support and software language (PHP, ASP or other).
3. IT team. Developers working on the creation of the interface software should ideally have
the following skills/experience:
Good knowledge of XML, SOAP and JSON technologies.
Understanding of basic database concepts.
4. Opportunity for charging clients online.
1.2 Environments
The client can use 2 environments involved in the project to develop the interface:
Live
Test
Booking database
URL for request/response
Please note: The hotel bookings made on the test system cannot be real (live) bookings.
http://api.hotelspro.com/4.1/hotel/b2bHotelJSON.php
http://api.hotelspro.com/4.1/hotel/b2bHotelSOAP.php
http://api.hotelspro.com/4.1_test/hotel/b2bHotelJSON.php
http://api.hotelspro.com/4.1_test/hotel/b2bHotelSOAP.php
All requests need to be sent in “UTF-8” encoding (unicode). All responses will be similarly encoded.
Please note: Firstly only the test environment and the limited hotel inventory are available for a
new XML affiliate. Until system is not tested properly by XML affiliate, the live environment and full
hotel inventory of HotelsPro XML booking system will not be available for XML affiliate.
XML-formated hotel information will be available for XML affiliate after signing contract and NDA.
Please note that only limited hotel inventory is available when client is in Testing status.
Only master account can use Administration Menu so XML-formated hotel information can be
downloaded only by the main user of HotelsPro agency (master account which has admin rights
e.g. XY-123456-ZW).
To download XML-formatted hotel information the main agent should click ‘HotelList(XML)’ link in
‘Administration’ submenu of HotelsPro page:
After clicking on button ‘Update Files’ the system will start hotel data generating process. It can take
up to 2-3 hours.
The window of process can be closed; it will not interrupt the generating process.
After 2-3 hours hotel data files will be created. The data can be accessed by the links on the
HotelList(XML) page.
http://www.hotelspro.com/xf_3.0/downloads/[AffiliateCode]hotellist.xml
http://www.hotelspro.com/xf_3.0/downloads/[AffiliateCode]hoteldescr.xml
http://www.hotelspro.com/xf_3.0/downloads/[AffiliateCode]hotelamenities.xml
http://www.hotelspro.com/xf_3.0/downloads/[AffiliateCode]destinations.xml
1. ResponseType;
2. AffiliateCode – code of the XML affiliate;
3. AffRequestId – affiliate request identifier;
4. AffRequestTime – time when request for hotel list was sent;
5. TotalNumber – total number of HotelsPro hotels in XML file.
XML format:
- <Hotels>
- <Hotel>
<HotelCode>XXXXXX</HotelCode>
<OldHotelId>X/XXXXXXXX</OldHotelId>
<DestinationId>XXXX</DestinationId>
<Destination>Name of city</Destination>
<Country>Name of country</Country>
<HotelName>Hotel Name</HotelName>
<StarRating>x</StarRating>
<HotelAddress>Hotel address</HotelAddress>
<HotelPostalCode>Zip Code</HotelPostalCode>
<HotelPhoneNumber>Hotel phone number</HotelPhoneNumber>
<HotelArea>Hotel area</HotelArea>
<Chain>Hotel Chain</Chain>
- <Coordinates>
<Latitude>latitude</Latitude>
<Longitude>longitude</Longitude>
</Coordinates>
- <HotelImages>
<ImageURL>URL1</ImageURL>
<ImageURL>URL2</ImageURL>
<ImageURL>URL3</ImageURL>
</HotelImages>
</Hotel>
- <Hotel>
....
</Hotel>
....
</Hotels>
</XMLResponse>
XML format:
1. PAmenities – list of property (hotel) amenities which are separated by symbol ‘;’
2. RAmenities – list of room amenities which are separated by symbol ‘;’
3. RoomsNumber – number of rooms in the hotel
XML format:
Optimally XML affiliate might download XML-formatted hotel information once a month and update
its own database.
Received by this way XML-formated hotel information can be shown on client’s own front-end
system/site for helping customers to search, select and book hotels.
The files are in csv format and the field order is as follows:
Hotel Code
Hotel Name
Hotel Intro
Hotel Info
Location Info
Attraction Info
Hotel Amenities
Language File
Spanish http://www.hotelspro.com/xf_4.0/multi-lang/hotelinfo.es.zip
Chinese http://www.hotelspro.com/xf_4.0/multi-lang/hotelinfo.cn.zip
Turkish http://www.hotelspro.com/xf_4.0/multi-lang/hotelinfo.tr.zip
Russian http://www.hotelspro.com/xf_4.0/multi-lang/hotelinfo.ru.zip
Please note all the hotel data is not available in all languages. The hotel content in
languages other than English are dependent on the info provided to us by hotels &
suppliers.
XML format
<Country>Name of country</Country>
<City>Name of city</City>
<State>State Code</State>
</Destination>
- <Destination>
....
</Destination>
....
</ Destinations>
</XMLResponse>
The files are in csv format and the field order is as follows:
DestinationId
Country
City
State
Language File
Turkish http://www.hotelspro.com/xf_4.0/multi-lang/destinationinfo.tr.zip
French http://www.hotelspro.com/xf_4.0/multi-lang/destinationinfo.fr.zip
German http://www.hotelspro.com/xf_4.0/multi-lang/destinationinfo.de.zip
Chinese http://www.hotelspro.com/xf_4.0/multi-lang/destinationinfo.zh.zip
Hungarian http://www.hotelspro.com/xf_4.0/multi-lang/destinationinfo.hu.zip
Portugese http://www.hotelspro.com/xf_4.0/multi-lang/destinationinfo.pt.zip
Russian http://www.hotelspro.com/xf_4.0/multi-lang/destinationinfo.ru.zip
Polish http://www.hotelspro.com/xf_4.0/multi-lang/destinationinfo.pl.zip
2 Files Debuging
2.1 Overview
Together with this documentation you received the following files:
WSDL file
Please ensure that, you always work with the latest version.
The following chart gives an overview of the defined operations, port types, bindings and services:
2.3.1 getAvailableHotel
try {
$rooms = array();
// First Room
$rooms[] = array(array("paxType" => "Adult"));
// Second Room
$rooms[] = array(array("paxType" => "Adult"), array("paxType" => "Adult"),
array("paxType" => "Child", "age" => 8));
$filters = array();
$filters[] = array("filterType" => "hotelStar", "filterValue" => "3");
$filters[] = array("filterType" => "resultLimit", "filterValue" => "5");
<tr>
<td><b>Room <?php echo($rnum + 1);?> Category</b></td>
<td><?php echo $room->roomCategory;?></td>
</tr>
<tr>
<td><b>Total Room Rate</b></td>
<td><?php echo $room->totalRoomRate;?></td>
</tr>
<tr>
<td><b>Paxes</b></td>
<td>
<?php
if (is_object($room->paxes)) {
$roomsInfo[] = $room->paxes;
} else {
$roomsInfo = $room->paxes;
}
if (is_object($room->ratesPerNight)) {
$ratesPerNight[] = $room->ratesPerNight;
} else {
$ratesPerNight = $room->ratesPerNight;
}
</tbody>
</table>
2.3.2 allocateHotelCode
try {
$allocateHotelCode = $client->allocateHotelCode("apiKey", $searchId, $hote
lCode);
}
catch (SoapFault $exception) {
$exception->getMessage();
exit;
}
?>
<td>
<?php
if (is_object($hotel->rooms)) {
$roomResponse[] = $hotel->rooms;
} else {
$roomResponse = $hotel->rooms;
}
foreach ((array)$roomResponse as $rnum => $room) {
?>
<table border="1" style="margin: 10px; width: 300px; float: left;">
<tr>
<td><b>Room <?php echo($rnum + 1);?> Category</b></td>
<td><?php echo $room->roomCategory;?> </td>
</tr>
<tr>
<td><b>Total Room Rate</b></td>
<td><?php echo $room->totalRoomRate;?> </td>
</tr>
<tr>
<td><b>Paxes</b></td>
<td>
<?php
if (is_object($room->paxes)) {
$roomsInfo[] = $room->paxes;
} else {
$roomsInfo = $room->paxes;
}
if (is_object($room->ratesPerNight)) {
$ratesPerNight[] = $room->ratesPerNight;
} else {
$ratesPerNight = $room->ratesPerNight;
}
foreach ((array)$roomsInfo as $pnum => $pax) {
?>
<?php echo $pax->paxType;?> (<?php echo $pax->age;?>)<br/>
<?php
}
?>
</td>
</tr>
<tr>
<td><b>ratesPerNight</b></td>
<td>
<?php
foreach ((array)$ratesPerNight as $rpnum => $price) {
?>
<?php echo $price->date;?> (<?php echo $price->amount;?>)<br/>
<?php
}
?>
</td>
</tr>
</table>
<?php
unset($ratesPerNight);
unset($roomsInfo);
}
unset($roomResponse);
?>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
2.3.3 makeHotelBooking
try {
// lead traveller
$leadTravellerInfo = array();
$paxInfo = array("paxType" => "Adult", "title" => "Mr", "firstName" => "Jo
hn", "lastName" => "TEST");
$leadTravellerInfo["paxInfo"] = $paxInfo;
$leadTravellerInfo["nationality"] = "UK";
$otherTravellerInfo = array();
$otherTravellerInfo[] = array("title" => "Mr", "firstName" => "Mark", "las
tName" => "TEST");
$otherTravellerInfo[] = array("title" => "Ms", "firstName" => "Jane", "las
tName" => "TEST");
$otherTravellerInfo[] = array("title" => "Mr", "firstName" => "Baby", "las
tName" => "TEST");
$preferences = "nonSmoking";
$note = "";
$hotelCode = "XX1234";
$agencyReferenceNumber = '';
$makeHotelBooking = $client->makeHotelBooking("apiKey", $processId, $agenc
yReferenceNumber, $leadTravellerInfo, $otherTravellerInfo, $preferences, $note,
$hotelCode);
$hotel = $makeHotelBooking->hotelBookingInfo;
$rooms = is_array($hotel->rooms) ? $hotel->rooms : array($hotel->rooms);
$policies = is_array($hotel->cancellationPolicy) ? $hotel-
>cancellationPolicy : array($hotel->cancellationPolicy);
}
catch (SoapFault $exception) {
echo $exception->getMessage();
exit;
}
?>
>paxType}";
?> (<?php echo $pax->age;?>)<br/>
<?php
}
?>
</td>
</tr>
<tr>
<td><b>ratesPerNight</b></td>
<td>
<?php
$prices = is_array($room->ratesPerNight) ? $room->ratesPerNight : arra
y($room->ratesPerNight);
?>
<?php
foreach ($prices as $price) {
?>
<?php
echo $price->date;
?> (<?php echo $price->amount;?>)<br/>
<?php
}
?>
</td>
</tr>
</table>
<?php
}
?>
</td>
<td>
<table border="1">
<thead>
<tr>
<th>Days</th>
<th>feeType</th>
<th>feeAmount</th>
<th>currency</th>
<th>remarks</th>
</tr>
</thead>
<tbody>
<?php
foreach ($policies as $policy) {
?>
<tr>
<td><?php echo $policy->cancellationDay;?> </td>
<td><?php echo $policy->feeType;?> </td>
<td><?php echo $policy->feeAmount;?> </td>
<td><?php echo $policy->currency; ?> </td>
<td><?php echo $policy->remarks; ?> </td>
</tr>
<?php
}
?>
</tbody>
</table>
</td>
<td><?php echo $hotel->comments;?> </td>
</tr>
<?php
}
?>
</tbody>
</table>
2.3.4 getHotelBookingStatus
try {
$getHotelBookingStatus = $client->getHotelBookingStatus("apiKey", $trackin
gId);
}
catch (SoapFault $exception) {
echo $exception->getMessage();
exit;
}
?>
</thead>
<tbody>
<tr>
<td><?php echo $getHotelBookingStatus->hotelBookingInfo->bookingStatus;?
> </td>
<td><?php echo $getHotelBookingStatus->hotelBookingInfo-
>confirmationNumber;?> </td>
<td><?php echo $getHotelBookingStatus->hotelBookingInfo->hotelCode;
?> </td>
<td><?php echo $getHotelBookingStatus->hotelBookingInfo->checkIn;
?> </td>
<td><?php echo $getHotelBookingStatus->hotelBookingInfo->checkOut;
?> </td>
<td><?php echo $getHotelBookingStatus->hotelBookingInfo->totalPrice;
?> </td>
<td><?php echo $getHotelBookingStatus->hotelBookingInfo->totalSalePrice;
?> </td>
<td><?php echo $getHotelBookingStatus->hotelBookingInfo->currency;
?> </td>
<td><?php echo $getHotelBookingStatus->hotelBookingInfo->boardType;
?> </td>
<td><?php echo $getHotelBookingStatus->hotelBookingInfo-
>agencyReferenceNumber;
?> </td>
<td><?php echo $getHotelBookingStatus->hotelBookingInfo->comments;
?> </td>
</tr>
<tbody>
</table>
<table border="1">
<thead>
<tr>
<th colspan="5">Pax List</th>
</tr>
<tr>
<th>Pax Type</th>
<th>Title</th>
<th>Name</th>
<th>LastName</th>
<th>Age</th>
</tr>
</thead>
<tbody>
<?php
$rooms = is_array($getHotelBookingStatus->hotelBookingInfo->rooms) ? $getHotel
BookingStatus->hotelBookingInfo : array($getHotelBookingStatus-
>hotelBookingInfo);
<table border="1">
<thead>
<tr>
<th colspan="5">Price Per Night</th>
</tr>
</thead>
<tbody>
<?php
foreach ($rooms as $roomId => $room) {
$prices = is_array($room->ratesPerNight) ? $room->ratesPerNight : array
($room->ratesPerNight);
?>
<tr>
<th>Room <?=$roomId + 1;?></th>
<th>Day</th>
<th>Amount</th>
</tr>
<?php
foreach ($prices as $price) {
?>
<tr>
<td> </td>
<td><?php echo $price->date;?> </td>
<td><?php echo $price->amount;?> </td>
</tr>
<?php
}
}
?>
<table border="1">
<thead>
<tr>
<th colspan="4">Cancellation Policy</th>
</tr>
<tr>
<th>cancellationDay</th>
<th>feeType</th>
<th>feeAmount</th>
<th>currency</th>
<th>remarks</th>
</tr>
© MetGlobal 2020 www.hotelspro.com
Author: Unal TASDIZEN Document Status: Live
32
Project Name: HotelsPro XML 4.1 Hotel
Document Number / Version Number: v1.1
</thead>
<tbody>
<?php
$policies = is_array($getHotelBookingStatus->hotelBookingInfo-
>cancellationPolicy) ? $getHotelBookingStatus->hotelBookingInfo-
>cancellationPolicy : array($getHotelBookingStatus->hotelBookingInfo-
>cancellationPolicy);
foreach ($policies as $policy) {
?>
<tr>
<td><?php echo $policy->cancellationDay;?> </td>
<td><?php echo $policy->feeType;?> </td>
<td><?php echo $policy->feeAmount;?> </td>
<td><?php echo $policy->currency;?> </td>
<td><?php echo $policy->remarks;?> </td>
</tr>
<?php
}
?>
</tbody>
</table>
2.3.5 cancelHotelBooking
try {
$cancelHotelBooking = $client->cancelHotelBooking("apiKey", $trackingId);
}
catch (SoapFault $exception) {
echo $exception->getMessage();
exit;
}
?>
</tr>
<tbody>
</table>
2.3.6 getHotelCancellationPolicy
try {
$getHotelCancellationPolicy = $client-
>getHotelCancellationPolicy("apiKey", $processId, $hotelCode);
}
catch (SoapFault $exception) {
echo $exception->getMessage();
exit;
}
?>
}
?>
</tbody>
</table>
2.3.7 amendHotelBooking
try {
// lead traveller
$leadTravellerInfo = array();
$paxInfo = array("paxType" => "Adult", "title" => "Mr", "firstName" => "Jo
hn", "lastName" => "TEST");
$leadTravellerInfo["paxInfo"] = $paxInfo;
$leadTravellerInfo["nationality"] = "UK";
$rooms = array();
$rooms
[] = array(array("paxType" => "Adult", "title" => "Mr", "firstName" => "Mark", "
lastName" => "TEST"), array("paxType" => "Child", "title" => "Mr", "firstName" =
> "Baby", "lastName" => "TEST", "age" => 2), array("paxType" => "Child", "title"
=> "Ms", "firstName" => "Baby2", "lastName" => "TEST", "age" => 1) );
$rooms
[] = array(array("paxType" => "Adult", "title" => "Ms", "firstName" => "Jane", "
lastName" => "TEST"), array("paxType" => "Adult", "title" => "Mr", "firstName" =
> "Brad", "lastName" => "TEST"));
$preferences = "nonSmoking";
$note = "test";
</thead>
<tbody>
<tr>
<td><?php echo $amendHotelBooking->amendStatus;?> </td>
<td><?php echo $amendHotelBooking->note;?> </td>
</tr>
<tbody>
</table>
2.3.8 getBalance
try {
$getBalance = $client->getBalance("apiKey");
}
catch (SoapFault $exception) {
echo $exception->getMessage();
exit;
}
?>
2.3.9 getHotelBookingList
try {
$getHotelBookingList = $client->getHotelBookingList("apiKey", "bookDateFrom",
"bookDateTo", "checkInFrom", "checkInTo", "checkOutFrom", "checkOutTo",
"bookingStatus");
} catch (SoapFault $exception) {
echo $_GET["debug"] ? $client->__getLastResponse() : $exception->getMessage();
exit;
}
?>
$bookings = is_array($getHotelBookingList->bookInfoArray) ?
$getHotelBookingList->bookInfoArray : array($getHotelBookingList-
>bookInfoArray);
foreach ($bookings as $getHotelBookingStatus) {
?>
trackingId: <?php echo $getHotelBookingStatus->trackingId ?><br/>
agencyReferenceNumber: <?php echo $getHotelBookingStatus-
>agencyReferenceNumber ?><br/>
bookingTime: <?php echo $getHotelBookingStatus->bookingTime ?><br/>
hotelName: <?php echo $getHotelBookingStatus->hotelName ?><br/>
destinationId: <?php echo $getHotelBookingStatus->destinationId ?><br/>
cityName: <?php echo $getHotelBookingStatus->cityName ?><br/>
bookingSource: <?php echo $getHotelBookingStatus->bookingSource ?><br/>
<table border="1">
<thead>
<tr>
<th colspan="10">Book Info</th>
</tr>
<tr>
<th>bookingStatus</th>
<th>confirmationNumber</th>
<th>hotelCode</th>
<th>checkIn</th>
<th>checkOut</th>
<th>totalPrice</th>
<th>currency</th>
<th>boardType</th>
<th>agencyReferenceNumber</th>
<th>comments</th>
</tr>
</thead>
<tbody>
<tr>
<td><?php echo $getHotelBookingStatus->hotelBookingInfo->bookingStatus; ?
> </td>
<td><?php echo $getHotelBookingStatus->hotelBookingInfo-
>confirmationNumber; ?> </td>
<td><?php echo $getHotelBookingStatus->hotelBookingInfo->hotelCode; ?
> </td>
<td><?php echo $getHotelBookingStatus->hotelBookingInfo->checkIn; ?
> </td>
<td><?php echo $getHotelBookingStatus->hotelBookingInfo->checkOut; ?
> </td>
<td><?php echo $getHotelBookingStatus->hotelBookingInfo->totalPrice; ?
> </td>
<td><?php echo $getHotelBookingStatus->hotelBookingInfo->currency; ?
> </td>
<td><?php echo $getHotelBookingStatus->hotelBookingInfo->boardType; ?
> </td>
<td><?php echo $getHotelBookingStatus->hotelBookingInfo-
>agencyReferenceNumber; ?> </td>
<td><?php echo $getHotelBookingStatus->hotelBookingInfo->comments; ?
> </td>
© MetGlobal 2020 www.hotelspro.com
Author: Unal TASDIZEN Document Status: Live
32
Project Name: HotelsPro XML 4.1 Hotel
Document Number / Version Number: v1.1
</tr>
<tbody>
</table>
<table border="1">
<thead>
<tr>
<th colspan="5">Pax List</th>
</tr>
<tr>
<th>Pax Type</th>
<th>Title</th>
<th>Name</th>
<th>LastName</th>
<th>Age</th>
</tr>
</thead>
<tbody>
<?
$rooms = is_array($getHotelBookingStatus->hotelBookingInfo->rooms) ?
$getHotelBookingStatus->hotelBookingInfo->rooms : array($getHotelBookingStatus-
>hotelBookingInfo->rooms);
<table border="1">
<thead>
<tr>
<th colspan="5">Price Per Night</th>
</tr>
</thead>
<tbody>
<?
foreach ($rooms as $roomId => $room) {
$prices = is_array($room->ratesPerNight) ? $room->ratesPerNight : array($room-
>ratesPerNight);
?>
<tr>
<th>Room <?=$roomId + 1;?></th>
<th>Day</th>
<th>Amount</th>
</tr>
<?
foreach ($prices as $price) {
?>
<tr>
<td> </td>
<td><?php echo $price->date; ?> </td>
<td><?php echo $price->amount; ?> </td>
</tr>
<?
}
}
?>
<table border="1">
<thead>
<tr>
<th colspan="4">Cancellation Policy</th>
</tr>
<tr>
<th>cancellationDay</th>
<th>feeType</th>
<th>feeAmount</th>
<th>currency</th>
<th>remarks</th>
</tr>
</thead>
<tbody>
<?
$policies = is_array($getHotelBookingStatus->hotelBookingInfo-
>cancellationPolicy) ? $getHotelBookingStatus->hotelBookingInfo-
>cancellationPolicy : array($getHotelBookingStatus->hotelBookingInfo-
>cancellationPolicy);
foreach ($policies as $policy) {
?>
<tr>
<td><?php echo $policy->cancellationDay; ?> </td>
<td><?php echo $policy->feeType; ?> </td>
<td><?php echo $policy->feeAmount; ?> </td>
<td><?php echo $policy->currency; ?> </td>
<td><?php echo $policy->remarks; ?> </td>
</tr>
<?
}
?>
</tbody>
</table>
<?
}
?>
2.4.1 getAvailableHotel
2.4.2 allocateHotelCode
2.4.3 makeHotelBooking
2.4.4 getHotelBookingStatus
2.4.5 cancelHotelBooking
2.4.6 getHotelCancellationPolicy
2.4.7 amendHotelBooking
2.4.8 getBalance
2.4.9 getHotelBookingList
l3WkcrV0hLdTlLSzVZT3NyYXFDZlc5a0xOQWtoWg==&bookDateFrom=2014-06-
01&bookDateTo=2014-06-30&checkInFrom=2014-08-16&checkInTo=2014-08-
16&bookingStatus=1
3 Methods in detail
3.1 General functions
3.1.1 getAvailableHotel
getAvailableHotel method allows the client to get a list of hotels that are available in a city according
to search criteria provided by the client.
The method allows the client to check availability of a single hotel or all hotels in a city.
Please note: getAvailableHotel method returns cached availability and rates. In order to get real
time hotel rates and room types allocateHotelCode method must be used (see next method).
3.1.1.1 Request
Variable Type Description Mandatory
apikey String Api key taken from the interface Yes
destinationId String identifier of destination Yes
checkIn Date check-in date in format ‘yyyy-mm-dd’; Yes
checkOut Date check-out date in format ‘yyyy-mm-dd’; Yes
currency String currency ISO code (it can be EUR, USD or GBP; if sent currency No
code is different, then response will contain rates in default Default: EUR
currency EUR);
clientNationality String Code of country (2 chars). List of supported codes are in Yes
Appendix 4.4
onRequest Bool this criteria allows the client to get only available hotels with No
instant confirmation; or available hotels with instant confirmation Default: true
and available on-request hotels; if onRequest = false then only
instant confirmation hotels will be returned in response; if
onRequest = true then instant confirmation and on request
hotels will be returned in response;
rooms Array Array of pax elements array Yes
filters Array Array of filter elements No
3.1.1.2 Response
Variable Type Description Mandatory
responseId Int. Id of response for debugging Yes
searchId String Unique id for this availability session Yes
totalFound Int. Total number of found available rooms Yes
availableHotels Array Array of hotel elements for available room (or combination of Yes
rooms in case of multiple room search) each
3.1.2 allocateHotelCode
allocateHotelCode method allows the client to get rates and availability for selected hotel from
getAvailableHotel response. Please note that allocateHotelCode method must be used before
making booking in order to get exact hotel rate.
Please note: allocateHotelCode response may contain higher or lower rates, different processid
and different room types comparing to getAvailableHotel response because getAvailableHotel
returns cached rates and availability and allocateHotelCode returns real time rates and availability.
Please be sure that your integration is ready for it. For booking request you should always use
processId from allocateHotelCode. The rate from allocateHotelCode will be confirmed at the time of
booking.
3.1.2.1 Request
Variable Type Description Mandatory
apiKey String Api key taken from the interface Yes
searchId String unique HotelsPro SEARCH reference received in Yes
getAvailableHotel
hotelCode String Hotel identifier Yes
3.1.2.2 Response
Variable Type Description Mandatory
responseId Int. Id of response for debugging Yes
searchId String Unique id for this availability session Yes
hotelCode String Hotel identifier Yes
availableHotels Array Array of Hotel Element for available room (or combination of Yes
rooms in case of multiple room search) each
3.1.3 makeHotelBooking
Purpose of this method is to make booking for the selected hotel in allocateHotelCode method.
3.1.3.1 Request
Variable Type Description Mandatory
apiKey String Api key taken from the interface Yes
processId String unique identifier of search result from allocateHotelCode Yes
Response
agencyReference String Agency’s booking reference number No
Number
leadTravellerInfo Element leadTraveller element* Yes
otherTravellerInfo Array Array of pax elements array* No if single
pax
preferences String smoking/nonSmoking No
note String Note for the booking No
hotelCode String Unique identifier of a hotel to be booked Yes
© MetGlobal 2020 www.hotelspro.com
Author: Unal TASDIZEN Document Status: Live
32
Project Name: HotelsPro XML 4.1 Hotel
Document Number / Version Number: v1.1
* - Please make sure that you use English alphabeth for guests' first name and last name. Also
following symbols are allowed: whitespace, “.”, “-”, “'”. No digits can be used in guests' first name
and last name.
3.1.3.2 Response
Variable Type Description Mandatory
responseId Int. Id of response for debugging Yes
trackingId String unique HotelsPro booking reference (this reference will be Yes
required in XML request for operations with the booking); if first
2 letters of it are ‘HR’ - booking is OnRequest; if first 2 letters of
it are ‘XI’ - booking is InstantConfirmation
hotelBookingInfo Element bookInfo Element Yes
3.1.4 getHotelBookingStatus
If a booking was made as OnRequest booking then the client needs to know if the booking was
confirmed or rejected by the hotel. In this case the client should use getHotelBookingStatus
method. Also this method can return all details of the booking.
3.1.4.1 Request
Variable Type Description Mandatory
apiKey String Api key taken from the interface Yes
trackingId String Unique HotelsPro booking reference Yes
3.1.4.2 Response
Variable Type Description Mandatory
responseId Int. Id of response for debugging Yes
trackingId String Unique HotelsPro booking reference Yes
agencyReferenceNumber String Agency’s booking reference number No
hotelBookingInfo Element bookInfo element Yes
3.1.5 cancelHotelBooking
Booking cancellation allows the client to cancel any booking previously made through HotelsPro
XML booking system.
Please note: Non-refundable bookings can be cancelled but the booking amount will not be
refunded to the client. Non-refundable bookings are bookings with non-refundable cancellation
policy. Non-refundable cancellation policy can be defined by using getHotelCancellationPolicy
method.
3.1.5.1 Request
Variable Type Description Mandatory
apiKey String Api key taken from the interface Yes
trackingId String Unique HotelsPro booking reference Yes
3.1.5.2 Response
Variable Type Description Mandatory
© MetGlobal 2020 www.hotelspro.com
Author: Unal TASDIZEN Document Status: Live
32
Project Name: HotelsPro XML 4.1 Hotel
Document Number / Version Number: v1.1
3.1.6 getHotelCancellationPolicy
getHotelCancellationPolicy method allows the client to get detailed information about cancellation
policy and cancellation penalty for selected hotel.
3.1.6.1 Request
Variable Type Description Mandatory
apiKey String Api key taken from the interface Yes
trackingId String unique HotelsPro booking reference received in Yes
MakeHotelBookingResponse; or processId
received in allocateHotelCode response.
hotelCode String Unique identifier of a hotel to be booked Yes
3.1.6.2 Response
Variable Type Description Mandatory
responseId Int. Id of response for debugging Yes
trackingId Stringunique HotelsPro booking reference; Yes
agencyReferenceNumber StringAgency’s booking reference number No
cancellationPolicy Array Array of policy Yes
Non-refundable cancellation policy is defined by cancellationDay element’s value. If the value is
more than 250 days then the cancellation policy is non-refundable.
<item xsi:type="ns1:policy">
<cancellationDay xsi:type="xsd:integer">1001</cancellationDay>
<feeAmount xsi:type="xsd:float">100</feeAmount>
<remarks xsi:type="xsd:string"></remarks>
</item>
This reservation is non refundable and can not be amended or cancelled. No refund will be made
upon cancellation, late check-in, early check out or non arrival. Any extensions for the reservation
require a new reservation.
No-show policy is defined by cancellationDay element’s value. If the value is 0 days then the policy
is for no-show case (customer didn’t cancel booking and didn’t arrive to hotel).
<item xsi:type="ns1:policy">
<cancellationDay xsi:type="xsd:integer">0</cancellationDay>
<feeType xsi:type="xsd:string">Percent</feeType>
<feeAmount xsi:type="xsd:float">100</feeAmount>
<remarks xsi:type="xsd:string"></remarks>
</item>
3.1.7 amendHotelBooking
amendHotelBooking method allows the client to amend any booking previously made through
HotelsPro XML booking system.
Please note: Booking amendment cannot be made on or after CheckIn date. According to
HotelsPro policy only one amendment can be accepted for a booking. Additional amendment
requests might be rejected by HotelsPro operation team.
3.1.7.1 Request
Variable Type Description Mandatory
apiKey String Api key taken from the interface Yes
trackingId String unique HotelsPro booking reference received in Yes
MakeHotelBookingResponse;
checkIn Date check-in date in format ‘yyyy-mm-dd’; Yes
checkOut Date check-out date in format ‘yyyy-mm-dd’; Yes
leadTraverllerInfo Element leadTraveller Element Yes
rooms Array Array of pax elements array Yes
3.1.7.2 Response
Variable Type Description Mandatory
responseId Int. Id of response for debugging Yes
trackingId String unique HotelsPro booking reference Yes
agencyReferenceNumber String Agency’s booking reference number No
amendStatus Enum The value will be ‘Pending’ for all amenment Yes
requests
Note String amendment note: Your amendment request has No
been received. You will be contacted regarding
amendment results by email or by message in
our online system.
3.1.8 getBalance
getBalance method allows the client to get information about current account balance (This method
can be used only by agencies who work with Deposit payment method).
3.1.8.1 Request
Variable Type Description Mandatory
apiKey String Api key taken from the interface Yes
3.1.8.2 Response
Variable Type Description Mandatory
responseId Int. Id of response for debugging Yes
Currency String Balance currency Yes
totalDeposit Float Total amount of deposit Yes
totalBookingAmount Float Total amount of bookings Yes
currentBalance Float Current account balance Yes
3.1.9 getHotelBookingList
getHotelBookingList method allows the client to get list of hotel bookings selected by several
criteria: booking date period, check-in date period, check-out date period, booking status.
3.1.9.1 Request
Variable Type Description Mandatory
apiKey String Api key taken from the interface Yes
bookDateFrom Date Beginning of booking period in format 'yyy-mm- No*
dd'
bookDateTo Date End of booking period in format 'yyy-mm-dd' No*
checkInFrom Date Beginning of check-in period in format 'yyy-mm- No*
dd'
checkInTo Date End of check-in period in format 'yyy-mm-dd' No*
checkOutFrom Date Beginning of check-out period in format 'yyy- No*
mm-dd'
checkOutTo Date End of check-out period in format 'yyy-mm-dd' No*
bookingStatus String Booking status, one of the values: 1, 2, 3, 4 or 5 No
* - Please note that at least one date period should be presented in the request (booking date,
check-in date or check-out date). The maximum number of days in the date period is 31 days.
3.1.9.2 Response
Variable Type Description Mandatory
responseId Int. Id of response for debugging Yes
totalBookingFound Integer Number of bookings matching search criteria Yes
bookInfoArray Array Array of bookingArray elements Yes
3.2 Elements
3.2.1 pax Element
Variable Type Description Mandatory
paxType Enum Child/Adult Yes
age Int. Age of pax Yes if pax type is child, No for rest. The age
range for children is 0-17.
title String Title of pax No for getAvailableHotel method, Yes for rest
(Types: Mr, Ms, Mrs, Miss)
firstName String Firstname of pax (Please use English No for getAvailableHotel method, Yes for rest
alphabet letters only)*
lastName String Lastname of pax (Please use English No for getAvailableHotel method, Yes for rest
alphabet letters only)*
* - Please make sure that you use English alphabeth for guests' first name and last name. Also
following symbols are allowed: whitespace, “.”, “-”, “'”. No digits can be used in guests' first name
and last name.
Value Explanation
RO Room Only
BB Bed and Breakfast
EB English Breakfast
CB Continental Breakfast
HB Half Board
FB Full Board
AI All Inclusive
UI Ultra All İnclusive
SC Self Catering
hotelStar filter possible values are 1, 2, 3, 4, 5.
© MetGlobal 2020 www.hotelspro.com
Author: Unal TASDIZEN Document Status: Live
32
Project Name: HotelsPro XML 4.1 Hotel
Document Number / Version Number: v1.1
2 Special Discount
3 Special Offer
5 Free Transportation
6 Free Parking
7 Free Upgrade
8 Free Meal
9 Free Child
10 Free Person
12 Free Night
totalPrice Float total price for all nights of the stay including all taxes and fees; Yes
totalTax Float No
amount of taxes and fees (it is included in TotalPrice);
Default: 0
totalSalePrice Float No
recommended sale price for the end-customer;
Default: 0
currency String ISO code currency of totalPrice Yes
boardType String type of board (for example ‘Room Only’, ‘Bed and Breakfast’), it Yes
shows what is included in total price of the stay
rooms Array Array of roomResponse Element Yes
4 Appendix
<cancellationPolicy>
<item>
<cancellationDay>number of days</cancellationDay>
<feeType>Percent/Amount/Night</feeType>
<feeAmount>x</feeAmount>
<Currency>Code of currency</Currency>
</item>
.......
</CancellationPolicy>
<cancellationPolicy>
<item>
<cancellationDay>3</cancellationDay>
<feeType>Percent</feeType>
<feeAmount>50</feeAmount>
</item>
</cancellationPolicy>
In this case if cancellation is made within 3 days of checkin date then cancellation fee will be 50% of total
amount.
If total amount is 150 EUR then cancellation fee will be 75 EUR.
<cancellationPolicy>
<item>
<cancellationDay>3</cancellationDay>
<feeType>Amount</feeType>
<feeAmount>10</feeAmount>
<currency>EUR</currency>
</item>
</cancellationPolicy>
In this case if cancellation is made within 3 days of checkin date then cancellation fee will be 10 EUR.
<cancellationPolicy>
<item>
<cancellationDay>3</cancellationDay>
<feeType>Night</feeType>
<feeAmount>2</feeAmount>
</item>
</cancellationPolicy>
In this case if cancellation is made within 3 days of checkin date then cancellation fee will be 2 first night
rates.
If total amount is 150 EUR and booking is for 3 nights then cancellation fee will be 2 first night rates = 100
EUR.
4.3 Recommendations
AF Afghanistan
AX Aland Islands
AL Albania
DZ Algeria
AS American Samoa
AD Andorra
AO Angola
AI Anguilla
AQ Antarctica
AR Argentina
AM Armenia
AW Aruba
AU Australia
AT Austria
AZ Azerbaijan
BS Bahamas
BH Bahrain
BD Bangladesh
BB Barbados
BY Belarus
BE Belgium
BZ Belize
BJ Benin
BM Bermuda
BT Bhutan
BO Bolivia
BW Botswana
BV Bouvet Island
BR Brazil
BN Brunei Darussalam
BG Bulgaria
BF Burkina Faso
BI Burundi
KH Cambodia
CM Cameroon
CA Canada
CV Cape Verde
KY Cayman Islands
TD Chad
CL Chile
CN China
CX Christmas Island
CO Colombia
KM Comoros
CG Congo
CK Cook Islands
CR Costa Rica
© MetGlobal 2020 www.hotelspro.com
Author: Unal TASDIZEN Document Status: Live
32
Project Name: HotelsPro XML 4.1 Hotel
Document Number / Version Number: v1.1
CI Cote d'Ivoire
HR Croatia
CU Cuba
CY Cyprus
CZ Czech Republic
DK Denmark
DJ Djibouti
DM Dominica
DO Dominican Republic
EC Ecuador
EG Egypt
SV El Salvador
GQ Equatorial Guinea
ER Eritrea
EE Estonia
ET Ethiopia
FO Faroe Islands
FJ Fiji
FI Finland
FR France
GF French Guiana
PF French Polynesia
GA Gabon
GM Gambia
GE Georgia
DE Germany
GH Ghana
GI Gibraltar
GR Greece
GL Greenland
GD Grenada
GP Guadeloupe
GU Guam
GT Guatemala
GG Guernsey
GN Guinea
GW Guinea-Bissau
GY Guyana
HT Haiti
HN Honduras
HK Hong Kong
HU Hungary
IS Iceland
IN India
ID Indonesia
IR Iran
IQ Iraq
IE Ireland
IM Isle Of Man
IL Israel
IT Italy
© MetGlobal 2020 www.hotelspro.com
Author: Unal TASDIZEN Document Status: Live
32
Project Name: HotelsPro XML 4.1 Hotel
Document Number / Version Number: v1.1
JM Jamaica
JP Japan
JE Jersey
JO Jordan
KZ Kazakhstan
KE Kenya
KI Kiribati
KR Korea
XK Kosovo
KW Kuwait
KG Kyrgyzstan
LA Laos
LV Latvia
LB Lebanon
LS Lesotho
LR Liberia
LI Liechtenstein
LT Lithuania
LU Luxembourg
MO Macau
MK Macedonia
MG Madagascar
MW Malawi
MY Malaysia
MV Maldives
ML Mali
MT Malta
MH Marshall Islands
MQ Martinique
MR Mauritania
MU Mauritius
YT Mayotte
MX Mexico
FM Micronesia
MD Moldova
MC Monaco
MN Mongolia
ME Montenegro
MS Montserrat
MA Morocco
MZ Mozambique
MM Myanmar
NA Namibia
NR Nauru
NP Nepal
NL Netherlands
AN Netherlands Antilles
NC New Caledonia
NZ New Zealand
NI Nicaragua
NE Niger
NG Nigeria
NU Niue
NF Norfolk Island
© MetGlobal 2020 www.hotelspro.com
Author: Unal TASDIZEN Document Status: Live
32
Project Name: HotelsPro XML 4.1 Hotel
Document Number / Version Number: v1.1
KP North Korea
NO Norway
OM Oman
PK Pakistan
PW Palau
PS Palestinian Territory
PA Panama
PY Paraguay
PE Peru
PH Philippines
PN Pitcairn
PL Poland
PT Portugal
PR Puerto Rico
QA Qatar
RE Reunion
RO Romania
RU Russia
RW Rwanda
BL Saint Barthelemy
SH Saint Helena
LC Saint Lucia
MF Saint Martin
WS Samoa
SM San Marino
SA Saudi Arabia
SN Senegal
RS Serbia
SC Seychelles
SL Sierra Leone
SG Singapore
SK Slovakia
SI Slovenia
SB Solomon Islands
SO Somalia
ZA South Africa
ES Spain
LK Sri Lanka
SD Sudan
SR Suriname
SZ Swaziland
SE Sweden
CH Switzerland
TW Taiwan
TJ Tajikistan
TZ Tanzania
© MetGlobal 2020 www.hotelspro.com
Author: Unal TASDIZEN Document Status: Live
32
Project Name: HotelsPro XML 4.1 Hotel
Document Number / Version Number: v1.1
TH Thailand
TL Timor-Leste
TG Togo
TK Tokelau
TO Tonga
TN Tunisia
TR Turkey
TM Turkmenistan
TV Tuvalu
UG Uganda
UA Ukraine
UK United Kingdom
US United States
UY Uruguay
VI US Virgin Islands
UZ Uzbekistan
VU Vanuatu
VE Venezuela
VN Vietnam
EH Western Sahara
YE Yemen
ZM Zambia
ZW Zimbabwe