+ All Categories
Home > Documents > HotelsPro XML Booking System 4 1

HotelsPro XML Booking System 4 1

Date post: 23-Oct-2014
Category:
Upload: ajeet-kumar-chaubey
View: 170 times
Download: 5 times
Share this document with a friend
Popular Tags:
44
MetGlobal 2011 HotelsPro API 4.1 Service Application Document Hotel
Transcript
Page 1: HotelsPro XML Booking System 4 1

MetGlobal

2011

HotelsPro API 4.1Service Application Document

Hotel

Page 2: HotelsPro XML Booking System 4 1

31

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

Contents Contents...................................................................................................................................2

1 General..................................................................................................................................3

2 Files Debuging.....................................................................................................................10

3 Methods in detail..................................................................................................................27

4 Appendix..............................................................................................................................33

Revision HistoryVersion Date 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 CAVA

© MetGlobal 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 3: HotelsPro XML Booking System 4 1

31

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

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 and transfers worldwide (using the client’s own front-end system/site and HotelsPro system).

Hotels/transfer 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, and preferably schema definitions. 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/transfer 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

31

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

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 test environment is available for a new XML affiliate. Until system is not tested properly by XML affiliate, the live environment of HotelsPro XML booking system will not be available for XML affiliate.

For sending XML request to the booking system the client is advised to add a new user (XML agent) to its HotelsPro agency account and use API key (unique code generated by HotelsPro) in every XML request to the booking system. So it will be easier for the client to separate the XML bookings (bookings which were made by HotelsPro XML booking system) from manual bookings (booking which were made by agents on HotelsPro website manually).

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.

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 i.e: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:

© MetGlobal 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 5: HotelsPro XML Booking System 4 1

31

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

After clicking on button ‘Update Files’ the system will start hotel data generating process. It can take up to 60 minutes.

The process will be shown with the loader .

The window of process can be closed; it will not interrupt the generating process.

After 40-60 minutes hotel data files will be created. The data can be accessed by the links on the page:

Also the data will be available by these links:

http://static.hotelspro.com/xf_4.0/downloads/[AffiliateCode]hotellist.xmlhttp://static.hotelspro.com/xf_4.0/downloads/[AffiliateCode]hoteldescr.xmlhttp://static.hotelspro.com/xf_4.0/downloads/[AffiliateCode]hotelamenities.xmlhttp://static.hotelspro.com/xf_4.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;

© MetGlobal 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 6: HotelsPro XML Booking System 4 1

31

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

13. Coordinates – latitude and longitude;14. URL for 3 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> - <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:

© MetGlobal 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 7: HotelsPro XML Booking System 4 1

31

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

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

© MetGlobal 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 8: HotelsPro XML Booking System 4 1

31

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

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

1.7 Multilingual Hotel InformationHotelspro provides hotel information in Danish, Dutch, French, German, Italian, Japanese,Korean, Portugese, Russian, Spanish.

The files are in csv format and the field order is as follows:

Hotel Code Hotel Name Hotel Address Hotel Description Hotel Amenities Room Amenities

Language FileDanish http://static.hotelspro.com/xf_4.0/multi-lang/hotelinfo.da.zipDutch http://static.hotelspro.com/xf_4.0/multi-lang/hotelinfo.nl.zipFrench http://static.hotelspro.com/xf_4.0/multi-lang/hotelinfo.fr.zipGerman http://static.hotelspro.com/xf_4.0/multi-lang/hotelinfo.de.zipItalian http://static.hotelspro.com/xf_4.0/multi-lang/hotelinfo.it.zipJapanese http://static.hotelspro.com/xf_4.0/multi-lang/hotelinfo.ja.zipKorean http://static.hotelspro.com/xf_4.0/multi-lang/hotelinfo.kr.zipPortugese http://static.hotelspro.com/xf_4.0/multi-lang/hotelinfo.pt.zipRussian http://static.hotelspro.com/xf_4.0/multi-lang/hotelinfo.ru.zipSpanish http://static.hotelspro.com/xf_4.0/multi-lang/hotelinfo.es.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

© MetGlobal 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 9: HotelsPro XML Booking System 4 1

31

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

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>   </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://static.hotelspro.com/xf_4.0/multi-lang/destinationinfo.tr.zipFrench http://static.hotelspro.com/xf_4.0/multi-lang/destinationinfo.fr.zipGerman http://static.hotelspro.com/xf_4.0/multi-lang/destinationinfo.de.zipChinese http://static.hotelspro.com/xf_4.0/multi-lang/destinationinfo.zh.zipHungarian http://static.hotelspro.com/xf_4.0/multi-lang/destinationinfo.hu.zipPortugese http://static.hotelspro.com/xf_4.0/multi-lang/destinationinfo.pt.zipRussian http://static.hotelspro.com/xf_4.0/multi-lang/destinationinfo.ru.zipPolish http://static.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

