You are on page 1of 52

MetGlobal

HotelsPro API 4.1


Service Application Document
Hotel

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

© 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

1 General

1.1 Introduction

1.1.1 Purpose of HotelsPro XML booking system


HotelsPro XML booking system is dedicated to the Travel and Tourism industry.

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).

Hotels can be booked with instant confirmation or on request.

Bookings can be cancelled through the XML booking 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.

1.1.2 Technical Requirements for XML affiliate:


1. Online website.

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

Each environment has separate software/configuration:

 Booking database
 URL for request/response

Please note: The hotel bookings made on the test system cannot be real (live) bookings.

Live environment is available by the link:

© 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

http://api.hotelspro.com/4.1/hotel/b2bHotelJSON.php

http://api.hotelspro.com/4.1/hotel/b2bHotelSOAP.php

Test environment is available by the link:

http://api.hotelspro.com/4.1_test/hotel/b2bHotelJSON.php

http://api.hotelspro.com/4.1_test/hotel/b2bHotelSOAP.php

XML request can be sent using SOAP protocol.

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.

1.3 Hotel Database


Before starting developing client needs to get HotelsPro hotel and information and store it in its own
database.

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 here, below page will be open:

After clicking on button ‘Update Files’ the system will start hotel data generating process. It can take
up to 2-3 hours.

The process will be shown with the loader .


© 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

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.

Also the data will be available by these links:

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

Each of those files contains affiliate and request/response information as:

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.

1.4 Hotels List


The file contains information for every hotel as:

1. HotelCode – unique hotel identifier in XML booking system;


2. OldHotelId – old hotel identifier (used in 1.0-1.2 versions, it is not needed for XML partners
who work with HotelsPro system version 3.0 or 4.0);
3. DestinationId – identifier of destination where the hotel is situated;
4. Destination – name of city where the hotel is situated;
5. Country;
6. HotelName;
7. StarRating - stars of the hotel (from 0 to 5);
8. HotelAddress – address of the hotel;
9. HotelPostalCode – zip code of the hotel address;
10. HotelPhoneNumber;
11. HotelArea – area of the hotel;
12. Chain – name of hotel chain;
13. Coordinates – latitude and longitude;
14. URLs for hotel images;

XML format:

<?xml version="1.0" encoding="UTF-8" ?>


- <XMLResponse>
<ResponseType>HotelListResponse</ResponseType>
- <RequestInfo>
<AffiliateCode>XX0000</AffiliateCode>
<AffRequestId>XXX</AffRequestId>
<AffRequestTime>yyyy-mm-ddThh:mm:ss</AffRequestTime>
</RequestInfo>
<TotalNumber>XXXXX</TotalNumber>
© 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

- <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>

1.5 Hotels Description


The file contains location information and text description for every hotel.

XML format:

<?xml version="1.0" encoding="UTF-8" ?>


- <XMLResponse>
<ResponseType>HotelListResponse</ResponseType>
- <RequestInfo>
<AffiliateCode>XX0000</AffiliateCode>
<AffRequestId>XX</AffRequestId>
<AffRequestTime>yyyy-mm-ddThh:mm:ss</AffRequestTime>
</RequestInfo>
<TotalNumber>XXXXX</TotalNumber>
- <Hotels>
- <Hotel>
<HotelCode>XXXXXX</HotelCode>
<OldHotelId>X/XXXXXXXX</OldHotelId>
<HotelLocation>Location information</HotelLocation>

© 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

<HotelInfo>Text detailed hotel description</HotelInfo>


<HotelType>Hotel type (if presented)</HotelType>
<HotelCategory>Hotel category (if presented)</HotelCategory>
<HotelStyle>Hotel style (if presented)</HotelStyle>
<HotelTheme>Hotel Theme (if presented)</HotelTheme>
</Hotel>
- <Hotel>
....
</Hotel>
....
</Hotels>
</XMLResponse>

1.6 Hotels Amenities


The file contains information about hotel and room amenities for every hotel:

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:

<?xml version="1.0" encoding="UTF-8" ?>


- <XMLResponse>
<ResponseType>HotelListResponse</ResponseType>
- <RequestInfo>
<AffiliateCode>XX0000</AffiliateCode>
<AffRequestId>XX</AffRequestId>
<AffRequestTime>yyyy-mm-ddThh:mm:ss</AffRequestTime>
</RequestInfo>
<TotalNumber>XXXXX</TotalNumber>
- <Hotels>
- <Hotel>
<HotelCode>XXXXXX</HotelCode>
<OldHotelId>X/XXXXXXXX</OldHotelId>
<PAmenities>PAmenity1;PAmenity2;...;PAmenityN</PAmenities>
<RAmenities>RAmenity1;RAmenity2;...;RAmenityN</RAmenities>
<RoomsNumber>number of rooms</RoomsNumber>
</Hotel>
- <Hotel>
....
</Hotel>
....
</Hotels>
</XMLResponse>

Optimally XML affiliate might download XML-formatted hotel information once a month and update
its own database.

© 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

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.

1.7 Multilingual Hotel Information


Hotelspro provides hotel information in Spanish, Turkish, Chinese, Russian.

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.

1.8 Destination List


The file contains information for every city as:

1. DestinationId - unique destination identifier in XML booking system;


2. Country - Country Name
3. City - City Name
4. State - State Code

XML format

<?xml version="1.0" encoding="UTF-8" ?>


