Counties of a country
GET/v1/geo/counties
scope catalog.read
The second level of every address. postal_prefixes lists the code prefixes valid for that county where we enforce the rule (Romania today).
Query parameters#
| Name | Example | |
|---|---|---|
country | RO | ISO country code — required |
Response#
| Field | Type | Description |
|---|---|---|
country | string | The country these counties belong to. |
count | integer | How many counties. |
data | array | The first administrative level — județ, province, region — for the given country. |
data[]. | integer | What you send as county_id. |
data[]. | string | The short official code, such as DJ. |
data[]. | string | The name in local script. For countries not written in Latin this is the local spelling, and it is what you should match against. |
data[]. | string | A Latin transliteration, for display where the local script will not render. |
data[]. | string | ISO-2 of the country. |
data[]. | string[] | Which postal codes start here. A postal code is checked against the prefix for its county, so this is how to tell in advance whether a code and a county agree. |
Example
{
"country": "RO",
"count": 42,
"data": [
{
"id": 1,
"code": "DJ",
"name": "Dolj",
"latin_name": "Dolj",
"country_code": "RO",
"postal_prefixes": [
"20"
]
}
]
}