64
MetGlobal 2011 HotelsPro API 4.1 Service Application Document Hotel

HotelsPro XML Booking System 4 1

Embed Size (px)

DESCRIPTION

Hotels Pro XML API documentation.

Citation preview

Page 1: HotelsPro XML Booking System 4 1

MetGlobal

2011

HotelsPro API 4.1Service Application DocumentHotel

Page 2: HotelsPro XML Booking System 4 1

32

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 HistoryVersio

nDate Description Modification Author

4.0.0.1 19/10/2010 Template document created Cuneyt CAVA4.0.0.2 27/10/2010 General, Methods, Elements sections

are createdUnal TASDIZEN

4.0.0.3 10/01/2011 General Section completed Olga OVALI4.0.0.4 01/03/2011 Document updated Cuneyt CAVA4.0.0.9 03/03/2011 Document completed Cuneyt CAVA4.1.0.1 27/05/2011 WSDL changed Cuneyt CAVA4.1.0.2 23/03/2012 Document updated Olga OVALI4.1.1.0 18/07/2012 Document updated Olga OVALI4.1.1.1 02/12/2013 Document updated Olga OVALI4.1.1.2 14/10/2014 Document updated Olga OVALI

© MetGlobal 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 3: HotelsPro XML Booking System 4 1

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 systemHotelsPro 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 EnvironmentsThe 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 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 4: HotelsPro XML Booking System 4 1

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 t est 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 DatabaseBefore 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 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 5: HotelsPro XML Booking System 4 1

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.xmlhttp://www.hotelspro.com/xf_3.0/downloads/[AffiliateCode]hoteldescr.xmlhttp://www.hotelspro.com/xf_3.0/downloads/[AffiliateCode]hotelamenities.xmlhttp://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 ListThe 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> - <Hotels>

© MetGlobal 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 6: HotelsPro XML Booking System 4 1

32

Project Name: HotelsPro XML 4.1 Hotel Document Number / Version Number: v1.1

- <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 DescriptionThe 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>   <HotelInfo>Text detailed hotel description</HotelInfo>

© MetGlobal 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 7: HotelsPro XML Booking System 4 1

32

Project Name: HotelsPro XML 4.1 Hotel Document Number / Version Number: v1.1

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

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.

© MetGlobal 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 8: HotelsPro XML Booking System 4 1

32

Project Name: HotelsPro XML 4.1 Hotel Document Number / Version Number: v1.1

1.7 Multilingual Hotel InformationHotelspro 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 FileSpanish http://www.hotelspro.com/xf_4.0/multi-lang/hotelinfo.es.zipChinese http://www.hotelspro.com/xf_4.0/multi-lang/hotelinfo.cn.zipTurkish http://www.hotelspro.com/xf_4.0/multi-lang/hotelinfo.tr.zipRussian 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 Name3. City - City Name4. 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>  <Country>Name of country</Country> <City>Name of city</City>   <State>State Code</State>

© MetGlobal 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 9: HotelsPro XML Booking System 4 1

32

Project Name: HotelsPro XML 4.1 Hotel Document Number / Version Number: v1.1

  </Destination> - <Destination> ....  </Destination> .... </ Destinations></XMLResponse>

1.9 Multilingual Destination InformationHotelspro 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 FileTurkish http://www.hotelspro.com/xf_4.0/multi-lang/destinationinfo.tr.zipFrench http://www.hotelspro.com/xf_4.0/multi-lang/destinationinfo.fr.zipGerman http://www.hotelspro.com/xf_4.0/multi-lang/destinationinfo.de.zipChinese http://www.hotelspro.com/xf_4.0/multi-lang/destinationinfo.zh.zipHungarian http://www.hotelspro.com/xf_4.0/multi-lang/destinationinfo.hu.zipPortugese http://www.hotelspro.com/xf_4.0/multi-lang/destinationinfo.pt.zipRussian http://www.hotelspro.com/xf_4.0/multi-lang/destinationinfo.ru.zipPolish http://www.hotelspro.com/xf_4.0/multi-lang/destinationinfo.pl.zip

