Vous êtes sur la page 1sur 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
n
4.0.0.1
4.0.0.2

Date

4.0.0.3
4.0.0.4
4.0.0.9
4.1.0.1
4.1.0.2
4.1.1.0
4.1.1.1
4.1.1.2

10/01/2011
01/03/2011
03/03/2011
27/05/2011
23/03/2012
18/07/2012
02/12/2013
14/10/2014

19/10/2010
27/10/2010

Description
Template document created
General, Methods, Elements sections
are created
General Section completed
Document updated
Document completed
WSDL changed
Document updated
Document updated
Document updated
Document updated

MetGlobal 2015
Author: Unal TASDIZEN

www.hotelspro.com

32

Document Status: Live

Modification

Author
Cuneyt CAVA
Unal TASDIZEN
Olga OVALI
Cuneyt CAVA
Cuneyt CAVA
Cuneyt CAVA
Olga OVALI
Olga OVALI
Olga OVALI
Olga OVALI

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 clients 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 2015
Author: Unal TASDIZEN

www.hotelspro.com

32

Document Status: Live

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 2015
Author: Unal TASDIZEN

www.hotelspro.com

32

Document Status: Live

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.
2.
3.
4.
5.

ResponseType;
AffiliateCode code of the XML affiliate;
AffRequestId affiliate request identifier;
AffRequestTime time when request for hotel list was sent;
TotalNumber total number of HotelsPro hotels in XML file.

1.4 Hotels List


The file contains information for every hotel as:
HotelCode unique hotel identifier in XML booking system;
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);
DestinationId identifier of destination where the hotel is situated;
Destination name of city where the hotel is situated;
Country;
HotelName;
StarRating - stars of the hotel (from 0 to 5);
HotelAddress address of the hotel;
HotelPostalCode zip code of the hotel address;
HotelPhoneNumber;
HotelArea area of the hotel;
Chain name of hotel chain;
Coordinates latitude and longitude;
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>
MetGlobal 2015
Author: Unal TASDIZEN

www.hotelspro.com

32

Document Status: Live

Project Name: HotelsPro XML 4.1 Hotel


Document Number / Version Number: v1.1
<TotalNumber>XXXXX</TotalNumber>
- <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>
MetGlobal 2015
Author: Unal TASDIZEN

www.hotelspro.com

32

Document Status: Live

Project Name: HotelsPro XML 4.1 Hotel


Document Number / Version Number: v1.1
<HotelLocation>Location information</HotelLocation>
<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:

PAmenities list of property (hotel) amenities which are separated by symbol ;


RAmenities list of room amenities which are separated by symbol ;
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 2015
Author: Unal TASDIZEN

www.hotelspro.com

32

Document Status: Live

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 clients 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
Spanish
Chinese
Turkish
Russian

File
http://www.hotelspro.com/xf_4.0/multi-lang/hotelinfo.es.zip
http://www.hotelspro.com/xf_4.0/multi-lang/hotelinfo.cn.zip
http://www.hotelspro.com/xf_4.0/multi-lang/hotelinfo.tr.zip
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.
2.
3.
4.

DestinationId - unique destination identifier in XML booking system;


Country - Country Name
City - City Name
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>
MetGlobal 2015
Author: Unal TASDIZEN

www.hotelspro.com

32

Document Status: Live

Project Name: HotelsPro XML 4.1 Hotel


Document Number / Version Number: v1.1
<DestinationId>XXXX</DestinationId>
<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
Turkish
French
German
Chinese
Hungarian
Portugese
Russian
Polish

