Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: fixed table width

...

GP Travel HUB offers several alternatives of searching hotels by location:

Search by

Description

Search example

1

City code from supplier context (one supplier)

Allows to specify city code of certain supplier and get hotel offers only from this supplier. You can use this case if you know exact location codes from suppliers and would like to get offers only from some supplier.

Code Block
languagexml
<Criterion>
   <HotelRef HotelCityCode="LON" HotelCodeContext="supplierCode"/>
</Criterion>

2

City code from customer context

If it is agreed to support customer context, GP Travel HUB can do search by customer-specific city codes. In this case your application can provide your own city code, GP Travel HUB will resolve it via GEO-tree and send requests to supplier.

Code Block
languagexml
<Criterion>
   <HotelRef HotelCityCode="LON" HotelCodeContext="ABC.supplierCode"/>
</Criterion>
  • In this example "ABC" is a customer identifier. Ask about your specific identifier during integration.

3

GEO Search context

Allows to use City Code from supplier context, and then send search request to all suppliers. HotelCodeContext value like "<supplier>.GEO" is used for this.

Code Block
languagexml
<Criterion>
   <HotelRef HotelCityCode="LON" HotelCodeContext="supplierCode.GEO"/>
</Criterion>

4

Pagination search

Allows to receive results in parts. To start a pagination search AllowPartialAvail attribute should be true in Availability request. HUB returns available offers until MoreIndicator is true on Availability response. Pagination search can be interrupted after each Availability request. If part of received offers is enough no need to send other Availability requests despite the fact that the MoreIndicator is true on Availability response. Check diagram below for case when you should receive all available offers:

You can see pagination search example after diagram below.

...

Diagram 2.1.1.1. Pagination search process.

...

Expand
titlePagination search example

First Availability request with AllowPartialAvail="true":

Code Block
languagexml
<OTA_HotelAvailRQ AllowPartialAvail="true" AvailRatesOnly="false" BestOnly="false" EchoToken="54039685" PrimaryLangID="en" RateRangeOnly="false" Version="2" xmlns="http://www.opentravel.org/OTA/2003/05">
   <POS>
      <Source>
         <RequestorID ID="cla" MessagePassword="pwa" Type="22"/>
         <BookingChannel Type="7"/>
      </Source>
   </POS>
   <AvailRequestSegments>
      <AvailRequestSegment>
         <StayDateRange End="2020-09-17" Start="2020-09-12"/>
         <RoomStayCandidates>
            <RoomStayCandidate Quantity="1" RPH="1">
               <GuestCounts>
                  <GuestCount AgeQualifyingCode="10" Count="2"/>
               </GuestCounts>
            </RoomStayCandidate>
         </RoomStayCandidates>
         <HotelSearchCriteria>
            <Criterion>
               <HotelRef HotelCityCode="15744" HotelCodeContext="GEO.innstant"/>
               <Profiles>
                  <ProfileInfo>
                     <UniqueID ID="1" Type="1"/>
                     <Profile>
                        <Customer>
                           <PersonName>
                              <NamePrefix>Mr</NamePrefix>
                              <GivenName>TourLeadName</GivenName>
                              <Surname>TourLeadSurname</Surname>
                           </PersonName>
                           <Address>
                              <AddressLine>TourLeadAddress</AddressLine>
                              <CityName>TourLeadCity</CityName>
                              <PostalCode>TourLeadPostal</PostalCode>
                              <CountryName/>
                           </Address>
                           <CitizenCountryName Code="GB"/>
                        </Customer>
                     </Profile>
                  </ProfileInfo>
               </Profiles>
            </Criterion>
         </HotelSearchCriteria>
      </AvailRequestSegment>
   </AvailRequestSegments>
</OTA_HotelAvailRQ>

First Availability response with MoreDataEchoToken and MoreIndicator="true":

