Skip to main content
Skip table of contents

Районы

Районы

Список районов.

GET /api/admin/v1/csa/districts

Параметры метода

int region_id, id области, в которой необходимо получить населенные пункты Области

200 OK

Список регионов

JSON
[
    {
        "district_id": 104,
        "name": "Район"
    },
    {
        "district_id": 108,
        "name": "Район"
    },
    {
        "district_id": 112,
        "name": "Район"
    },
    {
        "district_id": 116,
        "name": "Район"
    },
    {
        "district_id": 120,
        "name": "Район"
    },
    {
        "district_id": 125,
        "name": "Район"
    },
    {
        "district_id": 130,
        "name": "Район"
    },
    {
        "district_id": 134,
        "name": "Район"
    },
    {
        "district_id": 140,
        "name": "Район"
    },
    {
        "district_id": 143,
        "name": "Район"
    },
    {
        "district_id": 147,
        "name": "Район"
    },
    {
        "district_id": 150,
        "name": "Район"
    },
    {
        "district_id": 152,
        "name": "Район"
    },
    {
        "district_id": 154,
        "name": "Район"
    },
    {
        "district_id": 156,
        "name": "Район"
    },
    {
        "district_id": 158,
        "name": "Район"
    }
]

401 Unauthorized

Токен авторизации не передан или не валидный Получение токена

cURL
BASH
curl -k --request POST \
	--url 'https://your-domain/api/admin/v1/csa/districts' \
	--header 'Content-Type: application/json' \
	--header 'Accept: application/json' \
	--data '{
    "region_id": 0
}'
PHP
PHP
$data = array (
  'region_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/districts', false, $context);
JavaScript errors detected

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

If this problem persists, please contact our support.