Get a list of hotels – OTA_HotelSearchRQ

703 views July 22, 2016 October 20, 2017 korzhkov 0

This request could be used in case if you need to get a list of hotels available on certain dates. Also you could specify location and required amenities.

Request sample

<OTA_HotelSearchRQ PrimaryLangID="eng" AltLangID="deu" Version="1.003" xmlns="http://www.opentravel.org/OTA/2003/05">
    <POS />
    <Criteria>
        <Criterion>
            <StayDateRange Start="2012-02-05" End="2012-02-15" />
            <HotelRef HotelCityCode="27490" />
            <HotelAmenity Code="5" />
            <HotelAmenity Code="17" />
            <HotelAmenity Code="29" />
        </Criterion>
    </Criteria>
</OTA_HotelSearchRQ>

Required fields:
PrimaryLangID – Use ISO 639-3 language codes
Version – This is strange, but OTA requires it to be a required field

Optional fields:
AltLangID – Use ISO 639-3 language codes
StayDateRange – Desired period of hotel reservation
HotelCityCode – Desired location
HotelAmenity – OTA Hotel Amenity Code (HAC)

Response sample

<OTA_HotelSearchRS version="1">
    <Success/>
    <Properties>
        <Property HotelCode="532" HotelName="Name of the hotel goes here">
            <Position Latitude="65.326526" Longitude="32.659827"/>
            <Policy CheckInTime="14:00:00" CheckOutTime="12:00:00"/>
            <Address>
                <County>FR</County>
                <StateProv/>
                <CityName>27490</CityName>
                <PostalCode>321654</PostalCode>
                <AddressLine>Sample street address will be here</AddressLine>
            </Address>
            <Award Rating="3"/>
            <VendorMessages>
                <VendorMessage Title="Descriptions">
                    <SubSection SubTitle="Description">
                        <Paragraph>
                            <Text>Description text will come here</Text>
                        </Paragraph>
                    </SubSection>
                    <SubSection SubTitle="Amenities">
                        <Paragraph>
                            <Text>Amenities will come here</Text>
                        </Paragraph>
                    </SubSection>
                    <SubSection SubTitle="Services">
                        <Paragraph>
                            <Text>Services will come here</Text>
                        </Paragraph>
                    </SubSection>
                </VendorMessage>
                <VendorMessage Title="Images">
                    <SubSection SubTitle="Image[0]">
                        <Paragraph Name="Thumbnail">
                            <Image>
                                http://sampledomain.com/upload/image/100x50/1422.jpg
                            </Image>
                        </Paragraph>
                        <Paragraph Name="Original">
                            <Image>
                                http://sampledomain.com/upload/image/original/1422.jpg
                            </Image>
                        </Paragraph>
                    </SubSection>
                </VendorMessage>
            </VendorMessages>
            <RateRange MinRate="100" MaxRate="150" RateTimeUnit="FullDuration" CurrencyCode="EUR"/>
        </Property>
    </Properties>
</OTA_HotelSearchRS>

Response fields explained:
HotelCode – Hotel ID
HotelCityCode – Code of the city where hotel located
CheckInTime – Time of check-in
CheckOutTime – Time of check-out
HotelName – Name of the hotel
Latitude – Latitude
Longitude – Longitude
County — Country code based on ISO 3166-1 alpha-2
CityName — City code
PostalCode — Postal code
AddressLine – Address line
Rating – Hotel star rating
VendorMessage Title=”Descriptions” – Hotel descriptive content
SubSection SubTitle=”Description” – Hotel description
SubSection SubTitle=”Amenities” – Hotel amenities
SubSection SubTitle=”Services” – Hotel services
VendorMessage Title=”Images” – Collection of hotel photos
SubSection SubTitle=”Image[х]” – х — Number of the photo in collection
Paragraph Name=”Thumbnail” – Thumbnail
Paragraph Name=”Original” – Original photo
MinRate – Min price for selected dates
MaxRate — Max price for selected dates
CurrencyCode – Currency code based on ISO 4217

Was this helpful?