Counties
List all 42 Romanian counties with their codes and SIRUTA ids.
GET
/v1/countiesAll 42 counties (including București, code B), ordered by name. Reference data from the official baseline only, never OpenStreetMap. A billed lookup, like Postal lookup. Requires the postal_lookup scope.
Parameters
There are no query or body parameters.
| Name | Type | Required | Description |
|---|---|---|---|
If-None-Match | header | no | The ETag value from an earlier response. If it matches you get a 304 with no body (billed like a 200). |
Example request
curl https://api.posty.ro/v1/counties \
-H "Authorization: Bearer psk_live_xxx"Example response (shortened)
{
"counties": [
{
"code": "AB",
"name": "Alba",
"siruta": 10
},
{
"code": "AR",
"name": "Arad",
"siruta": 29
},
{
"code": "B",
"name": "București",
"siruta": 179132
},
{
"code": "CJ",
"name": "Cluj",
"siruta": 12
}
]
}Fields of each county: code, name, siruta (integer or null).
Caching
The response is cached for 1 hour and carries the ETag, X-Cache and Cache-Control (private) headers. Send the ETag back in the If-None-Match header to get a 304. A 304 is billed like a 200.
Common errors
403 insufficient_scope: the key lacks the postal_lookup scope.402 quota_exceeded: monthly quota used up.