List municipalities
curl --request GET \
--url https://www.registeruz.sk/cruz-public/api/sidlaimport requests
url = "https://www.registeruz.sk/cruz-public/api/sidla"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://www.registeruz.sk/cruz-public/api/sidla', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://www.registeruz.sk/cruz-public/api/sidla",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://www.registeruz.sk/cruz-public/api/sidla"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://www.registeruz.sk/cruz-public/api/sidla")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.registeruz.sk/cruz-public/api/sidla")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"lokacie": [
{
"kod": "<string>",
"nazov": {
"sk": "<string>",
"en": "<string>"
},
"nadradenaLokacia": "<string>"
}
]
}Codelists
List municipalities
Returns all municipality codes and labels.
GET
/
api
/
sidla
List municipalities
curl --request GET \
--url https://www.registeruz.sk/cruz-public/api/sidlaimport requests
url = "https://www.registeruz.sk/cruz-public/api/sidla"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://www.registeruz.sk/cruz-public/api/sidla', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://www.registeruz.sk/cruz-public/api/sidla",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://www.registeruz.sk/cruz-public/api/sidla"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://www.registeruz.sk/cruz-public/api/sidla")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.registeruz.sk/cruz-public/api/sidla")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"lokacie": [
{
"kod": "<string>",
"nazov": {
"sk": "<string>",
"en": "<string>"
},
"nadradenaLokacia": "<string>"
}
]
}You can use this endpoint to resolve the
sidlo field from the response on an Accounting unit into a human-readable label.
The source code for this endpoint is the ŠÚSR codelist
0025/LSUJ2.Common patterns
Resolve a municipality code
Resolve a municipality code
Fetch all municipalities and find the matching label for a
sidlo code on an accounting unit.Resolve a municipality code
// 1. Fetch all municipalities
const { lokacie } = await fetch(`${BASE}/api/sidla`).then(r => r.json());
// 2. Resolve the municipality label for an accounting unit
const municipality = lokacie.find(m => m.kod === unit.sidlo);
// 3. Log the municipality label
console.log(municipality?.nazov?.sk);
Response
200 - application/json
Municipalities returned successfully.
Show child attributes
Show child attributes
⌘I