© MetGlobal 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 10: HotelsPro XML Booking System 4 1

32

Project Name: HotelsPro XML 4.1 Hotel Document Number / Version Number: v1.1

2 Files Debuging

2.1 OverviewTogether with this documentation you received the following files:

WSDL file

PHP sample project (HotelsPro WS)

2.2 WSDL fileThe 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 projectThe 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 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 11: HotelsPro XML Booking System 4 1

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) {?>

© MetGlobal 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 12: HotelsPro XML Booking System 4 1

32

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 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 13: HotelsPro XML Booking System 4 1

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, $hotelCode);  }  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 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 14: HotelsPro XML Booking System 4 1

32

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 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 15: HotelsPro XML Booking System 4 1

32

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" => "John", "lastName" => "TEST");            $leadTravellerInfo["paxInfo"] = $paxInfo;            $leadTravellerInfo["nationality"] = "UK";            $otherTravellerInfo = array();      $otherTravellerInfo[] = array("title" => "Mr", "firstName" => "Mark", "lastName" => "TEST");      $otherTravellerInfo[] = array("title" => "Ms", "firstName" => "Jane", "lastName" => "TEST");      $otherTravellerInfo[] = array("title" => "Mr", "firstName" => "Baby", "lastName" => "TEST");      $preferences = "nonSmoking";      $note = ""; $hotelCode = "XX1234";       $agencyReferenceNumber = '';      $makeHotelBooking = $client->makeHotelBooking("apiKey", $processId, $agencyReferenceNumber, $leadTravellerInfo, $otherTravellerInfo, $preferences, $note, $hotelCode);            $hotel = $makeHotelBooking->hotelBookingInfo;

© MetGlobal 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 16: HotelsPro XML Booking System 4 1

32

Project Name: HotelsPro XML 4.1 Hotel Document Number / Version Number: v1.1

      $rooms = is_array($hotel->rooms) ? $hotel->rooms : array($hotel->rooms);      $policies = is_array($hotel->cancellationPolicy) ? $hotel->cancellationPolicy : array($hotel->cancellationPolicy);  }  catch (SoapFault $exception) {      echo $exception->getMessage();      exit;  }?>

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

© MetGlobal 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 17: HotelsPro XML Booking System 4 1

32

Project Name: HotelsPro XML 4.1 Hotel Document Number / Version Number: v1.1

<?php          foreach ($paxes as $pax) {?>              <?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 : array($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>              

© MetGlobal 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 18: HotelsPro XML Booking System 4 1

32

Project Name: HotelsPro XML 4.1 Hotel Document Number / Version Number: v1.1

<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>      </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", $trackingId);  }  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>

© MetGlobal 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 19: HotelsPro XML Booking System 4 1

32

Project Name: HotelsPro XML 4.1 Hotel Document Number / Version Number: v1.1

<th>totalSalePrice</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->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) ? $getHotelBookingStatus->hotelBookingInfo : array($getHotelBookingStatus-

© MetGlobal 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 20: HotelsPro XML Booking System 4 1

32

Project Name: HotelsPro XML 4.1 Hotel Document Number / Version Number: v1.1

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

© MetGlobal 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 21: HotelsPro XML Booking System 4 1

32

Project Name: HotelsPro XML 4.1 Hotel Document Number / Version Number: v1.1

    </tr>    <tr>      <th>cancellationDay</th>      <th>feeType</th>      <th>feeAmount</th>      <th>currency</th>      <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>

© MetGlobal 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 22: HotelsPro XML Booking System 4 1

32

Project Name: HotelsPro XML 4.1 Hotel Document Number / Version Number: v1.1

      <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>    </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) ? $getHotelCancellationPolicy->cancellationPolicy : array($getHotelCancellationPolicy->cancellationPolicy);

© MetGlobal 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 23: HotelsPro XML Booking System 4 1

32

Project Name: HotelsPro XML 4.1 Hotel Document Number / Version Number: v1.1

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.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" => "John", "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, "2011-11-15", "2011-11-17", $leadTravellerInfo, $rooms, $preferences, $note);  }  catch (SoapFault $exception) {      echo $exception->getMessage();      exit;

© MetGlobal 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 24: HotelsPro XML Booking System 4 1

32

Project Name: HotelsPro XML 4.1 Hotel Document Number / Version Number: v1.1

  }?>

