Skip to main content
Skip table of contents

Districts

Districts

List of districts.

GET /api/admin/v1/csa/districts

Method parameters

int region_id, ID of the region in which to retrieve the localities (towns/cities) of the region, Regions

200 OK

List of districts

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

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/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.