- <XMLResponse>
<ResponseType>DestinationListResponse</ResponseType>
- <RequestInfo>
<AffiliateCode>XX0000</AffiliateCode>
<AffRequestId>XX</AffRequestId>
<AffRequestTime>yyyy-mm-ddThh:mm:ss</AffRequestTime>
</RequestInfo>
<TotalNumber>XXXXX</TotalNumber>
- <Destinations>
- <Destination>
<DestinationId>XXXX</DestinationId>
© 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

<Country>Name of country</Country>
<City>Name of city</City>
<State>State Code</State>
</Destination>
- <Destination>
....
</Destination>
....
</ Destinations>
</XMLResponse>

1.9 Multilingual Destination Information


Hotelspro provides destination information in Turkish, French, German, Chinese, Hungarian,
Portugese, Russian, Polish.

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

© 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 Files Debuging

2.1 Overview
Together with this documentation you received the following files:

 WSDL file

 PHP sample project (HotelsPro WS)

2.2 WSDL file


The WSDL file contains the formal description of the web service in XML format. The latest version
can be downloaded from

http://api.hotelspro.com/4.1/hotel/b2bHotelSOAP.wsdl - live environment

http://api.hotelspro.com/4.1_test/hotel/b2bHotelSOAP.wsdl - test environment

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 SOAP PHP sample project


The PHP sample project “HotelsPro WS” demonstrates the use of the methods and data types.

2.3.1 getAvailableHotel

2.3.1.1 PHP Code Sample :


<?php
// create SOAP client object
$client = new SoapClient("wsdl_hotel_path", array('trace' => 1));

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");

// make getAvailableHotel request (start search)


$checkAvailability = $client->getAvailableHotel("apiKey", "RHMK", "2011-
© 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

04-20", "2011-04-22", "EUR", "UK", "false", $rooms, $filters);


}
catch (SoapFault $exception) {
echo $exception->getMessage();
exit;
}
?>

responseId: <?php echo $checkAvailability->responseId?><br/>


searchId: <?php echo $checkAvailability->searchId?><br/>
totalFound: <?php echo $checkAvailability->totalFound?><br/>
<table border="1">
<thead>
<tr>
<th>processId</th>
<th>hotelCode</th>
<th>availabilityStatus</th>
<th>totalPrice</th>
<th>totalTax</th>
<th>totalSalePrice</th>
<th>currency</th>
<th>boardType</th>
<th>Room Data</th>
</tr>
</thead>
<tbody>
<?php
if (is_object($checkAvailability->availableHotels)) {
$hotelResponse[] = $checkAvailability->availableHotels;
} else {
$hotelResponse = $checkAvailability->availableHotels;
}
foreach ((array)$hotelResponse as $hnum => $hotel) {
?>
<tr>
<td><?php echo $hotel->processId?></td>
<td><?php echo $hotel->hotelCode?></td>
<td><?php echo $hotel->availabilityStatus?></td>
<td><?php echo $hotel->totalPrice?></td>
<td><?php echo $hotel->totalTax?></td>
<td><?php echo $hotel->totalSalePrice?></td>
<td><?php echo $hotel->currency?></td>
<td><?php echo $hotel->boardType?></td>
<td>
<?php
if (is_object($hotel->rooms)) {
$roomResponse[] = $hotel;
} else {
$roomResponse = $hotel->rooms;
}
foreach ((array)$roomResponse as $rnum => $room) {
?>
<table border="1" style="margin: 10px; width: 300px; float: left;">
© 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>
<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) {


echo $pax->paxType . " (" . $pax->age . ")<br/>";
}
?>
</td>
</tr>
<tr>
<td><b>ratesPerNight</b></td>
<td>
<?php
foreach ((array)$ratesPerNight as $rpnum => $price) {
echo $price->date;
?> (<?php echo $price->amount;?>)<br/>
<?php
}
?>
</td>
</tr>
</table>
<?php
unset($ratesPerNight);
unset($roomsInfo);
}
unset($roomResponse);
?>
</td>
</tr>
<?php
}
?>
© 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

</tbody>
</table>

2.3.2 allocateHotelCode

2.3.2.1 PHP Code Sample:


<?php
$client = new SoapClient($GLOBALS["wsdl_hotel_path"], array('trace' => 1));

try {
$allocateHotelCode = $client->allocateHotelCode("apiKey", $searchId, $hote
lCode);
}
catch (SoapFault $exception) {
$exception->getMessage();
exit;
}
?>

responseId: <?php echo $allocateHotelCode->responseId?><br/>


searchId: <?php echo $allocateHotelCode->searchId?><br/>
hotelCode: <?php echo $allocateHotelCode->hotelCode?><br/>
<table border="1">
<thead>
<tr>
<th>processId</th>
<th>availabilityStatus</th>
<th>totalPrice</th>
<th>totalTax</th>
<th>totalSalePrice</th>
<th>currency</th>
<th>boardType</th>
<th>Room Data</th>
</tr>
</thead>
<tbody>
<?php
if (is_object($allocateHotelCode->availableHotels)) {
$availableHotels[] = $allocateHotelCode->availableHotels;
} else {
$availableHotels = $allocateHotelCode->availableHotels;
}
foreach ($availableHotels as $hnum => $hotel) {
?>
<tr>
<td><?php echo $hotel->processId?>&nbsp;</td>
<td><?php echo $hotel->availabilityStatus?>&nbsp;</td>
<td><?php echo $hotel->totalPrice?>&nbsp;</td>
<td><?php echo $hotel->totalTax?>&nbsp;</td>
<td><?php echo $hotel->totalSalePrice?>&nbsp;</td>
<td><?php echo $hotel->currency?>&nbsp;</td>
<td><?php echo $hotel->boardType?>&nbsp;</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

<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;?>&nbsp;</td>
</tr>
<tr>
<td><b>Total Room Rate</b></td>
<td><?php echo $room->totalRoomRate;?>&nbsp;</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>

© 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

</table>
<?php
unset($ratesPerNight);
unset($roomsInfo);
}
unset($roomResponse);
?>
</td>
</tr>
<?php
}
?>
</tbody>
</table>