responseId: <?php echo $amendHotelBooking->responseId?><br/>trackingId: <?php echo $amendHotelBooking->trackingId?><br/><table border="1">  <thead>    <tr>      <th>amendStatus</th>      <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 {

© MetGlobal 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 25: HotelsPro XML Booking System 4 1

32

Project Name: HotelsPro XML 4.1 Hotel Document Number / Version Number: v1.1

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

© MetGlobal 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 26: HotelsPro XML Booking System 4 1

32

Project Name: HotelsPro XML 4.1 Hotel Document Number / Version Number: v1.1

<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> </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><? }}?>

© MetGlobal 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 27: HotelsPro XML Booking System 4 1

32

Project Name: HotelsPro XML 4.1 Hotel Document Number / Version Number: v1.1

<table border="1"> <thead> <tr> <th colspan="5">Price Per Night</th> </tr> </thead> <tbody><?foreach ($rooms as $roomId => $room) { $prices = is_array($room->ratesPerNight) ? $room->ratesPerNight : array($room->ratesPerNight);?> <tr> <th>Room <?=$roomId + 1;?></th> <th>Day</th> <th>Amount</th> </tr><? foreach ($prices as $price) {?> <tr> <td>&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>

© MetGlobal 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 28: HotelsPro XML Booking System 4 1

32

Project Name: HotelsPro XML 4.1 Hotel Document Number / Version Number: v1.1

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

2.4 JSON sample projectThe 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=eGFMWDBjYmVqcnFPNFpQMHBsVytlaUhGNzR6dkFBcU1xRXl3WkcrV0hLdTlLSzVZT3NyYXFDZlc5a0xOQWtoWg==&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=eGFMWDBjYmVqcnFPNFpQMHBsVytlaUhGNzR6dkFBcU1xRXl3WkcrV0hLdTlLSzVZT3NyYXFDZlc5a0xOQWtoWg==&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=eGFMWDBjYmVqcnFPNFpQMHBsVytlaUhGNzR6dkFBcU1xRXl3WkcrV0hLdTlLSzVZT3NyYXFDZlc5a0xOQWtoWg==&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]

© MetGlobal 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 29: HotelsPro XML Booking System 4 1

32

Project Name: HotelsPro XML 4.1 Hotel Document Number / Version Number: v1.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=eGFMWDBjYmVqcnFPNFpQMHBsVytlaUhGNzR6dkFBcU1xRXl3WkcrV0hLdTlLSzVZT3NyYXFDZlc5a0xOQWtoWg==&trackingId=XI-HV-67353988

2.4.5 cancelHotelBooking

2.4.5.1 JSON Request Sample: http://api.hotelspro.com/4.1_test/hotel/b2bHotelJSON.php?method=cancelHotelBooking&apiKey=eGFMWDBjYmVqcnFPNFpQMHBsVytlaUhGNzR6dkFBcU1xRXl3WkcrV0hLdTlLSzVZT3NyYXFDZlc5a0xOQWtoWg==&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=eGFMWDBjYmVqcnFPNFpQMHBsVytlaUhGNzR6dkFBcU1xRXl3WkcrV0hLdTlLSzVZT3NyYXFDZlc5a0xOQWtoWg==&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=eGFMWDBjYmVqcnFPNFpQMHBsVytlaUhGNzR6dkFBcU1xRXl3WkcrV0hLdTlLSzVZT3NyYXFDZlc5a0xOQWtoWg==&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

© MetGlobal 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 30: HotelsPro XML Booking System 4 1

32

Project Name: HotelsPro XML 4.1 Hotel Document Number / Version Number: v1.1

2.4.8 getBalance

2.4.8.1 JSON Request Sample: http://api.hotelspro.com/4.1_test/hotel/b2bHotelJSON.php?method=getBalance&apiKey=eGFMWDBjYmVqcnFPNFpQMHBsVytlaUhGNzR6dkFBcU1xRXl3WkcrV0hLdTlLSzVZT3NyYXFDZlc5a0xOQWtoWg==

2.4.9 getHotelBookingList

2.4.9.1 JSON Request Sample: http://api.hotelspro.com/4.1_test/hotel/b2bHotelJSON.php?method=getHotelBookingList&apiKey=eGFMWDBjYmVqcnFPNFpQMHBsVytlaUhGNzR6dkFBcU1xRXl3WkcrV0hLdTlLSzVZT3NyYXFDZlc5a0xOQWtoWg==&bookDateFrom=2014-06-01&bookDateTo=2014-06-30&checkInFrom=2014-08-16&checkInTo=2014-08-16&bookingStatus=1

© MetGlobal 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 31: HotelsPro XML Booking System 4 1

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 RequestVariable Type Description Mandatoryapikey String Api key taken from the interface YesdestinationId String identifier of destination YescheckIn Date check-in date in format ‘yyyy-mm-dd’; YescheckOut Date check-out date in format ‘yyyy-mm-dd’; Yescurrency String 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);