31

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

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

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

© MetGlobal 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 11: HotelsPro XML Booking System 4 1

31

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

      // make getAvailableHotel request (start search)      $checkAvailability = $client->getAvailableHotel("apiKey", "RHMK", "2011-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>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->currency?></td>    <td><?php echo $hotel->boardType?></td>    <td><?php      if (is_object($hotel->rooms)) {          $roomResponse[] = $hotel;      } else {          $roomResponse = $hotel->rooms;      }      foreach ((array)$roomResponse as $rnum => $room) {?>      <table border="1" style="margin: 10px; width: 300px; float: left;">

© MetGlobal 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 12: HotelsPro XML Booking System 4 1

31

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

        <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

31

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

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

© MetGlobal 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 14: HotelsPro XML Booking System 4 1

31

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

<?php      if (is_object($hotel->rooms)) {          $roomResponse[] = $hotel->rooms;      } else {          $roomResponse = $hotel->rooms;      }      foreach ((array)$roomResponse as $rnum => $room) {?>        <table border="1" style="margin: 10px; width: 300px; float: left;">          <tr>            <td><b>Room <?php echo($rnum + 1);?> Category</b></td>            <td><?php echo $room->roomCategory;?>&nbsp;</td>          </tr>          <tr>            <td><b>Total Room Rate</b></td>            <td><?php echo $room->totalRoomRate;?>&nbsp;</td>          </tr>          <tr>            <td><b>Paxes</b></td>            <td><?php          if (is_object($room->paxes)) {              $roomsInfo[] = $room->paxes;          } else {              $roomsInfo = $room->paxes;          }          if (is_object($room->ratesPerNight)) {              $ratesPerNight[] = $room->ratesPerNight;          } else {              $ratesPerNight = $room->ratesPerNight;          }          foreach ((array)$roomsInfo as $pnum => $pax) {?>              <?php echo $pax->paxType;?> (<?php echo $pax->age;?>)<br/><?php          }?>            </td>          </tr>          <tr>            <td><b>ratesPerNight</b></td>            <td><?php          foreach ((array)$ratesPerNight as $rpnum => $price) {?>              <?php echo $price->date;?> (<?php echo $price->amount;?>)<br/><?php          }?>            </td>          </tr>        </table>

© MetGlobal 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 15: HotelsPro XML Booking System 4 1

31

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

<?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 = "";      $agencyReferenceNumber = '';      $makeHotelBooking = $client->makeHotelBooking("apiKey", $processId, $agencyReferenceNumber, $leadTravellerInfo, $otherTravellerInfo, $preferences, $note);            $hotel = $makeHotelBooking->hotelBookingInfo;      $rooms = is_array($hotel->rooms) ? $hotel->rooms : array($hotel->rooms);      $policies = is_array($hotel->cancellationPolicy) ? $hotel->cancellationPolicy : array($hotel->cancellationPolicy);  }  catch (SoapFault $exception) {

© MetGlobal 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 16: HotelsPro XML Booking System 4 1

31

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

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

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

© MetGlobal 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 17: HotelsPro XML Booking System 4 1

31

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

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

© MetGlobal 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 18: HotelsPro XML Booking System 4 1

31

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

      }?>                      </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>      <th>currency</th>      <th>boardType</th>      <th>agencyReferenceNumber</th>      <th>comments</th>    </tr>  </thead>  <tbody>    <tr>

© MetGlobal 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 19: HotelsPro XML Booking System 4 1

31

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

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

© MetGlobal 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 20: HotelsPro XML Booking System 4 1

31

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

    </tr><?php      }  }?>

<table border="1">  <thead>    <tr>      <th colspan="5">Price Per Night</th>    </tr>  </thead>  <tbody><?php  foreach ($rooms as $roomId => $room) {      $prices = is_array($room->ratesPerNight) ? $room->ratesPerNight : array($room->ratesPerNight);?>    <tr>      <th>Room <?=$roomId + 1;?></th>      <th>Day</th>      <th>Amount</th>    </tr><?php      foreach ($prices as $price) {?>    <tr>      <td>&nbsp;</td>      <td><?php echo $price->date;?>&nbsp;</td>      <td><?php echo $price->amount;?>&nbsp;</td>    </tr><?php      }  }?>

<table border="1">  <thead>    <tr>      <th colspan="4">Cancellation Policy</th>    </tr>    <tr>      <th>cancellationDay</th>      <th>feeType</th>      <th>feeAmount</th>      <th>currency</th>      <th>remarks</th>    </tr>  </thead>  <tbody><?php  $policies = is_array($getHotelBookingStatus->hotelBookingInfo->cancellationPolicy) ? $getHotelBookingStatus->hotelBookingInfo-

© MetGlobal 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 21: HotelsPro XML Booking System 4 1