File
http://www.hotelspro.com/xf_4.0/multi-lang/destinationinfo.tr.zip
http://www.hotelspro.com/xf_4.0/multi-lang/destinationinfo.fr.zip
http://www.hotelspro.com/xf_4.0/multi-lang/destinationinfo.de.zip
http://www.hotelspro.com/xf_4.0/multi-lang/destinationinfo.zh.zip
http://www.hotelspro.com/xf_4.0/multi-lang/destinationinfo.hu.zip
http://www.hotelspro.com/xf_4.0/multi-lang/destinationinfo.pt.zip
http://www.hotelspro.com/xf_4.0/multi-lang/destinationinfo.ru.zip
http://www.hotelspro.com/xf_4.0/multi-lang/destinationinfo.pl.zip

MetGlobal 2015
Author: Unal TASDIZEN

www.hotelspro.com

32

Document Status: Live

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)
MetGlobal 2015
Author: Unal TASDIZEN

www.hotelspro.com

32

Document Status: Live

Project Name: HotelsPro XML 4.1 Hotel


Document Number / Version Number: v1.1
$checkAvailability = $client->getAvailableHotel("apiKey", "RHMK", "201104-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) {
?>
MetGlobal 2015
Author: Unal TASDIZEN

www.hotelspro.com

32

Document Status: Live

Project Name: HotelsPro XML 4.1 Hotel


Document Number / Version Number: v1.1
<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) {
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 2015
Author: Unal TASDIZEN

www.hotelspro.com

32

Document Status: Live

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>

MetGlobal 2015
Author: Unal TASDIZEN

www.hotelspro.com

32

Document Status: Live

Project Name: HotelsPro XML 4.1 Hotel


Document Number / Version Number: v1.1
<td><?php echo $hotel->totalSalePrice?>&nbsp;</td>
<td><?php echo $hotel->currency?>&nbsp;</td>
<td><?php echo $hotel->boardType?>&nbsp;</td>
<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
}
MetGlobal 2015
Author: Unal TASDIZEN

www.hotelspro.com

32

Document Status: Live

Project Name: HotelsPro XML 4.1 Hotel


Document Number / Version Number: v1.1
?>
</td>
</tr>
</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);
MetGlobal 2015
Author: Unal TASDIZEN

www.hotelspro.com

32

Document Status: Live

Project Name: HotelsPro XML 4.1 Hotel


Document Number / Version Number: v1.1
$policies = is_array($hotel->cancellationPolicy) ? $hotel>cancellationPolicy : array($hotel->cancellationPolicy);
}
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) {
MetGlobal 2015
Author: Unal TASDIZEN

www.hotelspro.com

32

Document Status: Live

Project Name: HotelsPro XML 4.1 Hotel


Document Number / Version Number: v1.1
?>
<?php echo "{$pax->title} $pax->firstName $pax->lastName - {$pax>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
<td><?php
<td><?php
<td><?php
MetGlobal 2015
Author: Unal TASDIZEN

echo
echo
echo
echo

$policy->cancellationDay;?>&nbsp;</td>
$policy->feeType;?>&nbsp;</td>
$policy->feeAmount;?>&nbsp;</td>
$policy->currency; ?>&nbsp;</td>
www.hotelspro.com

32

Document Status: Live

Project Name: HotelsPro XML 4.1 Hotel


Document Number / Version Number: v1.1
<td><?php echo $policy->remarks; ?>&nbsp;</td>
</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>
MetGlobal 2015
Author: Unal TASDIZEN

www.hotelspro.com

32

Document Status: Live

Project Name: HotelsPro XML 4.1 Hotel


Document Number / Version Number: v1.1
</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->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) {
?>
MetGlobal 2015
Author: Unal TASDIZEN

www.hotelspro.com

32

Document Status: Live

Project Name: HotelsPro XML 4.1 Hotel


Document Number / Version Number: v1.1
<tr>
<td><?php
<td><?php
<td><?php
<td><?php
<td><?php
</tr>
<?php
}
}
?>

echo
echo
echo
echo
echo

$pax->paxType;?>&nbsp;</td>
$pax->title;?>&nbsp;</td>
$pax->firstName;?>&nbsp;</td>
$pax->lastName;?>&nbsp;</td>
$pax->age;?>&nbsp;</td>