NoDefault: EUR

clientNationality String Code of country (2 chars). List of supported codes are in Appendix 4.4

Yes

onRequest Bool 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;

NoDefault: true

rooms Array Array of pax elements array Yesfilters Array Array of filter elements No

3.1.1.2 ResponseVariable Type Description MandatoryresponseId Int. Id of response for debugging YessearchId String Unique id for this availability session YestotalFound Int. Total number of found available rooms YesavailableHotels Array Array of hotel elements for available room (or combination of

rooms in case of multiple room search) eachYes

© MetGlobal 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 32: HotelsPro XML Booking System 4 1

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 RequestVariable Type Description MandatoryapiKey String Api key taken from the interface YessearchId String unique HotelsPro SEARCH reference received in

getAvailableHotelYes

hotelCode String Hotel identifier Yes

3.1.2.2 ResponseVariable Type Description MandatoryresponseId Int. Id of response for debugging YessearchId String Unique id for this availability session YeshotelCode String Hotel identifier YesavailableHotels Array Array of Hotel Element for available room (or combination of

rooms in case of multiple room search) eachYes

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 RequestVariable Type Description MandatoryapiKey String Api key taken from the interface YesprocessId String unique identifier of search result from allocateHotelCode

ResponseYes

agencyReferenceNumber

String Agency’s booking reference number No

leadTravellerInfo Element leadTraveller element* YesotherTravellerInfo Array Array of pax elements array* No if single

paxpreferences String smoking/nonSmoking Nonote String Note for the booking NohotelCode String Unique identifier of a hotel to be booked Yes

© MetGlobal 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 33: HotelsPro XML Booking System 4 1

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 ResponseVariable Type Description MandatoryresponseId Int. Id of response for debugging YestrackingId String 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

Yes

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 RequestVariable Type Description MandatoryapiKey String Api key taken from the interface YestrackingId String Unique HotelsPro booking reference Yes

3.1.4.2 ResponseVariable Type Description MandatoryresponseId Int. Id of response for debugging YestrackingId String Unique HotelsPro booking reference YesagencyReferenceNumber String Agency’s booking reference number NohotelBookingInfo 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 RequestVariable Type Description MandatoryapiKey String Api key taken from the interface YestrackingId String Unique HotelsPro booking reference Yes

3.1.5.2 ResponseVariable Type Description Mandatory© MetGlobal 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 34: HotelsPro XML Booking System 4 1

32

Project Name: HotelsPro XML 4.1 Hotel Document Number / Version Number: v1.1

responseId Int. Id of response for debugging YestrackingId String unique HotelsPro booking reference received in

MakeHotelBookingResponse;Yes

agencyReferenceNumber String Agency’s booking reference number NobookingStatus String 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..

Yes

note String 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’.

No

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 RequestVariable Type Description MandatoryapiKey String Api key taken from the interface YestrackingId String unique HotelsPro booking reference received in

MakeHotelBookingResponse; or processId received in allocateHotelCode response.

