Skip to main content
Skip table of contents

Settlements

Settlements

List of settlements. Used to find settlements.

GET /api/admin/v1/csa/cities

Method parameters

int region_id, id ID of the region to retrieve settlements from, Regions


int district_id, ID of the district to retrieve settlements from, Districts

200 OK

List of settlements

JSON
[
    {
        "city_id": 370,
        "name": "City"
    },
    {
        "city_id": 330,
        "name": "City"
    },
    {
        "city_id": 271,
        "name": "City"
    },
    {
        "city_id": 272,
        "name": "City"
    },
    {
        "city_id": 270,
        "name": "City"
    },
    {
        "city_id": 269,
        "name": "City"
    }
]

401 Unauthorized

Authorization token is not provided or is invalid. Obtaining a token

cURL
BASH
curl -k --request POST \
	--url 'https://your-domain/api/admin/v1/csa/cities' \
	--header 'Content-Type: application/json' \
	--header 'Accept: application/json' \
	--data '{
    "region_id": 0,
    "district_id": 0
}'
PHP
PHP
$data = array (
  'region_id' => 0,
  'district_id' => 0,
);
$context = stream_context_create([
	'ssl'=>['verify_peer' => false],
	'http' => [
		'method' => 'GET',
		'header' => "Content-Type: application/json\r
Accept: application/json",
		'content'=>json_encode($data)
	]
]);
$result = file_get_contents('https://your-domain/api/admin/v1/csa/cities', false, $context);
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.