Code Block
languagexml
<OTA_HotelAvailRS EchoToken="54039685" Version="2.0" xmlns="http://www.opentravel.org/OTA/2003/05">
   <Success/>
   <RoomStays MoreDataEchoToken="200331165120.019795" MoreIndicator="true">
      <RoomStay RoomStayCandidateRPH="1">
         <RoomTypes>
            <RoomType RoomTypeCode="2608f7ec">
               <RoomDescription Name="Highsuite Double">
                  <Text>Highsuite Double (highsuite double)</Text>
               </RoomDescription>
            </RoomType>
         </RoomTypes>
         <RatePlans>
            <RatePlan RatePlanCode="RO">
               <RatePlanDescription>
                  <Text>Room Only</Text>
               </RatePlanDescription>
               <MealsIncluded Breakfast="false" Dinner="false" Lunch="false" MealPlanCodes="14"/>
            </RatePlan>
         </RatePlans>
         <RoomRates>
            <RoomRate AvailabilityStatus="AvailableForSale" BookingCode="12c7e2a9" FreeCancellationDeadline="2020-06-23T00:00:00+00:00" NonRefundable="false" NumberOfUnits="1" RoomTypeCode="2608f7ec" RatePlanCode="RO">
               <Rates>...</Rates>
               <VendorInfo>
                  <VendorCode>5683</VendorCode>
                  <VendorName>hotelsdemo</VendorName>
               </VendorInfo>
               <CancelPenalties>...</CancelPenalties>
               <Total AmountAfterTax="910.00" CurrencyCode="USD"/>
            </RoomRate>
         </RoomRates>
         <TimeSpan End="2020-09-17" Start="2020-09-12"/>
         <BasicPropertyInfo HotelCityCode="260526" HotelCode="716668" HotelCodeContext="innstant" HotelName="1000Nights Guest House - Near the beach" AreaID="IL">
            <Position Latitude="32.06891" Longitude="34.76621"/>
            <Address>...</Address>
            ...
         </BasicPropertyInfo>
      </RoomStay>
   </RoomStays>
</OTA_HotelAvailRS>

Second Availability request with AllowPartialAvail=true and MoreDataEchoToken from previous Availability response:

Code Block
languagexml
<OTA_HotelAvailRQ AllowPartialAvail="true" AvailRatesOnly="false" BestOnly="false" EchoToken="54039685" PrimaryLangID="en" RateRangeOnly="false" Version="2" xmlns="http://www.opentravel.org/OTA/2003/05">

   <POS>
      <Source>
         <RequestorID ID="cla" MessagePassword="pwa" Type="22"/>
         <BookingChannel Type="7"/>
      </Source>
   </POS>
   <AvailRequestSegments>
      <AvailRequestSegment MoreDataEchoToken="200331165120.019795">
         <StayDateRange End="2020-09-17" Start="2020-09-12"/>
         <RoomStayCandidates>...</RoomStayCandidates>
         <HotelSearchCriteria>
            <Criterion>
               <HotelRef HotelCityCode="15744" HotelCodeContext="GEO.innstant"/>
               <Profiles>
                  <ProfileInfo>
                     <UniqueID ID="1" Type="1"/>
                     <Profile>
                        <Customer>
                           <PersonName>...</PersonName>
                           <Address>...</Address>
                           <CitizenCountryName Code="RU"/>
                        </Customer>
                     </Profile>
                  </ProfileInfo>
               </Profiles>
            </Criterion>
         </HotelSearchCriteria>
      </AvailRequestSegment>
   </AvailRequestSegments>
</OTA_HotelAvailRQ>

Second Availability response with MoreDataEchoToken and MoreIndicator="false":

Code Block
languagexml
<OTA_HotelAvailRS EchoToken="54039685" Version="2.0" xmlns="http://www.opentravel.org/OTA/2003/05">
   <Success/>
   <RoomStays MoreDataEchoToken="200331165120.019795" MoreIndicator="false">
      <RoomStay RoomStayCandidateRPH="1">
         <RoomTypes>
            <RoomType RoomTypeCode="4cffc724">
               <RoomDescription Name="Apartment Double">
                  <Text>Apartment Double (apartment double)</Text>
               </RoomDescription>
            </RoomType>
         </RoomTypes>
         <RatePlans>
            <RatePlan RatePlanCode="BB">
               <RatePlanDescription>
                  <Text>Breakfast</Text>
               </RatePlanDescription>
               <MealsIncluded Breakfast="true" Dinner="false" Lunch="false" MealPlanCodes="3"/>
            </RatePlan>
         </RatePlans>
         <RoomRates>
            <RoomRate AvailabilityStatus="OnRequest" BookingCode="12c7eb0a" NonRefundable="true" NumberOfUnits="1" RoomTypeCode="4cffc724" RatePlanCode="RO">
               <Rates>...</Rates>
               <VendorInfo>...</VendorInfo>
               <CancelPenalties>...</CancelPenalties>
               <Total AmountAfterTax="204.00" CurrencyCode="USD"/>
            </RoomRate>
         </RoomRates>
         <TimeSpan End="2020-09-17" Start="2020-09-12"/>
         <BasicPropertyInfo HotelCityCode="260526" HotelCode="514348" HotelCodeContext="innstant" HotelName="spat holon" AreaID="IL">
            <Position Latitude="31.99902" Longitude="34.76588"/>
            <Address>...</Address>
            <CategoryCodes>
               <HotelCategory Code="20" GroupCode="Type" CodeDetail="Hotel"/>
            </CategoryCodes>
            ...
         </BasicPropertyInfo>
      </RoomStay>
   </RoomStays>
