GET api/locations/{countryCode}/cities?languageCode={languageCode}&provinceCode={provinceCode} Authentication required
Use this method to fetch all the cities available for a specified country. You can also limit to fetch only the cities for a specified province
Request
URI Parameters
Name | Description | Type | Additional information |
---|---|---|---|
countryCode |
Country represented by its ISO 3166-1 alpha-2 Code (2 chars long) |
string |
Required |
languageCode |
[Optional] Language represented by its ISO 639-1 Code (2 chars long) |
string |
Default value is |
provinceCode |
[Optional] Specify a province code to get only the cities for the wanted province |
string |
Default value is |
Response
Returns all the cities for a specific country, or only the ones for a specific province
Output : array of objects (See Model)Ouput Sample
[
{
"code": "21004",
"name": "Brussel",
"type": "City",
"level": 0
},
{
"code": "21004",
"name": "Brussel",
"type": "City",
"level": 0
}
]
<ArrayOfLocation xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<Location>
<Code>21004</Code>
<CountryCode i:nil="true" />
<FullName i:nil="true" />
<LanguageCode i:nil="true" />
<Level>0</Level>
<Name>Brussel</Name>
<ParentCode i:nil="true" />
<ParentName i:nil="true" />
<Type>City</Type>
</Location>
<Location>
<Code>21004</Code>
<CountryCode i:nil="true" />
<FullName i:nil="true" />
<LanguageCode i:nil="true" />
<Level>0</Level>
<Name>Brussel</Name>
<ParentCode i:nil="true" />
<ParentName i:nil="true" />
<Type>City</Type>
</Location>
</ArrayOfLocation>