2.3.3 makeHotelBooking

2.3.3.1 PHP Code Sample:


<?php
$client = new SoapClient("wsdl_hotel_path", array('trace' => 1));

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);

© 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

}
catch (SoapFault $exception) {
echo $exception->getMessage();
exit;
}
?>

responseId: <?php echo $makeHotelBooking->responseId?><br/>


trackingId: <?php echo $makeHotelBooking->trackingId?><br/>
<table border="1">
<thead>
<tr>
<th>bookingStatus</th>
<th>checkIn</th>
<th>checkOut</th>
<th>boardType</th>
<th>Room Data</th>
<th>cancellationPolicy</th>
<th>comments</th>
</tr>
</thead>
<tbody>
<?php
if (false == empty($hotel)) {
?>
<tr>
<td><?php echo $hotel->bookingStatus;?></td>
<td><?php echo $hotel->checkIn;?></td>
<td><?php echo $hotel->checkOut;?></td>
<td><?php echo $hotel->boardType;?></td>
<td>
<?php
foreach ($rooms as $room) {
?>
<table border="1" style="margin: 10px; width: 350px; float: left;">
<tr>
<td><b>Room <?php echo($room + 1);?> Category</b></td>
<td><?php echo $room->roomCategory;?>&nbsp;</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
$paxes = is_array($room->paxes) ? $room->paxes : array($room->paxes);
?>
<?php
foreach ($paxes as $pax) {
?>
<?php echo "{$pax->title} $pax->firstName $pax->lastName - {$pax-
© 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

>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;?>&nbsp;</td>
<td><?php echo $policy->feeType;?>&nbsp;</td>
<td><?php echo $policy->feeAmount;?>&nbsp;</td>
<td><?php echo $policy->currency; ?>&nbsp;</td>
<td><?php echo $policy->remarks; ?>&nbsp;</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>
<?php
}
?>

</tbody>
</table>
</td>
<td><?php echo $hotel->comments;?>&nbsp;</td>
</tr>
<?php
}
?>
</tbody>
</table>

2.3.4 getHotelBookingStatus

2.3.4.1 PHP Code Sample:


<?php
$client = new SoapClient("wsdl_hotel_path", array('trace' => 1));

try {
$getHotelBookingStatus = $client->getHotelBookingStatus("apiKey", $trackin
gId);
}
catch (SoapFault $exception) {
echo $exception->getMessage();
exit;
}
?>

responseId: <?php echo $getHotelBookingStatus->responseId?><br/>


trackingId: <?php echo $getHotelBookingStatus->trackingId?><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>totalSalePrice</th>
<th>currency</th>
<th>boardType</th>
<th>agencyReferenceNumber</th>
<th>comments</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>
<tr>
<td><?php echo $getHotelBookingStatus->hotelBookingInfo->bookingStatus;?
>&nbsp;</td>
<td><?php echo $getHotelBookingStatus->hotelBookingInfo-
>confirmationNumber;?>&nbsp;</td>
<td><?php echo $getHotelBookingStatus->hotelBookingInfo->hotelCode;
?>&nbsp;</td>
<td><?php echo $getHotelBookingStatus->hotelBookingInfo->checkIn;
?>&nbsp;</td>
<td><?php echo $getHotelBookingStatus->hotelBookingInfo->checkOut;
?>&nbsp;</td>
<td><?php echo $getHotelBookingStatus->hotelBookingInfo->totalPrice;
?>&nbsp;</td>
<td><?php echo $getHotelBookingStatus->hotelBookingInfo->totalSalePrice;
?>&nbsp;</td>
<td><?php echo $getHotelBookingStatus->hotelBookingInfo->currency;
?>&nbsp;</td>
<td><?php echo $getHotelBookingStatus->hotelBookingInfo->boardType;
?>&nbsp;</td>
<td><?php echo $getHotelBookingStatus->hotelBookingInfo-
>agencyReferenceNumber;
?>&nbsp;</td>
<td><?php echo $getHotelBookingStatus->hotelBookingInfo->comments;
?>&nbsp;</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);

foreach ($rooms as $room) {


$paxes = is_array($room->paxes) ? $room->paxes : array($room->paxes);
foreach ($paxes as $pax) {
?>
<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

<td><?php echo $pax->paxType;?>&nbsp;</td>


<td><?php echo $pax->title;?>&nbsp;</td>
<td><?php echo $pax->firstName;?>&nbsp;</td>
<td><?php echo $pax->lastName;?>&nbsp;</td>
<td><?php echo $pax->age;?>&nbsp;</td>
</tr>
<?php
}
}
?>

<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>&nbsp;</td>
<td><?php echo $price->date;?>&nbsp;</td>
<td><?php echo $price->amount;?>&nbsp;</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;?>&nbsp;</td>
<td><?php echo $policy->feeType;?>&nbsp;</td>
<td><?php echo $policy->feeAmount;?>&nbsp;</td>
<td><?php echo $policy->currency;?>&nbsp;</td>
<td><?php echo $policy->remarks;?>&nbsp;</td>
</tr>
<?php
}
?>
</tbody>
</table>

2.3.5 cancelHotelBooking

2.3.5.1 PHP Code Sample:


<?php
$client = new SoapClient("wsdl_hotel_path", array('trace' => 1));

