Skip to main content
GET
/
api
/
okresy
List districts
curl --request GET \
  --url https://www.registeruz.sk/cruz-public/api/okresy
{
  "lokacie": [
    {
      "kod": "<string>",
      "nazov": {
        "sk": "<string>",
        "en": "<string>"
      },
      "nadradenaLokacia": "<string>"
    }
  ]
}
You can use this endpoint to resolve the okres field from the response on an Accounting unit into a human-readable label.
The source code for this endpoint is the ŠÚSR codelist 0024/LSUJ1.

Common patterns

Fetch all districts and find the matching label for an okres code on an accounting unit.
Resolve a district code
// 1. Fetch all districts
const { lokacie } = await fetch(`${BASE}/api/okresy`).then(r => r.json());

// 2. Resolve the district label for an accounting unit
const district = lokacie.find(d => d.kod === unit.okres);

// 3. Log the district label
console.log(district?.nazov?.sk);

Response

200 - application/json

Districts returned successfully.

lokacie
object[]