Get a list of hotel city codes – EXT_CitiesRQ

516 views October 5, 2017 October 20, 2017 korzhkov 0

You can request list of hotels for particular city. In that case you have to use a HotelCityCode criteria in the OTA_HotelSearchRQ. To get a list of available city codes you can run following requst.

Request sample

<EXT_CitiesRQ PrimaryLangID="eng" AltLangID="" Version="1.003">
        <POS />
        <Criteria>
            <Criterion>
                <Location CountryCode="CA" />
            </Criterion>
            <Criterion>
                <Location CountryCode="FR" />
            </Criterion>
        </Criteria>
</EXT_CitiesRQ>

Above example will return all cities and city codes for all active properties in Canada and France in English language along with Longitude and Latitude. If you need a full list of all cities in all countries (for active properties only) you can just take out the Criteria section.

Required fields:
Version – not sure why we require it
PrimaryLangID – we need to know which language to use. Use ISO 639-3 language codes.

Response sample

<EXT_CitiesRS>
	<Success/>
		<Result>
			<CityID>31668</CityID>
			<CountryCode>FR</CountryCode>
			<LanguageCode>eng</LanguageCode>
			<Latitude>48.1167</Latitude>
			<Longitude>7.28333</Longitude>
			<Name>Ammerschwihr</Name>
		</Result>
		<Result>
			<CityID>31730</CityID>
			<CountryCode>FR</CountryCode>
			<LanguageCode>eng</LanguageCode>
			<Latitude>48.9667</Latitude>
			<Longitude>2.06667</Longitude>
			<Name>Achères</Name>
		</Result>
</EXT_CitiesRS>

Response fields explained:
CityID – City code
CountryCode – Country code
LanguageCode – ISO 639-3 language codes
Latitude – self explanatory
Longitude – self explanatory
Name – Name of the city in our DB in selected language

Was this helpful?