try {
$cancelHotelBooking = $client->cancelHotelBooking("apiKey", $trackingId);
}
catch (SoapFault $exception) {
echo $exception->getMessage();
exit;
}
?>

responseId: <?php echo $cancelHotelBooking->responseId?><br/>


trackingId: <?php echo $cancelHotelBooking->trackingId?><br/>
<table border="1">
<thead>
<tr>
<th>agencyReferenceNumber</th>
<th>bookingStatus</th>
<th>note</th>
</tr>
</thead>
<tbody>
<tr>
<td><?php echo $cancelHotelBooking->agencyReferenceNumber;?>&nbsp;</td>
<td><?php echo $cancelHotelBooking->bookingStatus;?>&nbsp;</td>
<td><?php echo $cancelHotelBooking->note;?>&nbsp;</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>

2.3.6 getHotelCancellationPolicy

2.3.6.1 PHP Code Sample:


<?php
$client = new SoapClient("wsdl_hotel_path", array('trace' => 1));

try {
$getHotelCancellationPolicy = $client-
>getHotelCancellationPolicy("apiKey", $processId, $hotelCode);
}
catch (SoapFault $exception) {
echo $exception->getMessage();
exit;
}
?>

responseId: <?php echo $getHotelCancellationPolicy->responseId?><br/>


processId: <?php echo $processId?><br/>
hotelCode: <?php echo $hotelCode?><br/>
<?php
}
?>
<table border="1">
<thead>
<tr>
<th>cancellationDay</th>
<th>feeType</th>
<th>feeAmount</th>
<th>currency</th>
<th>remarks</th>
</tr>
</thead>
<tbody>
<?php
$policies = is_array($getHotelCancellationPolicy->cancellationPolicy) ? $getHote
lCancellationPolicy->cancellationPolicy : array($getHotelCancellationPolicy-
>cancellationPolicy);
foreach ($policies as $policy) {
?>
<tr>
<td><?php echo $policy->cancellationDay;?>&nbsp;</td>
<td><?php echo $policy->feeType;?>&nbsp;</td>
<td><?php echo $policy->feeAmount;?>&nbsp;</td>
<td><?php echo $policy->currency;?>&nbsp;</td>
<td><?php echo $policy->remarks;?>&nbsp;</td>
</tr>
<?php
© 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

}
?>
</tbody>
</table>

2.3.7 amendHotelBooking

2.3.7.1 PHP Code Sample:


<?php
$client = new SoapClient("wsdl_hotel_path", array('trace' => 1));

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";

$amendHotelBooking = $client->amendHotelBooking("apiKey", $trackingId, "20


11-11-15", "2011-11-17", $leadTravellerInfo, $rooms, $preferences, $note);
}
catch (SoapFault $exception) {
echo $exception->getMessage();
exit;
}
?>

responseId: <?php echo $amendHotelBooking->responseId?><br/>


trackingId: <?php echo $amendHotelBooking->trackingId?><br/>
<table border="1">
<thead>
<tr>
<th>amendStatus</th>
<th>note</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>
<tr>
<td><?php echo $amendHotelBooking->amendStatus;?>&nbsp;</td>
<td><?php echo $amendHotelBooking->note;?>&nbsp;</td>
</tr>
<tbody>
</table>

2.3.8 getBalance

2.3.8.1 PHP Code Sample:


<?php
$client = new SoapClient("wsdl_hotel_path", array('trace' => 1));

try {
$getBalance = $client->getBalance("apiKey");
}
catch (SoapFault $exception) {
echo $exception->getMessage();
exit;
}
?>

Deposit Currency : <?php echo $getBalance->currency?><br/>


Total Deposit: <?php echo $getBalance->totalDeposit?><br/>
Total Booking Amount: <?php echo $getBalance->totalBookingAmount
?><br/>
Currenct Balance: <?php echo $getBalance->currentBalance?><br/>

2.3.9 getHotelBookingList

2.3.9.1 PHP Code Sample:


<?php
$client = new SoapClient("wsdl_hotel_path", array('trace' => 1));

try {
$getHotelBookingList = $client->getHotelBookingList("apiKey", "bookDateFrom",
"bookDateTo", "checkInFrom", "checkInTo", "checkOutFrom", "checkOutTo",
"bookingStatus");
} catch (SoapFault $exception) {
echo $_GET["debug"] ? $client->__getLastResponse() : $exception->getMessage();
exit;
}
?>

responseId: <?php echo $getHotelBookingList->responseId ?><br/>


totalBookingFound: <?php echo $getHotelBookingList->totalBookingFound ?><br/>
<?php

© 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

$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; ?
>&nbsp;</td>
<td><?php echo $getHotelBookingStatus->hotelBookingInfo-
>confirmationNumber; ?>&nbsp;</td>
<td><?php echo $getHotelBookingStatus->hotelBookingInfo->hotelCode; ?
>&nbsp;</td>
<td><?php echo $getHotelBookingStatus->hotelBookingInfo->checkIn; ?
>&nbsp;</td>
<td><?php echo $getHotelBookingStatus->hotelBookingInfo->checkOut; ?
>&nbsp;</td>
<td><?php echo $getHotelBookingStatus->hotelBookingInfo->totalPrice; ?
>&nbsp;</td>
<td><?php echo $getHotelBookingStatus->hotelBookingInfo->currency; ?
>&nbsp;</td>
<td><?php echo $getHotelBookingStatus->hotelBookingInfo->boardType; ?
>&nbsp;</td>
<td><?php echo $getHotelBookingStatus->hotelBookingInfo-
>agencyReferenceNumber; ?>&nbsp;</td>
<td><?php echo $getHotelBookingStatus->hotelBookingInfo->comments; ?
>&nbsp;</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);