31

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

>cancellationPolicy : array($getHotelBookingStatus->hotelBookingInfo->cancellationPolicy);  foreach ($policies as $policy) {?>    <tr>      <td><?php echo $policy->cancellationDay;?>&nbsp;</td>      <td><?php echo $policy->feeType;?>&nbsp;</td>      <td><?php echo $policy->feeAmount;?>&nbsp;</td>      <td><?php echo $policy->currency;?>&nbsp;</td>      <td><?php echo $policy->remarks;?>&nbsp;</td>    </tr><?php  }?>  </tbody></table>

2.3.5 cancelHotelBooking

2.3.5.1 PHP Code Sample: <?php  $client = new SoapClient("wsdl_hotel_path", array('trace' => 1));    try {      $cancelHotelBooking = $client->cancelHotelBooking("apiKey", $trackingId);  }  catch (SoapFault $exception) {      echo $exception->getMessage();      exit;  }?>

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

© MetGlobal 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 22: HotelsPro XML Booking System 4 1

31

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

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);  }  catch (SoapFault $exception) {      echo $exception->getMessage();      exit;  }?>

responseId: <?php echo $getHotelCancellationPolicy->responseId?><br/>processId: <?php echo $processId?><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);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>

© MetGlobal 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 23: HotelsPro XML Booking System 4 1

31

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

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

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>

© MetGlobal 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 24: HotelsPro XML Booking System 4 1

31

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

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

© MetGlobal 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 25: HotelsPro XML Booking System 4 1

31

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

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][firstName]=Mehmet&otherTravellerInfo[1][lastName]=YILDIZ&preferences=nonSmoking&note=test%20note

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

© MetGlobal 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 26: HotelsPro XML Booking System 4 1

31

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

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

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

© MetGlobal 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 27: HotelsPro XML Booking System 4 1

31

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

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 that getAvailableHotel method contains cached availability and rates. In order to get exact hotel rate allocateHotelCode method must be used (see next method).

3.1.1.1 Request

Variable Type Description Mandatory

apikey String Api key taken from the interface 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) YesonRequest 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 hotels YesavailableHotels Array Array of hotel elements Yes

© MetGlobal 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 28: HotelsPro XML Booking System 4 1

31

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

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.

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 Yes

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 No

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

© MetGlobal 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 29: HotelsPro XML Booking System 4 1

31

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

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, not just the status.

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.

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 MandatoryresponseId 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), such cancellation can not be done.

Yes

note String note of cancellation. If CancellationStatus is ‘Cancelled’ then in Note it will be written as

No

© MetGlobal 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 30: HotelsPro XML Booking System 4 1

31

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

‘Booking has been cancelled successfully.’ If CancellationStatus is ‘Cancellation Processing’ then in Note it will be written as ‘Your cancellation request has been received’ or ‘Your cancellation request has been received. Cancellation is being made within the cancellation period for this booking. A cancellation charge of at least one night stay will occur’.

3.1.6 getHotelCancellationPolicy

getHotelCancellationPolicy method allows the client to get detailed information about cancellation policy and cancellation penalty for selected hotel.

3.1.6.1 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

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

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.

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

© MetGlobal 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 31: HotelsPro XML Booking System 4 1

31

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

agencyReferenceNumber 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.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 resttitle String Title of pax No for getAvailableHotel method, Yes for rest

(Types: Mr, Ms, Mrs, Miss)firstName String Firstname of pax No for getAvailableHotel method, Yes for restlastName String Lastname of pax No for getAvailableHotel method, Yes for rest

3.2.2 leadTraveller ElementVariable Type Description MandatorypaxInfo Element pax Element Yesnationality String Client nationality Yes

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

3.2.4 hotel ElementVariable Type Description MandatoryprocessId String unique identifier of search result for the hotel. If the client wants to

book the hotel, this identifier needs to be sent in book requestYes

hotelCode String Hotel identifier Yes© MetGlobal 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 32: HotelsPro XML Booking System 4 1

31

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

availabilityStatus 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);NoDefault: 0

currency 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

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,

Yes

© MetGlobal 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 33: HotelsPro XML Booking System 4 1

31

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

3- rejected booking, 4- cancelled booking,5- payment processing

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

currency 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 of cancellation time YesfeeType Enum Percent / Amount / Night YesfeeAmount Float Fee amount Yescurrency String Currency ISO Code of total fee amount Noremarks String Remarks for policy element No

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 allowed

© MetGlobal 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live

Page 34: HotelsPro XML Booking System 4 1

31

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

511 - 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 format541 - Invalid search id542 - There is no search result with this hotel code543 - Empty or missed Client information.544 - Client nationality and user ip country 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 type

© MetGlobal 2023 www.hotelspro.com

Author: Unal TASDIZEN Document Status: Live


Recommended