</OTA_HotelAvailRS>

2.1.2. SEARCH BY HOTEL

Search by

Description

Search example

Hotel code from supplier context

If you already did search, you can check just availability of certain hotel. In this case you need to provide supplier city code and hotel code as a search criteria.

Code Block
languagexml
<Criterion>
   <HotelRef HotelCityCode="LON" HotelCode="157292" HotelCodeContext="supplierCode"/>
</Criterion>

Hotel name

Allows to perform search by hotel name. Full hotel name or part of it can be specified.

Code Block
languagexml
<Criterion>
          <HotelRef HotelCityCode="29603" HotelName="Boutique Hotel" HotelCodeContext="GEO.supplierCode"/>
</Criterion>

List of hotels

Allows to perform search by list of hotel codes.

Info

Note: This functionality supported for limited suppliers. Please check with GP Travel HUB development if you are interested in specific supplier.

In case of search by list of hotels from one city you need to provide supplier city code and codes of each hotel as a search criteria.

Code Block
languagexml
<Criterion>
   <HotelRef HotelCityCode="3687" HotelCodeContext="supplierCode" HotelCode="e50deacb596"/>
</Criterion>
<Criterion>
   <HotelRef HotelCityCode="3687" HotelCodeContext="supplierCode" HotelCode="dd0d3e162e9"/>
</Criterion>
<Criterion>
   <HotelRef HotelCityCode="3687" HotelCodeContext="supplierCode" HotelCode="ad0d3e162e9"/>
</Criterion>

In case of search by list of hotels from different cities you need to provide supplier city codes and codes of each hotel of appropriate city as a search criteria.

Code Block
languagexml
<Criterion>
   <HotelRef HotelCityCode="1089" HotelCodeContext="supplierCode" HotelCode="e50f345345h"/>
</Criterion>
<Criterion>
   <HotelRef HotelCityCode="3687" HotelCodeContext="supplierCode" HotelCode="dd0d3e162e9"/>
</Criterion>
<Criterion>
   <HotelRef HotelCityCode="9695" HotelCodeContext="supplierCode" HotelCode="ad04234f34v"/>
</Criterion>

2.1.3. SEARCH BY COORDINATES

Search by

Description

Search example

Coordinates

Allows to perform search, specifying latitude and longitude of a point as well as radius of search. Refers to OTA Unit of Measure Code.

Info

Note: HUB uses internal logic listed below for search by coordinates only if supplier does not support this kind of search. If it is supported by supplier then HUB just passes coordinates to supplier.

In case of request with GEO code, search is performed by HUB in following way:

  • all locations are extract from database from GEO tree. Then by mappings we extract supplier's locations and make search.

  • results are filtered to compute distance and the closest location considering Radius/@Distance to reseive only suitable locations.

by Geo context

Code Block
languagexml
<Criterion>
   <Position Latitude="41.69411" Longitude="44.83368"/>
   <HotelRef HotelCodeContext="GEO.supplierCode"/>
   <Radius Distance="50" UnitOfMeasureCode="2"/>
</Criterion>

In case of request with supplier code, search is performed by HUB in following way:

  • all locations are extract from database from Supplier tree. This means search can be made if we have latitude and longitude in supplier's static data only.

  • results are filtered to compute distance and the closest location considering Radius/@Distance to reseive only suitable locations.

by supplier context

Code Block
languagexml
<Criterion>
   <Position Latitude="41.69411" Longitude="44.83368"/>
   <HotelRef HotelCodeContext="supplierCode"/>
   <Radius Distance="50" UnitOfMeasureCode="2"/>
</Criterion>

Quadrangle

Allows to specify the quadrangular area of search by defining its south-west and east-north coordinates. In response HUB returns all hotels that are located into specified area.

Code Block
languagexml
<Criterion>
   <HotelRef HotelCodeContext="supplierCode"/>
   <MapArea EastLongitude="-0.1" NorthLatitude="51.53" SouthLatitude="51.52" WestLongitude="-0.92"/>
</Criterion>

2.1.4. SEARCH FOR MULTIPLE ROOMS REQUESTED

...