Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 7 Next »

2.1.1. SEARCH BY LOCATIONS

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.

<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 all suppliers matching to this location.

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

3

Compound Search context

Allows to use City Code from supplier context, and then send search request to all suppliers; and vice versa, you can use City Code from GEO, and then send search request to particular supplier. Compound HotelCodeContext values like "<supplier>.GEO" or "GEO.<supplier>" are used for this.

When the HotelCodeContext is "<supplier>.GEO" then the HotelCityCode must be specified in supplier’s context, and then search request goes to all suppliers.

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

When the HotelCodeContext is "GEO.<supplier>" then the HotelCityCode must be specified in GEO context, and then search request goes only to the supplier specified. So, you can send request to the particular supplier, even if you don’t know supplier-specific City Code (as described in p.2 above).

<Criterion>
   <HotelRef HotelCityCode="12175" HotelCodeContext="GEO.supplierCode"/>
</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.

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.

 Pagination search example

First Availability request with AllowPartialAvail="true":

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

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

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

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

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

 Hotel Chain

Allows to perform search on chain criterion. To define the chain, there is a ChainCode attribute added to HotelRef element.

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

<Criterion>
   <HotelRef ChainCode="HILTO" HotelCityCode="25995" HotelCodeContext="GEO.supplierCode"/>
</Criterion>

List of hotels

Allows to perform search by list of hotel codes.

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.

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

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

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

<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

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

<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

GP HUB allows to do an availability search for multiple rooms at one time.

 Search example
<RoomStayCandidates>
   <RoomStayCandidate Quantity="1" RPH="1">
      <GuestCounts>
         <GuestCount AgeQualifyingCode="10" Count="2"/>
         <GuestCount Age="2" AgeQualifyingCode="8" Count="1"/>
      </GuestCounts>
   </RoomStayCandidate>
   <RoomStayCandidate Quantity="1" RPH="2">
      <GuestCounts>
         <GuestCount AgeQualifyingCode="10" Count="2"/>
         <GuestCount Age="3" AgeQualifyingCode="8" Count="1"/>
         <GuestCount Age="6" AgeQualifyingCode="8" Count="1"/>
      </GuestCounts>
   </RoomStayCandidate>
</RoomStayCandidates>
  • No labels