Search City

The Search City provides the client with static data relating to cities held within the GTA system. The API will provide a city name along with the unique code used by GTA to identiy the city.

Example XML Search City request

The XML message below gives a sample of the expected elements needed by the API to execute a Search City Request.

<?xml version="1.0" encoding="UTF-8"?>
<Request>
  <Source>
<RequestorID Client="123456" EMailAddress="clientName@client.co.uk" Password="clientPassword" />
    <RequestorPreferences Language="en">
		  <RequestMode>SYNCHRONOUS</RequestMode> 
    </RequestorPreferences>
  </Source>
	<RequestDetails>
		<SearchCityRequest CountryCode="GR">
			<CityName><![CDATA[AM]]></CityName>
		</SearchCityRequest>
	</RequestDetails>
</Request>

Source parameters

Please refer to the API Architecture document.

Search City attributes

A Search City request can contain optional attributes/parameters to filter the cities returned.  The following lists the attributes/parameters that can be specified: -

Attribute

Description

ISO

 

Used to determine if ISO Codes will be processed.

If “true” or not specified, CountryCode attribute below and the CountryCode returned in the response parameters must be ISO 3166 format, 2 letters.

If “false” the GTA coding will be used.

CountryCode

Mandatory. Used to return all cities within the specified country.

 

Parameter

Description

CityName

Optional. If specified all cities containing the given characters will be returned.

Note: City Names are not case sensitive.

CityCode

Optional. If specified the city details for the single code will be returned.  N.b. city codes always use GTA coding.

Example XML Search City response

The XML message below gives a sample of that given by the API in response to a Search City Request.

Search City response attributes and parameters

<?xml version="1.0" encoding="UTF-8"?>
<Response ResponseReference="200004">
	<ResponseDetails Language="en">
		<SearchCityResponse CountryCode="GR">
			<CityDetails>
				<City Code="AMKI"><![CDATA[Ambelakia]]></City>
				<City Code="AMFI"><![CDATA[Amfissa]]></City>
				<City Code="AMOG"><![CDATA[Amorgos]]></City>
				<City Code="AMPH"><![CDATA[Amphipolis]]></City>
			</CityDetails>
		</SearchCityResponse>		
	</ResponseDetails>
</Response>

The following attributes can form part of the <SearchCityResponse> parameter: -

Attribute

Description

ISO

Echoed backed if entered in the request.

CountryCode

As entered in the request.

The response will then return the following for each city found for the request parameters: -

Parameter

Description

City

The city name.

In the language requested (if available).

 

Attribute

Description

 

Code

The unique code held by GTA

Docs Navigation