GET api/locations/{countryCode}/provinces?languageCode={languageCode}®ionCode={regionCode} Authentication required
Use this method to fetch all the provinces available for a specified country. You can also limit to fetch only the provinces for a specified region
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 |
regionCode |
[Optional] Specify a region code to get only the cities for the wanted region |
string |
Default value is |
Response
Returns all the provinces for a specific country, or only the ones for a specific region
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>