> ## Documentation Index
> Fetch the complete documentation index at: https://slovakapi.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# List districts

> Returns all district codes and labels.

You can use this endpoint to resolve the `okres` field from the response on an [Accounting unit](/ruz/api-reference/entity-details/get-accounting-unit) into a human-readable label.

<Info>The source code for this endpoint is the ŠÚSR codelist `0024/LSUJ1`.</Info>

***

## Common patterns

<AccordionGroup>
  <Accordion title="Resolve a district code">
    Fetch all districts and find the matching label for an `okres` code on an accounting unit.

    ```js Resolve a district code theme={null}
    // 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);
    ```
  </Accordion>
</AccordionGroup>


## OpenAPI

````yaml ruz/openapi.json GET /api/okresy
openapi: 3.1.0
info:
  title: RÚZ API
  description: >-
    Public REST API for Slovakia's Register of Financial Statements (Register
    účtovných závierok). Exposes accounting units, financial statements,
    financial reports, and annual reports in JSON. Data is updated throughout
    the day as records are published.
  version: 2.5.0
  license:
    name: Creative Commons Zero (CC0)
    url: https://creativecommons.org/publicdomain/zero/1.0/
servers:
  - url: https://www.registeruz.sk/cruz-public
    description: Production
security: []
paths:
  /api/okresy:
    get:
      summary: List districts
      description: >-
        Returns all district codes and labels from ŠÚSR codelist `0024/LSUJ1`.
        No parameters required.


        Use codes to resolve the `okres` field on accounting units.
      operationId: listDistricts
      responses:
        '200':
          description: Districts returned successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LocationList'
components:
  schemas:
    LocationList:
      type: object
      properties:
        lokacie:
          type: array
          items:
            $ref: '#/components/schemas/LocationItem'
    LocationItem:
      type: object
      properties:
        kod:
          type: string
          description: Location code.
        nazov:
          $ref: '#/components/schemas/LocalizedText'
        nadradenaLokacia:
          type: string
          description: Parent location code — present for districts and municipalities.
    LocalizedText:
      type: object
      description: A text value with localized variants.
      properties:
        sk:
          type: string
          description: Slovak label.
        en:
          type: string
          description: English label.

````