foreach ($rooms as $room) {


$paxes = is_array($room->paxes) ? $room->paxes : array($room->paxes);
foreach ($paxes as $pax) {
?>
<tr>
<td><?php echo $pax->paxType; ?>&nbsp;</td>
<td><?php echo $pax->title; ?>&nbsp;</td>
<td><?php echo $pax->firstName; ?>&nbsp;</td>
<td><?php echo $pax->lastName; ?>&nbsp;</td>
<td><?php echo $pax->age; ?>&nbsp;</td>
</tr>
<?
}
}
?>

<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>

© 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>Day</th>
<th>Amount</th>
</tr>
<?
foreach ($prices as $price) {
?>
<tr>
<td>&nbsp;</td>
<td><?php echo $price->date; ?>&nbsp;</td>
<td><?php echo $price->amount; ?>&nbsp;</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; ?>&nbsp;</td>
<td><?php echo $policy->feeType; ?>&nbsp;</td>
<td><?php echo $policy->feeAmount; ?>&nbsp;</td>
<td><?php echo $policy->currency; ?>&nbsp;</td>
<td><?php echo $policy->remarks; ?>&nbsp;</td>
</tr>
<?
}
?>
</tbody>
</table>
<?
}
?>

© 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.4 JSON sample project


The json sample project “HotelsPro WS” demonstrates the use of the methods and data types.

2.4.1 getAvailableHotel

2.4.1.1 JSON Request Sample :


http://api.hotelspro.com/4.1_test/hotel/b2bHotelJSON.php?
method=getAvailableHotel&apiKey=eGFMWDBjYmVqcnFPNFpQMHBsVytlaUhGNzR6dkFBcU1xRXl3
WkcrV0hLdTlLSzVZT3NyYXFDZlc5a0xOQWtoWg==&destinationId=LD6J&checkIn=2011-04-
20&checkOut=2011-04-
24&currency=EUR&clientNationality=UK&onRequest=false&rooms[0][0]
[paxType]=Adult&rooms[0][1][paxType]=Adult&rooms[0][2][paxType]=Child&rooms[0]
[2][age]=6&rooms[1][0][paxType]=Adult&rooms[1][1][paxType]=Adult&rooms[1][2]
[paxType]=Child&rooms[1][2][age]=8&filters[0][filterType]=hotelStar&filters[0]
[filterValue]=3&filters[1][filterType]=resultLimit&filters[1][filterValue]=10

2.4.2 allocateHotelCode

2.4.2.1 JSON Request Sample:


http://api.hotelspro.com/4.1_test/hotel/b2bHotelJSON.php?
method=allocateHotelCode&apiKey=eGFMWDBjYmVqcnFPNFpQMHBsVytlaUhGNzR6dkFBcU1xRXl3
WkcrV0hLdTlLSzVZT3NyYXFDZlc5a0xOQWtoWg==&searchId=IG-73375984&hotelCode=UKIRET

2.4.3 makeHotelBooking

2.4.3.1 JSON Request Sample:


http://api.hotelspro.com/4.1_test/hotel/b2bHotelJSON.php?
method=makeHotelBooking&apiKey=eGFMWDBjYmVqcnFPNFpQMHBsVytlaUhGNzR6dkFBcU1xRXl3W
kcrV0hLdTlLSzVZT3NyYXFDZlc5a0xOQWtoWg==&processId=HG-
52628524&agencyReferenceNumber=&leadTravellerInfo[paxInfo]
[paxType]=Adult&leadTravellerInfo[paxInfo][title]=Mr&leadTravellerInfo[paxInfo]
[firstName]=John&leadTravellerInfo[paxInfo]
[lastName]=DOE&leadTravellerInfo[nationality]=UK&otherTravellerInfo[0]
[title]=Mr&otherTravellerInfo[0][firstName]=Ahmetr&otherTravellerInfo[0]
[lastName]=AY&otherTravellerInfo[1][title]=Mr&otherTravellerInfo[1]
[firstName]=Mehmet&otherTravellerInfo[1]
[lastName]=YILDIZ&preferences=nonSmoking&note=test%20note&hotelCode=XX1234

2.4.4 getHotelBookingStatus

2.4.4.1 JSON Request Sample:


http://api.hotelspro.com/4.1_test/hotel/b2bHotelJSON.php?
method=getHotelBookingStatus&apiKey=eGFMWDBjYmVqcnFPNFpQMHBsVytlaUhGNzR6dkFBcU1x
RXl3WkcrV0hLdTlLSzVZT3NyYXFDZlc5a0xOQWtoWg==&trackingId=XI-HV-67353988

© 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.4.5 cancelHotelBooking

2.4.5.1 JSON Request Sample:


http://api.hotelspro.com/4.1_test/hotel/b2bHotelJSON.php?
method=cancelHotelBooking&apiKey=eGFMWDBjYmVqcnFPNFpQMHBsVytlaUhGNzR6dkFBcU1xRXl
3WkcrV0hLdTlLSzVZT3NyYXFDZlc5a0xOQWtoWg==&trackingId=XI-HY-23449598

2.4.6 getHotelCancellationPolicy

2.4.6.1 JSON Request Sample:


http://api.hotelspro.com/4.1_test/hotel/b2bHotelJSON.php?
method=getHotelCancellationPolicy&apiKey=eGFMWDBjYmVqcnFPNFpQMHBsVytlaUhGNzR6dkF
BcU1xRXl3WkcrV0hLdTlLSzVZT3NyYXFDZlc5a0xOQWtoWg==&trackingId=XI-HG-
52628524&hotelcode=FR1234