<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>
MetGlobal 2015
Author: Unal TASDIZEN

www.hotelspro.com

32

Document Status: Live

Project Name: HotelsPro XML 4.1 Hotel


Document Number / Version Number: v1.1
<th>remarks</th>
</tr>
</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>
MetGlobal 2015
Author: Unal TASDIZEN

www.hotelspro.com

32

Document Status: Live

Project Name: HotelsPro XML 4.1 Hotel


Document Number / Version Number: v1.1
<td><?php echo $cancelHotelBooking->bookingStatus;?>&nbsp;</td>
<td><?php echo $cancelHotelBooking->note;?>&nbsp;</td>
</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>
MetGlobal 2015
Author: Unal TASDIZEN

www.hotelspro.com

32

Document Status: Live

Project Name: HotelsPro XML 4.1 Hotel


Document Number / Version Number: v1.1
</tr>
<?php
}
?>
</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>
MetGlobal 2015
Author: Unal TASDIZEN

www.hotelspro.com

32

Document Status: Live

Project Name: HotelsPro XML 4.1 Hotel


Document Number / Version Number: v1.1
<th>note</th>
</tr>
</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/>
MetGlobal 2015
Author: Unal TASDIZEN

www.hotelspro.com

32

Document Status: Live

Project Name: HotelsPro XML 4.1 Hotel


Document Number / Version Number: v1.1
<?php
$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>
MetGlobal 2015
Author: Unal TASDIZEN

www.hotelspro.com

32

Document Status: Live

Project Name: HotelsPro XML 4.1 Hotel


Document Number / Version Number: v1.1
<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>
<?
$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);
?>
MetGlobal 2015
Author: Unal TASDIZEN

www.hotelspro.com

32

Document Status: Live

Project Name: HotelsPro XML 4.1 Hotel


Document Number / Version Number: v1.1
<tr>
<th>Room <?=$roomId + 1;?></th>
<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 2015
Author: Unal TASDIZEN

www.hotelspro.com

32

Document Status: Live

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-0420&checkOut=2011-0424&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=HG52628524&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 2015
Author: Unal TASDIZEN

www.hotelspro.com

32

Document Status: Live

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-HG52628524&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=201111-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 2015
Author: Unal TASDIZEN

www.hotelspro.com

32

Document Status: Live

Project Name: HotelsPro XML 4.1 Hotel


Document Number / Version Number: v1.1
l3WkcrV0hLdTlLSzVZT3NyYXFDZlc5a0xOQWtoWg==&bookDateFrom=2014-0601&bookDateTo=2014-06-30&checkInFrom=2014-08-16&checkInTo=2014-0816&bookingStatus=1

MetGlobal 2015
Author: Unal TASDIZEN

www.hotelspro.com

32

Document Status: Live

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
apikey
destinationId
checkIn
checkOut
currency

Type
String
String
Date
Date
String

clientNationality

String

onRequest

Bool

rooms
filters

Array
Array

Description
Api key taken from the interface
identifier of destination
check-in date in format yyyy-mm-dd;
check-out date in format yyyy-mm-dd;
currency ISO code (it can be EUR, USD or GBP; if sent currency
code is different, then response will contain rates in default
currency EUR);
Code of country (2 chars). List of supported codes are in
Appendix 4.4
this criteria allows the client to get only available hotels with
instant confirmation; or available hotels with instant confirmation
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;
Array of pax elements array
Array of filter elements

Mandatory
Yes
Yes
Yes
Yes
No
Default: EUR

Description
Id of response for debugging
Unique id for this availability session
Total number of found available rooms
Array of hotel elements for available room (or combination of
rooms in case of multiple room search) each

Mandatory
Yes
Yes
Yes
Yes

Yes
No
Default: true

Yes
No

3.1.1.2 Response
Variable
responseId
searchId
totalFound
availableHotels