Yes

hotelCode String Unique identifier of a hotel to be booked Yes

3.1.6.2 ResponseVariable Type Description MandatoryresponseId Int. Id of response for debugging YestrackingId String unique HotelsPro booking reference; YesagencyReferenceNumber String Agency’s booking reference number NocancellationPolicy 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 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 35: HotelsPro XML Booking System 4 1

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 RequestVariable Type Description MandatoryapiKey String Api key taken from the interface YestrackingId String unique HotelsPro booking reference received in

MakeHotelBookingResponse;Yes

checkIn Date check-in date in format ‘yyyy-mm-dd’; YescheckOut Date check-out date in format ‘yyyy-mm-dd’; YesleadTraverllerInfo Element leadTraveller Element Yesrooms Array Array of pax elements array Yes

© MetGlobal 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 36: HotelsPro XML Booking System 4 1

32

Project Name: HotelsPro XML 4.1 Hotel Document Number / Version Number: v1.1

preferences String smoking/nonSmoking Nonote String Notes for amendment request No

3.1.7.2 ResponseVariable Type Description MandatoryresponseId Int. Id of response for debugging YestrackingId String unique HotelsPro booking reference YesagencyReferenceNumber String Agency’s booking reference number NoamendStatus Enum The value will be ‘Pending’ for all amenment

requestsYes

Note String amendment note: Your amendment request has been received. You will be contacted regarding amendment results by email or by message in our online system.

No

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 RequestVariable Type Description MandatoryapiKey String Api key taken from the interface Yes

3.1.8.2 ResponseVariable Type Description MandatoryresponseId Int. Id of response for debugging YesCurrency String Balance currency YestotalDeposit Float Total amount of deposit YestotalBookingAmount Float Total amount of bookings YescurrentBalance 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 RequestVariable Type Description MandatoryapiKey String Api key taken from the interface YesbookDateFrom Date Beginning of booking period in format 'yyy-mm-

dd'No*

bookDateTo Date End of booking period in format 'yyy-mm-dd' No*checkInFrom Date Beginning of check-in period in format 'yyy-mm-

dd'No*

checkInTo Date End of check-in period in format 'yyy-mm-dd' No*checkOutFrom Date Beginning of check-out period in format 'yyy-

mm-dd'No*

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 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 37: HotelsPro XML Booking System 4 1

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 ResponseVariable Type Description MandatoryresponseId Int. Id of response for debugging YestotalBookingFound Integer Number of bookings matching search criteria YesbookInfoArray Array Array of bookingArray elements Yes

3.2 Elements

3.2.1 pax ElementVariable Type Description MandatorypaxType Enum Child/Adult Yesage 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

alphabet letters only)*No for getAvailableHotel method, Yes for rest

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

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 ElementVariable Type Description MandatorypaxInfo Element pax Element Yesnationality String Client nationality (ISO code 2 letters). List of supported

codes are in Appendix 4.4Yes

3.2.3 filter ElementVariable Type Description MandatoryfilterType Enum hotelCode / hotelName / hotelStar / boardType / Limit YesfilterValue String Yes

boardType filter possible values are below:

Value ExplanationRO Room OnlyBB Bed and BreakfastEB English BreakfastCB Continental BreakfastHB Half BoardFB Full BoardAI All InclusiveUI Ultra All İnclusiveSC Self Catering

hotelStar filter possible values are 1, 2, 3, 4, 5.© MetGlobal 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 38: HotelsPro XML Booking System 4 1

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 ElementVariable Type Description MandatoryprocessId String 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

Yes

hotelCode String Hotel identifier YesavailabilityStatus Enum status of hotel availability: it can be InstantConfirmation or

OnRequest;Yes

specialDeal Int. Code for special deal 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

No

totalPrice Float total price for all nights of the stay including all taxes and fees; YestotalTax Float amount of taxes and fees (it is included in TotalPrice); No

Default: 0totalSalePrice Float recommended sale price for the end-customer; No

Default: 0currency String ISO code currency of totalPrice YesboardType String type of board (for example ‘Room Only’, ‘Bed and Breakfast’), it