2.4.7 amendHotelBooking

2.4.7.1 JSON Request Sample:


http://api.hotelspro.com/4.1_test/hotel/b2bHotelJSON.php?
method=amendHotelBooking&apiKey=eGFMWDBjYmVqcnFPNFpQMHBsVytlaUhGNzR6dkFBcU1xRXl3
WkcrV0hLdTlLSzVZT3NyYXFDZlc5a0xOQWtoWg==&trackingId=XI-HV-67353988&checkIn=2011-
11-15&checkOut=2011-11-17&leadTravellerInfo[paxInfo]
[paxType]=Adult&leadTravellerInfo[paxInfo][title]=Mr&leadTravellerInfo[paxInfo]
[firstName]=John&leadTravellerInfo[paxInfo]
[lastName]=DOE&leadTravellerInfo[nationality]=UK&rooms[0][0]
[paxType]=Adult&rooms[0][0][title]=Mr&rooms[0][0][firstName]=test&rooms[0][0]
[lastName]=test&rooms[0][1][paxType]=Child&rooms[0][1][title]=Mr&rooms[0][1]
[firstName]=test3&rooms[0][1][lastName]=test3&rooms[0][1][age]=2&rooms[0][1]
[paxType]=Child&rooms[0][1][title]=Mr&rooms[0][1][firstName]=test4&rooms[0][1]
[lastName]=test4&rooms[0][1][age]=1&rooms[1][0][paxType]=Adult&rooms[1][0]
[title]=Mr&rooms[1][0][firstName]=test5&rooms[1][0][lastName]=test5&rooms[1][1]
[paxType]=Adult&rooms[1][1][title]=Mr&rooms[1][1][firstName]=test2&rooms[1][1]
[lastName]=test2&preferences=nonSmoking&note=test%20note

2.4.8 getBalance

2.4.8.1 JSON Request Sample:


http://api.hotelspro.com/4.1_test/hotel/b2bHotelJSON.php?
method=getBalance&apiKey=eGFMWDBjYmVqcnFPNFpQMHBsVytlaUhGNzR6dkFBcU1xRXl3WkcrV0h
LdTlLSzVZT3NyYXFDZlc5a0xOQWtoWg==

2.4.9 getHotelBookingList

2.4.9.1 JSON Request Sample:


http://api.hotelspro.com/4.1_test/hotel/b2bHotelJSON.php?
method=getHotelBookingList&apiKey=eGFMWDBjYmVqcnFPNFpQMHBsVytlaUhGNzR6dkFBcU1xRX
© 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

l3WkcrV0hLdTlLSzVZT3NyYXFDZlc5a0xOQWtoWg==&bookDateFrom=2014-06-
01&bookDateTo=2014-06-30&checkInFrom=2014-08-16&checkInTo=2014-08-
16&bookingStatus=1

© 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 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

© 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.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.

Please note: We strongly recommend to use getHotelCancellationPolicy method for getting


detailed infomation about cancellation policy and cancellation penalty before makeHotelBooking
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: booking cancellation cannot be made on or after CheckIn date.

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

responseId Int. Id of response for debugging Yes


trackingId String unique HotelsPro booking reference received in Yes
MakeHotelBookingResponse;
agencyReferenceNumber String Agency’s booking reference number No
bookingStatus String status of cancellation: it can be ‘Cancelled’ or Yes
‘Cancellation Processing’; If status is ‘Cancelled’
it means that the booking was cancelled
successfully. If status is ‘Cancellation
Processing’ it means that: 1) the booking could
not be cancelled immediately, but cancellation
request is received by HotelsPro specialists,
they will cancel the booking and send
confirmation mail to the client; 2) cancellation is
being made after the cancellation period of this
booking (after the deadline), a cancellation
charge of at least one night stay will occur..
note String note of cancellation. If CancellationStatus is No
‘Cancelled’ then in Note the following text will be
sent: ‘Booking has been cancelled
successfully.’ If CancellationStatus is
‘Cancellation Processing’ then in Note the
following text will be sent: ‘Your cancellation
request has been received’ or ‘Your cancellation
request has been received. Cancellation is being
made within the cancellation period for this
booking. A cancellation charge of at least one
night stay will occur’.

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.

Below is a fragment of XML response with non-refundable cancellation policy:

<item xsi:type="ns1:policy">

<cancellationDay xsi:type="xsd:integer">1001</cancellationDay>

© 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
<feeType xsi:type="xsd:string">Percent</feeType>

<feeAmount xsi:type="xsd:float">100</feeAmount>

<remarks xsi:type="xsd:string"></remarks>

</item>

In case of non-refundable cancellation policy we recommend to display a special text to make it


clear to your customer that this booking is non-refundable. Here is an example of this text:

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).

Below is a fragment of XML response with no-show policy:

<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.

Please note: Non-refundable bookings cannot be amended.

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

© 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

preferences String smoking/nonSmoking No


note String Notes for amendment request No

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

© 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 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.

3.2.2 leadTraveller Element


Variable Type Description Mandatory
paxInfo Element pax Element Yes
nationality String Client nationality (ISO code 2 letters). List of supported Yes
codes are in Appendix 4.4

3.2.3 filter Element


Variable Type Description Mandatory
filterType Enum hotelCode / hotelName / hotelStar / boardType / Limit Yes
filterValue String Yes
boardType filter possible values are below:

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

hotelName filter value should be a string with a minimum lenght 3 letters.

3.2.4 hotel Element


