Encode Sample

The following XML sample illustrates the three types of information that the Travel Codes Translator eBL can encode. This request uses the Words Beginning With search feature.

Note: Category names (such as MetropolitanArea) and attributes (such as Match) are case sensitive.

Request

For an unnannotated version of the request, see Unnannotated Encode Sample.

Explanation

Code

Begins the Travel Codes Translator eBL request.

Also specifies the desired language for the response.

<Encode xmlns="http://webservices.galileo.com/TravelCodesTranslator/">

<EncodeInput>

  <Encode language="en_US">

Any of the following three searches (or a combination of all three) can be requested in a single call.

Requests information for all cities beginning with the letters birming.

There are two types of searches available.

    <City Match="birming"/>

Requests information for all airports beginning with the letters charles.

    <Airport Match="charles"/>

Requests information for all metropolitan areas beginning with the letters chicago.

    <MetropolitanArea Match="chicago"/>

Requests codes for passenger service requests (SSRs) with wheelchair in the request.

    <PassengerServiceRequest Match="Wheelchair" CoreSystemCode="1V"/>

Requests code the for the US state or Canadian province.

    <StateProvince Match="Colorado"/>

Requests the city/airport code for locations where the city and airport share a code.

    <CityAirport Match="Denver"/>

Ends the Travel Codes Translator eBL request.

  </Encode>

</EncodeInput>

</Encode>

Response

Explanation

Code

Begins the Travel Codes Translator eBL response.

<EncodeResponse xmlns="http://webservices.galileo.com/TravelCodesTranslator/">

  <EncodeResult>

    <EncodeResponse Version="1.0.200303281403" xmlns="http://ns.galileo.com">

As two cities match birming, information about both cities is returned.

      <City Code="BHM" CountryCode="US" Match="birming" StateProvinceCode="AL">Birmingham</City>

      <City Code="BHX" CountryCode="GB" Match="birming">Birmingham</City>

As two airports match charles, information about both airports is returned.

      <Airport CityCode="CHS" CityName="Charleston" Code="CHS" CountryCode="US" Match="charles" StateProvinceCode="SC">Charleston Intl Arpt</Airport>

      <Airport CityCode="PAR" CityName="Paris" Code="CDG" CountryCode="FR" Match="charles">Charles De Gaulle Intl Arpt</Airport>

Only one metropolitan area matches chicago.

Note: The asterisk in the metropolitan area code indicates that the code is for a metro area, rather than an individual airport. The asterisk is especially important when the airport code matches the metro code. For example, SFO is the airport code for San Francisco International Airport, but SFO* is also the metro area code for San Francisco and is used when looking for flights out of any airport in San Francisco.

      <MetropolitanArea Code="CHI*" CountryCode="US" Match="chicago" StateProvinceCode="IL">Chicago Airports</MetropolitanArea>

Returns the Passenger Service Request (SSR) code for

    <PassengerServiceRequest CategoryTypeCode="W" CoreSystemCode="1V" DisplayOptionIndicator="Y" SSRCode="WCHC" TextOptionCode="O" TextStyleCode="A">Wheelchair - Psgr Completely Immobile</PassengerServiceRequest>

Returns to the two-letter US state or Canadian province code.

    <StateProvince Code="CO"/>

Returns the city/airport code for locations where the city and airport share a code.

    <CityAirport Code="DEN"/>

Ends the Travel Codes Translator eBL response.

    </EncodeResponse>

  </EncodeResult>

</EncodeResponse>