shows what is included in total price of the stayYes

rooms Array Array of roomResponse Element Yes

3.2.5 roomResponse ElementVariable Type Description MandatoryroomCategory String text description of room category, it can be ‘Standard Room’,

‘Deluxe Room’ and etc.;Yes

paxes Array Array of pax elements array YestotalRoomRate Float total rate for the room for all nights of the stay including all taxes

and fees;Yes

ratesPerNight Array Array of dailyRate element Yes

© MetGlobal 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 39: HotelsPro XML Booking System 4 1

32

Project Name: HotelsPro XML 4.1 Hotel Document Number / Version Number: v1.1

3.2.6 dailyRate ElementVariable Type Description Mandatorydate Date date of night of the stay Yesamount Float Rate for the room for the night including all taxes and fees Yes

3.2.7 bookInfo ElementVariable Type Description MandatorybookingStatus Enum status of booking;

it can be:1- confirmed booking, 2- on request booking, 3- rejected booking, 4- cancelled booking,5- payment processing

Yes

confirmationNumber String confirmation number (please be sure that this number is printed on a customer voucher)

Yes

supplier String Supplier name NohotelCode String identifier of booked hotel YescheckIn Date check-in date in format ‘yyyy-mm-dd’ YescheckOut Date check-out date in format ‘yyyy-mm-dd’ YestotalPrice Float total price for all nights of the stay including all taxes

and feesYes

totalSalePrice Float recommended sale price for the end-customer; Yescurrency String currency ISO code YesboardType String type of board (for example ‘Room Only’, ‘Bed and

Breakfast’), it shows what is included in total price of the stay

Yes

rooms Array Array of pax elements array YescancellationPolicy Array Array of policy element YesagencyReferenceNumber String XML affiliate’s booking reference number.

GetBookingStatus response will contain the same value of AgencyReferenceNumber which were sent in MakeHotelBooking request.

No

comments String Comments of booking No

3.2.8 policy ElementVariable Type Description MandatorycancellationDay Int. Days before checkin date when cancellation fee is

applied.Yes

feeType Enum Percent / Amount / Night YesfeeAmount Float Fee amount Yescurrency String Currency ISO Code of total fee amount Noremarks String Remarks for policy element. If it is not empty then it

should be displayed on your website together with cancellation policy details.

No

3.2.9 bookingArray ElementVariable Type Description MandatorytrackingId String Unique HotelsPro booking reference YesbookingTime Date /

TimeDate and time when booking was made (EEST) Yes

© MetGlobal 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 40: HotelsPro XML Booking System 4 1

32

Project Name: HotelsPro XML 4.1 Hotel Document Number / Version Number: v1.1

hotelName String Name of booked hotel YesdestinationId String Identifier of destination YescityName String Destination Name YesbookingSource String Can be API (booking made via HotelsPro API) or

WEB-B2B (booking made via HotelsPro B2B website) Yes

staffId String Identifier of user YeshotelBookingInfo Element bookInfo element Yes

4 Appendix

4.1 List of error codes

501 - Invalid apikey502 - Invalid currency code503 - Invalid city code504 - Invalid date format! Please use YYYY-mm-dd format.505 - Check-in date can not be earlier than Check-out date506 - City could not found! Please check your city code.507 - Destination is not available.508 - Invalid onrequest type509 - Invalid filter type510 - Multiple hotelcode is not allowed511 - Maximum number of hotelstar filter is 5512 - Hotel star must be between 2 and 5513 - Maximum number of board type filter is 8514 - Hotel code could not find515 - Hotel name could not find516 - Multiple hotelname does not allow517 - 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 nights521 - Please use your account's balance currency for CheckAvailability request522 - 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 request525 - 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 code528 - Children ages are not defined in the request529 - Invalid hotel code530 - Invalid search code531 - Invalid hotel code532 - Empty or missed ProcessId533 - Expired or incorrect ProcessId534 - Invalid pax type535 - Empty or missed pax name information536 - Maximum number of result limit type filter is 1537 - Result limit must be type of integer538 - Empty or missed TrackingId539 - Expired or incorrect TrackingId540 - Invalid time format