Variable Type Description Mandatory
processId String unique identifier of search result for available room (or Yes
combination of rooms in case of multiple room search). If the
client wants to book the room or the combination of rooms, this
identifier needs to be sent in book request
hotelCode String Hotel identifier Yes
availabilityStatus Enum status of hotel availability: it can be InstantConfirmation or Yes
OnRequest;
specialDeal Int. Code for special deal No
Code Explanation

2 Special Discount

3 Special Offer

4 Board Type Upgrade

5 Free Transportation

6 Free Parking

7 Free Upgrade

8 Free Meal

9 Free Child

10 Free Person

11 Early Booking Discount

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

3.2.5 roomResponse Element


Variable Type Description Mandatory
roomCategory String text description of room category, it can be ‘Standard Room’, Yes
‘Deluxe Room’ and etc.;
paxes Array Array of pax elements array Yes
totalRoomRate Float total rate for the room for all nights of the stay including all taxes Yes
and fees;
ratesPerNight Array Array of dailyRate element Yes

3.2.6 dailyRate Element


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

date Date date of night of the stay Yes


amount Float Rate for the room for the night including all taxes and fees Yes

3.2.7 bookInfo Element


Variable Type Description Mandatory
bookingStatus Enum status of booking; Yes
it can be:
1- confirmed booking,
2- on request booking,
3- rejected booking,
4- cancelled booking,
5- payment processing
confirmationNumber String confirmation number (please be sure that this number Yes
is printed on a customer voucher)
supplier String Supplier name No
hotelCode String identifier of booked hotel Yes
checkIn Date check-in date in format ‘yyyy-mm-dd’ Yes
checkOut Date check-out date in format ‘yyyy-mm-dd’ Yes
totalPrice Float total price for all nights of the stay including all taxes Yes
and fees
totalSalePrice Float recommended sale price for the end-customer; Yes
currency String currency ISO code Yes
boardType String type of board (for example ‘Room Only’, ‘Bed and Yes
Breakfast’), it shows what is included in total price of
the stay
rooms Array Array of pax elements array Yes
cancellationPolicy Array Array of policy element Yes
agencyReferenceNumber String XML affiliate’s booking reference number. No
GetBookingStatus response will contain the same
value of AgencyReferenceNumber which were sent in
MakeHotelBooking request.
comments String Comments of booking No

3.2.8 policy Element


Variable Type Description Mandatory
cancellationDay Int. Days before checkin date when cancellation fee is Yes
applied.
feeType Enum Percent / Amount / Night Yes
feeAmount Float Fee amount Yes
currency String Currency ISO Code of total fee amount No
remarks String Remarks for policy element. If it is not empty then it No
should be displayed on your website together with
cancellation policy details.

3.2.9 bookingArray Element


Variable Type Description Mandatory
trackingId String Unique HotelsPro booking reference Yes
bookingTime Date / Date and time when booking was made (EEST) Yes
Time
hotelName String Name of booked hotel Yes
destinationId String Identifier of destination 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

cityName String Destination Name Yes


bookingSource String Can be API (booking made via HotelsPro API) or WEB- Yes
B2B (booking made via HotelsPro B2B website)
staffId String Identifier of user Yes
hotelBookingInfo Element bookInfo element Yes

4 Appendix

4.1 List of error codes

501 - Invalid apikey


502 - Invalid currency code
503 - Invalid city code
504 - Invalid date format! Please use YYYY-mm-dd format.
505 - Check-in date can not be earlier than Check-out date
506 - City could not found! Please check your city code.
507 - Destination is not available.
508 - Invalid onrequest type
509 - Invalid filter type
510 - Multiple hotelcode is not allowed
511 - Maximum number of hotelstar filter is 5
512 - Hotel star must be between 2 and 5
513 - Maximum number of board type filter is 8
514 - Hotel code could not find
515 - Hotel name could not find
516 - Multiple hotelname does not allow
517 - Invalid hotel name (it should be minimum: 3 characters, maximum: 50 characters)
518 - Incorrect CheckIn date (it can not be earlier today or later today+1year)
519 - Incorrect CheckOut date (it must be later CheckIn date)
520 - Hotel can not be reserved for more than 30 nights
521 - Please use your account's balance currency for CheckAvailability request
522 - Incorrect number of rooms in XML request (minimum: 1 room, maximum: 5 rooms)
523 - Invalid number of adults per room (maximum 6 adults per room)
524 - There must be at least 1 adult per room in the request
525 - Invalid number of paxes per room (maximum 6 paxes per room)
526 - Invalid number of children per room (maximum 4 children per room)
527 - Invalid nationality code
528 - Children ages are not defined in the request
529 - Invalid hotel code
530 - Invalid search code
531 - Invalid hotel code
532 - Empty or missed ProcessId
533 - Expired or incorrect ProcessId
534 - Invalid pax type
535 - Empty or missed pax name information
536 - Maximum number of result limit type filter is 1
537 - Result limit must be type of integer
538 - Empty or missed TrackingId
539 - Expired or incorrect TrackingId
540 - Invalid time format
541 - Invalid search id
542 - There is no search result with this hotel code
© 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

543 - Empty or missed Client information.