Type
Int.
String
Int.
Array

MetGlobal 2015
Author: Unal TASDIZEN

www.hotelspro.com

32

Document Status: Live

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

Type
String
String

hotelCode

String

Description
Api key taken from the interface
unique HotelsPro SEARCH reference received in
getAvailableHotel
Hotel identifier

Mandatory
Yes
Yes

Description
Id of response for debugging
Unique id for this availability session
Hotel identifier
Array of Hotel Element for available room (or combination of
rooms in case of multiple room search) each

Mandatory
Yes
Yes
Yes
Yes

Yes

3.1.2.2 Response
Variable
responseId
searchId
hotelCode
availableHotels

3.1.3

Type
Int.
String
String
Array

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

Type
String
String

Mandatory
Yes
Yes

String

Description
Api key taken from the interface
unique identifier of search result from allocateHotelCode
Response
Agencys booking reference number

agencyReference
Number
leadTravellerInfo
otherTravellerInfo

Element
Array

leadTraveller element*
Array of pax elements array*

String

smoking/nonSmoking

Yes
No if single
pax
No

preferences
MetGlobal 2015
Author: Unal TASDIZEN

www.hotelspro.com

32

Document Status: Live

No

Project Name: HotelsPro XML 4.1 Hotel


Document Number / Version Number: v1.1
note
hotelCode

String
String

Note for the booking


Unique identifier of a hotel to be booked

No
Yes

* - 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
responseId
trackingId

Type
Int.
String

hotelBookingInfo

Element

3.1.4