© MetGlobal 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 41: HotelsPro XML Booking System 4 1

32

Project Name: HotelsPro XML 4.1 Hotel Document Number / Version Number: v1.1

541 - Invalid search id542 - There is no search result with this hotel code543 - Empty or missed Client information.544 - Client nationality in getAvailabilityHotel and makeHotelBooking requests can not be different545 - Client Nationality can not be empty546 - Empty or missed Other traveller information.547 - Search pax count and book pax count must be equal548 - Invalid preferences value in MakeHotelBooking XML request556 - Dublicate hotel booking557 - Affiliate's deposit is not enough to make the booking558 - The affiliate doesn't have permission to make LastMinute bookings560 - The affiliate doesn't have permission to make bookings for Non-Refundable Hotels561 - Booking has been made by different affiliate562 - Hotel booking amendment can not be made on or after CheckIn date563 - Hotel booking has been cancelled already564 - Hotel booking cancellation can not be made on or after CheckIn date565 - Affiliate is not activated566 - Affiliate is deactivated567 - Affiliate doesn't have permission for this XML request type568 - 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 booking569 - 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 request574 - At least one date period should be presented in getHotelBookingList request575 - Date period cannot be less than 0 days or more than 31 days in getHotelBookingList request576 - 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 examplesgetHotelCancellationPolicy 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>

© MetGlobal 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 42: HotelsPro XML Booking System 4 1

32

Project Name: HotelsPro XML 4.1 Hotel Document Number / Version Number: v1.1

</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 after that you should send getHotelCancellationPolicy request with processId from

© MetGlobal 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 43: HotelsPro XML Booking System 4 1

32

Project Name: HotelsPro XML 4.1 Hotel Document Number / Version Number: v1.1

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

BJ Benin

© MetGlobal 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 44: HotelsPro XML Booking System 4 1

32

Project Name: HotelsPro XML 4.1 Hotel Document Number / Version Number: v1.1

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 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 45: HotelsPro XML Booking System 4 1

32

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 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 46: HotelsPro XML Booking System 4 1

32

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

© MetGlobal 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 47: HotelsPro XML Booking System 4 1

32

Project Name: HotelsPro XML 4.1 Hotel Document Number / Version Number: v1.1

IM Isle Of Man

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

© MetGlobal 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 48: HotelsPro XML Booking System 4 1

32

Project Name: HotelsPro XML 4.1 Hotel Document Number / Version Number: v1.1

MY Malaysia

MV Maldives

ML Mali

MT Malta

MH Marshall Islands

MQ Martinique

MR Mauritania

MU Mauritius

YT Mayotte

MX Mexico

FM Micronesia

MD Moldova

MC Monaco

MN Mongolia

ME Montenegro

MS Montserrat

MA Morocco

MZ Mozambique

MM Myanmar

NA Namibia

NR Nauru

NP Nepal

NL Netherlands

AN Netherlands Antilles

NC New Caledonia

NZ New Zealand

NI Nicaragua

© MetGlobal 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 49: HotelsPro XML Booking System 4 1

32

Project Name: HotelsPro XML 4.1 Hotel Document Number / Version Number: v1.1

NE Niger

NG Nigeria

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

© MetGlobal 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 50: HotelsPro XML Booking System 4 1

32

Project Name: HotelsPro XML 4.1 Hotel Document Number / Version Number: v1.1

KN Saint Kitts And Nevis

LC Saint Lucia

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

© MetGlobal 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 51: HotelsPro XML Booking System 4 1

32

Project Name: HotelsPro XML 4.1 Hotel Document Number / Version Number: v1.1

CH Switzerland

SY Syrian Arab Republic

TW Taiwan

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)

© MetGlobal 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 52: HotelsPro XML Booking System 4 1

32

Project Name: HotelsPro XML 4.1 Hotel Document Number / Version Number: v1.1

VE Venezuela

VN Vietnam

WF Wallis And Futuna

EH Western Sahara

YE Yemen

ZM Zambia

ZW Zimbabwe

© MetGlobal 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live