544 - Client nationality in getAvailabilityHotel and makeHotelBooking requests can not be different
545 - Client Nationality can not be empty
546 - Empty or missed Other traveller information.
547 - Search pax count and book pax count must be equal
548 - Invalid preferences value in MakeHotelBooking XML request
556 - Dublicate hotel booking
557 - Affiliate's deposit is not enough to make the booking
558 - The affiliate doesn't have permission to make LastMinute bookings
560 - The affiliate doesn't have permission to make bookings for Non-Refundable Hotels
561 - Booking has been made by different affiliate
562 - Hotel booking amendment can not be made on or after CheckIn date
563 - Hotel booking has been cancelled already
564 - Hotel booking cancellation can not be made on or after CheckIn date
565 - Affiliate is not activated
566 - Affiliate is deactivated
567 - Affiliate doesn't have permission for this XML request type
568 - This special allotment rate for the hotel has just been sold out. Therefore your booking is not
completed. No payment transaction has been made for this booking
569 - This is a duplicate booking. This user has already booked a hotel for the same client and the
same check in date.
570 - getHotelCancellationPolicy method cannot be used before allocateHotelCode method. Please
make sure that the order of the methods is correct: 1 - allocateHotelCode; 2 –
getHotelCancellationPolicy.
571 - makeHotelBooking method cannot be used without sending allocateHotelCode before it.
572 - The room is not available anymore. Please select another room or make a new search.
573 - Both dates (From / To) should be presented in getHotelBookingList request
574 - At least one date period should be presented in getHotelBookingList request
575 - Date period cannot be less than 0 days or more than 31 days in getHotelBookingList request
576 - Invalid value for bookingStatus. It should be one of the values: 1, 2, 3, 4 or 5 in
getHotelBookingList request

4.2 Cancellation Policy and Fee examples


getHotelCancellationPolicy response returns element cancellationPolicy

<cancellationPolicy>
<item>
<cancellationDay>number of days</cancellationDay>
<feeType>Percent/Amount/Night</feeType>
<feeAmount>x</feeAmount>
<Currency>Code of currency</Currency>
</item>
.......
</CancellationPolicy>

If feeType is Percent then cancellation charge will be % from total amount.


For example,

<cancellationPolicy>
<item>
<cancellationDay>3</cancellationDay>
<feeType>Percent</feeType>
<feeAmount>50</feeAmount>
</item>
</cancellationPolicy>

© 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

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.

If feeType is Amount then cancellation charge will be fixed amount.


For example,

<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.

If feeType is Night then cancellation charge will be night rates.


For example,

<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

The importance of allocateHotelCode request.


Please make sure that you send allocateHotelCode request before booking in order to get real
time rates and availability.
getAvailableHotel method returns cached rates and availability. That is why allocateHotelCode
should be used before booking.
Please note that allocateHotelCode response may contain slightly higher or lower rates, different
processids and different room types then getAvailableHotel response. 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.

The order of allocateHotelCode and getHotelCancellationPolicy requests.


Please note that after getAvailableHotel request firstly you should send allocateHotelCode
request because this method gets real time rates and availability rates for a selected hotel. And
after that you should send getHotelCancellationPolicy request with processId from
allocateHotelCode response. In this case you will get cancellation policy for a real time rate for a
selected room.

© 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

4.4 List of supported client nationality codes


code country name

AF Afghanistan

AX Aland Islands

AL Albania

DZ Algeria

AS American Samoa

AD Andorra

AO Angola

AI Anguilla

AQ Antarctica

AG Antigua And Barbuda

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

© 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

BT Bhutan

BO Bolivia

BA Bosnia And Herzegovina

BW Botswana

BV Bouvet Island

BR Brazil

IO British Indian Ocean Territory

VG British Virgin Islands

BN Brunei Darussalam

BG Bulgaria

BF Burkina Faso

BI Burundi

KH Cambodia

CM Cameroon

CA Canada

CV Cape Verde

KY Cayman Islands

CF Central African Republic

TD Chad

CL Chile

CN China

CX Christmas Island

CC Cocos (Keeling) Islands

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

CD Democratic Republic Of The Congo

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

FK Falkland Islands (Malvinas)

FO Faroe Islands

FJ Fiji

FI Finland

FR France

GF French Guiana

PF French Polynesia

TF French Southern Territories

GA Gabon

GM Gambia

© 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

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

HM Heard And McDonald Islands

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

LY Libyan Arab Jamahiriya

LI Liechtenstein

LT Lithuania

LU Luxembourg

MO Macau

MK Macedonia

MG Madagascar

MW Malawi

MY Malaysia

MV Maldives

ML Mali

© 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

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

MP Northern Mariana Islands

NO Norway

OM Oman

PK Pakistan

PW Palau

PS Palestinian Territory

PA Panama

PG Papua New Guinea

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

KN Saint Kitts And Nevis

LC Saint Lucia

MF Saint Martin

PM Saint Pierre And Miquelon

© 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

VC Saint Vincent And The Grenadines

WS Samoa

SM San Marino

ST Sao Tome And Principe

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

GS South Georgia And Sandwich Islands

ES Spain

LK Sri Lanka

SD Sudan

SR Suriname

SJ Svalbard And Jan Mayen

SZ Swaziland

SE Sweden

CH Switzerland

SY Syrian Arab Republic

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

TT Trinidad And Tobago

TN Tunisia

TR Turkey

TM Turkmenistan

TC Turks And Caicos Islands

TV Tuvalu

UG Uganda

UA Ukraine

AE United Arab Emirates

UK United Kingdom

US United States

UY Uruguay

UM US Minor Outlying Islands

VI US Virgin Islands

UZ Uzbekistan

VU Vanuatu

VA Vatican City State (Holy See)

VE Venezuela

VN Vietnam

WF Wallis And Futuna

EH Western Sahara

YE Yemen

© 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

ZM Zambia

ZW Zimbabwe

© MetGlobal 2020 www.hotelspro.com


Author: Unal TASDIZEN Document Status: Live
32

You might also like