Description
Id of response for debugging
unique HotelsPro booking reference (this reference will be
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
bookInfo Element

Mandatory
Yes
Yes

Yes

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

Type
String
String

Description
Api key taken from the interface
Unique HotelsPro booking reference

Mandatory
Yes
Yes

Type
Int.
String
String
Element

Description
Id of response for debugging
Unique HotelsPro booking reference
Agencys booking reference number
bookInfo element

Mandatory
Yes
Yes
No
Yes

3.1.4.2 Response
Variable
responseId
trackingId
agencyReferenceNumber
hotelBookingInfo

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

Type
String
String

MetGlobal 2015
Author: Unal TASDIZEN

Description
Api key taken from the interface
Unique HotelsPro booking reference
www.hotelspro.com

32

Document Status: Live

Mandatory
Yes
Yes

Project Name: HotelsPro XML 4.1 Hotel


Document Number / Version Number: v1.1

3.1.5.2 Response
Variable
responseId
trackingId

Type
Int.
String

agencyReferenceNumber
bookingStatus

String
String

note

String

3.1.6

Description
Id of response for debugging
unique HotelsPro booking reference received in
MakeHotelBookingResponse;
Agencys booking reference number
status of cancellation: it can be Cancelled or
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 of cancellation. If CancellationStatus is
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.

Mandatory
Yes
Yes
No
Yes

No

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

Type
String
String

hotelCode

String

Description
Api key taken from the interface
unique HotelsPro booking reference received in
MakeHotelBookingResponse; or processId
received in allocateHotelCode response.
Unique identifier of a hotel to be booked

Mandatory
Yes
Yes
Yes

3.1.6.2 Response
Variable
responseId
trackingId
agencyReferenceNumber
cancellationPolicy

Type
Int.
String
String
Array

Description
Mandatory
Id of response for debugging
Yes
unique HotelsPro booking reference;
Yes
Agencys booking reference number
No
Array of policy
Yes
Non-refundable cancellation policy is defined by cancellationDay elements 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">
MetGlobal 2015
Author: Unal TASDIZEN

www.hotelspro.com

32

Document Status: Live

Project Name: HotelsPro XML 4.1 Hotel


Document Number / Version Number: v1.1
<cancellationDay xsi:type="xsd:integer">1001</cancellationDay>
<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 elements value. If the value is 0 days then the policy
is for no-show case (customer didnt cancel booking and didnt 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
apiKey
trackingId

Type
String
String

checkIn
checkOut

Date
Date

MetGlobal 2015
Author: Unal TASDIZEN

Description
Api key taken from the interface
unique HotelsPro booking reference received in
MakeHotelBookingResponse;
check-in date in format yyyy-mm-dd;
check-out date in format yyyy-mm-dd;
www.hotelspro.com

32

Document Status: Live

Mandatory
Yes
Yes
Yes
Yes

Project Name: HotelsPro XML 4.1 Hotel


Document Number / Version Number: v1.1
leadTraverllerInfo
rooms
preferences
note

Element
Array
String
String

leadTraveller Element
Array of pax elements array
smoking/nonSmoking
Notes for amendment request

Yes
Yes
No
No

Variable
responseId
trackingId
agencyReferenceNumber
amendStatus

Type
Int.
String
String
Enum

Mandatory
Yes
Yes
No
Yes

Note

String

Description
Id of response for debugging
unique HotelsPro booking reference
Agencys booking reference number
The value will be Pending for all amenment
requests
amendment note: Your amendment request has
been received. You will be contacted regarding
amendment results by email or by message in
our online system.

3.1.7.2 Response

3.1.8

No

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
apiKey

Type
String

Description
Api key taken from the interface

Mandatory
Yes

Type
Int.
String
Float
Float
Float

Description
Id of response for debugging
Balance currency
Total amount of deposit
Total amount of bookings
Current account balance

Mandatory
Yes
Yes
Yes
Yes
Yes

3.1.8.2 Response
Variable
responseId
Currency
totalDeposit
totalBookingAmount
currentBalance

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

Type
String
Date

bookDateTo
checkInFrom

Date
Date

checkInTo
checkOutFrom

Date
Date

checkOutTo

Date

MetGlobal 2015
Author: Unal TASDIZEN

Description
Api key taken from the interface
Beginning of booking period in format 'yyy-mmdd'
End of booking period in format 'yyy-mm-dd'
Beginning of check-in period in format 'yyy-mmdd'
End of check-in period in format 'yyy-mm-dd'
Beginning of check-out period in format 'yyymm-dd'
End of check-out period in format 'yyy-mm-dd'
www.hotelspro.com

32

Document Status: Live

Mandatory
Yes
No*
No*
No*
No*
No*
No*

Project Name: HotelsPro XML 4.1 Hotel


Document Number / Version Number: v1.1
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
responseId
totalBookingFound
bookInfoArray

Type
Int.
Integer
Array

Description
Id of response for debugging
Number of bookings matching search criteria
Array of bookingArray elements

Mandatory
Yes
Yes
Yes

3.2 Elements
3.2.1

pax Element

Variable
paxType
age

Type
Enum
Int.

Child/Adult
Age of pax

Description

title

String

Title of pax

firstName

String

lastName

String

Firstname of pax (Please use English


alphabet letters only)*
Lastname of pax (Please use English
alphabet letters only)*

Mandatory
Yes
Yes if pax type is child, No for rest. The age
range for children is 0-17.
No for getAvailableHotel method, Yes for rest
(Types: Mr, Ms, Mrs, Miss)
No for getAvailableHotel method, Yes for rest
No for getAvailableHotel method, Yes for rest

* - 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
paxInfo
nationality

3.2.3

Type
Element
String

Description
pax Element
Client nationality (ISO code 2 letters). List of supported
codes are in Appendix 4.4

Mandatory
Yes
Yes

filter Element

Variable
filterType
filterValue

Type
Enum
String

Description
hotelCode / hotelName / hotelStar / boardType / Limit

boardType filter possible values are below:


Value
RO
BB
EB
CB
HB
FB
AI
UI

Explanation
Room Only
Bed and Breakfast
English Breakfast
Continental
Breakfast
Half Board
Full Board
All Inclusive
Ultra All nclusive

MetGlobal 2015
Author: Unal TASDIZEN

www.hotelspro.com

32

Document Status: Live

Mandatory
Yes
Yes

Project Name: HotelsPro XML 4.1 Hotel


Document Number / Version Number: v1.1

SC

Self Catering

hotelStar filter possible values are 1, 2, 3, 4, 5.


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

3.2.4

hotel Element

Variable
processId

Type
String

hotelCode
availabilityStatus

String
Enum

specialDeal

Int.

totalPrice
totalTax

Float
Float

totalSalePrice

Float

currency
boardType

String
String

rooms

Array

3.2.5

Description
unique identifier of search result for available room (or
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
Hotel identifier
status of hotel availability: it can be InstantConfirmation or
OnRequest;
Code for special deal
Code
Explanation
2

Special Discount

Special Offer

Board Type Upgrade

Free Transportation

Free Parking

Free Upgrade

Free Meal

Free Child

10

Free Person

11

Early Booking Discount

12

Free Night

total price for all nights of the stay including all taxes and fees;
amount of taxes and fees (it is included in TotalPrice);
recommended sale price for the end-customer;
ISO code currency of totalPrice
type of board (for example Room Only, Bed and Breakfast), it
shows what is included in total price of the stay
Array of roomResponse Element

Mandatory
Yes

Yes
Yes
No

Yes
No
Default: 0
No
Default: 0
Yes
Yes
Yes

roomResponse Element

Variable
roomCategory

Type
String

paxes
totalRoomRate

Array
Float

ratesPerNight

Array

Description
text description of room category, it can be Standard Room,
Deluxe Room and etc.;
Array of pax elements array
total rate for the room for all nights of the stay including all taxes
and fees;
Array of dailyRate element

MetGlobal 2015
Author: Unal TASDIZEN

www.hotelspro.com

32

Document Status: Live

Mandatory
Yes
Yes
Yes
Yes

Project Name: HotelsPro XML 4.1 Hotel


Document Number / Version Number: v1.1

3.2.6

dailyRate Element

Variable
date
amount

3.2.7

Type
Date
Float

Description
date of night of the stay
Rate for the room for the night including all taxes and fees

bookInfo Element

Variable
bookingStatus

Type
Enum

confirmationNumber

String

supplier
hotelCode
checkIn
checkOut
totalPrice

String
String
Date
Date
Float

totalSalePrice
currency
boardType

Float
String
String

rooms
cancellationPolicy
agencyReferenceNumber

Array
Array
String

comments

String

3.2.8

Description
status of booking;
it can be:
confirmed booking,
on request booking,
rejected booking,
cancelled booking,
payment processing
confirmation number (please be sure that this number
is printed on a customer voucher)
Supplier name
identifier of booked hotel
check-in date in format yyyy-mm-dd
check-out date in format yyyy-mm-dd
total price for all nights of the stay including all taxes
and fees
recommended sale price for the end-customer;
currency ISO code
type of board (for example Room Only, Bed and
Breakfast), it shows what is included in total price of
the stay
Array of pax elements array
Array of policy element
XML affiliates booking reference number.
GetBookingStatus response will contain the same
value of AgencyReferenceNumber which were sent in
MakeHotelBooking request.
Comments of booking

Mandatory
Yes

Description
Days before checkin date when cancellation fee is
applied.
Percent / Amount / Night
Fee amount
Currency ISO Code of total fee amount
Remarks for policy element. If it is not empty then it
should be displayed on your website together with
cancellation policy details.

Mandatory
Yes

Description
Unique HotelsPro booking reference
Date and time when booking was made (EEST)

Mandatory
Yes
Yes

Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No

No

policy Element

Variable
cancellationDay

Type
Int.

feeType
feeAmount
currency
remarks

Enum
Float
String
String

3.2.9

Mandatory
Yes
Yes

Yes
Yes
No
No

bookingArray Element

Variable
trackingId
bookingTime

Type
String
Date /

MetGlobal 2015
Author: Unal TASDIZEN

www.hotelspro.com

32

Document Status: Live

Project Name: HotelsPro XML 4.1 Hotel


Document Number / Version Number: v1.1
hotelName
destinationId
cityName
bookingSource

Time
String
String
String
String

staffId
hotelBookingInfo

String
Element

Name of booked hotel


Identifier of destination
Destination Name
Can be API (booking made via HotelsPro API) or WEBB2B (booking made via HotelsPro B2B website)
Identifier of user
bookInfo element

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
MetGlobal 2015
Author: Unal TASDIZEN

www.hotelspro.com

32

Document Status: Live

Yes
Yes
Yes
Yes
Yes
Yes

Project Name: HotelsPro XML 4.1 Hotel


Document Number / Version Number: v1.1

540 - Invalid time format


541 - Invalid search id
542 - There is no search result with this hotel code
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>
MetGlobal 2015
Author: Unal TASDIZEN

www.hotelspro.com

32

Document Status: Live

Project Name: HotelsPro XML 4.1 Hotel


Document Number / Version Number: v1.1
<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.
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
MetGlobal 2015
Author: Unal TASDIZEN

www.hotelspro.com

32

Document Status: Live

Project Name: HotelsPro XML 4.1 Hotel


Document Number / Version Number: v1.1

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.

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

MetGlobal 2015
Author: Unal TASDIZEN

www.hotelspro.com

32

Document Status: Live

Project Name: HotelsPro XML 4.1 Hotel


Document Number / Version Number: v1.1

BJ

Benin

BM

Bermuda

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

MetGlobal 2015
Author: Unal TASDIZEN

www.hotelspro.com

32

Document Status: Live

Project Name: HotelsPro XML 4.1 Hotel


Document Number / Version Number: v1.1

CK

Cook Islands

CR

Costa Rica

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

MetGlobal 2015
Author: Unal TASDIZEN

www.hotelspro.com

32

Document Status: Live

Project Name: HotelsPro XML 4.1 Hotel


Document Number / Version Number: v1.1

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

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

MetGlobal 2015
Author: Unal TASDIZEN

www.hotelspro.com

32

Document Status: Live

Project Name: HotelsPro XML 4.1 Hotel


Document Number / Version Number: v1.1

IL

Israel

IT

Italy

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

MetGlobal 2015
Author: Unal TASDIZEN

www.hotelspro.com

32

Document Status: Live

Project Name: HotelsPro XML 4.1 Hotel


Document Number / Version Number: v1.1

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

MetGlobal 2015
Author: Unal TASDIZEN

www.hotelspro.com

32

Document Status: Live

Project Name: HotelsPro XML 4.1 Hotel


Document Number / Version Number: v1.1

NU

Niue

NF

Norfolk Island

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

MetGlobal 2015
Author: Unal TASDIZEN

www.hotelspro.com

32

Document Status: Live

Project Name: HotelsPro XML 4.1 Hotel


Document Number / Version Number: v1.1

MF

Saint Martin

PM

Saint Pierre And Miquelon

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

MetGlobal 2015
Author: Unal TASDIZEN

www.hotelspro.com

32

Document Status: Live

Project Name: HotelsPro XML 4.1 Hotel


Document Number / Version Number: v1.1

TJ

Tajikistan

TZ

Tanzania

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

MetGlobal 2015
Author: Unal TASDIZEN

www.hotelspro.com

32

Document Status: Live

Project Name: HotelsPro XML 4.1 Hotel


Document Number / Version Number: v1.1

EH

Western Sahara

YE

Yemen

ZM

Zambia

ZW

Zimbabwe

MetGlobal 2015
Author: Unal TASDIZEN

www.hotelspro.com

32

Document Status: Live

Vous aimerez peut-être aussi