Skip to main content
Skip table of contents

Список квартир домофонa

Список квартир домофона

GET /api/admin/v1/intercoms/{intercom}/flats

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

int per_page, Кол-во элементов в одной странице пагинации. По умолчанию 25 элементов


int page, Номер страницы пагинации


string search

200 OK

Успешный ответ

JSON
{
    "data": [
        {
            "id": 1,
            "flat": 1,
            "key_count": 0,
            "users_count": 0,
            "intercom_id": 1,
            "properties": {
                "landline_number": "+375291231212",
                "is_smartphone_sip_line_available": true,
                "is_landline_sip_line_available": true,
                "number": "159844",
                "is_sip_line_enable": true,
                "is_analog_line_enable": true,
                "is_can_manage_resistance": true
            }
        },
        {
            "id": 2,
            "flat": 2,
            "key_count": 0,
            "users_count": 0,
            "intercom_id": 1,
            "properties": {
                "is_analog_line_enable": true,
                "is_can_manage_resistance": true,
                "landline_number": null,
                "is_smartphone_sip_line_available": true,
                "is_landline_sip_line_available": false,
                "number": "636695",
                "is_sip_line_enable": true
            }
        },
        {
            "id": 3,
            "flat": 3,
            "key_count": 0,
            "users_count": 0,
            "intercom_id": 1,
            "properties": {
                "is_analog_line_enable": true,
                "is_can_manage_resistance": true,
                "landline_number": null,
                "is_smartphone_sip_line_available": false,
                "is_landline_sip_line_available": false,
                "number": "917423",
                "is_sip_line_enable": true
            }
        }
    ],
    "links": {
        "first": "https://vms.local:8080/api/admin/v1/intercoms/1/flats?page=1",
        "last": "https://vms.local:8080/api/admin/v1/intercoms/1/flats?page=4",
        "prev": null,
        "next": "https://vms.local:8080/api/admin/v1/intercoms/1/flats?page=2"
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 4,
        "links": [
            {
                "url": null,
                "label": "pagination.previous",
                "active": false
            },
            {
                "url": "https://vms.local:8080/api/admin/v1/intercoms/1/flats?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": "https://vms.local:8080/api/admin/v1/intercoms/1/flats?page=2",
                "label": "2",
                "active": false
            },
            {
                "url": "https://vms.local:8080/api/admin/v1/intercoms/1/flats?page=3",
                "label": "3",
                "active": false
            },
            {
                "url": "https://vms.local:8080/api/admin/v1/intercoms/1/flats?page=4",
                "label": "4",
                "active": false
            },
            {
                "url": "https://vms.local:8080/api/admin/v1/intercoms/1/flats?page=2",
                "label": "pagination.next",
                "active": false
            }
        ],
        "path": "https://vms.local:8080/api/admin/v1/intercoms/1/flats",
        "per_page": 5,
        "to": 5,
        "total": 20
    }
}

401 Unauthorized

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

422 Unprocessable Entity

Возвращает JSON объект с ошибкой. VMS Admin/Общая информация панели администратора/Валидация администратора

JSON
{
    "message": "Тут не будет информативного сообщения",
    "errors": {
        "any_key": [
            "Тут будет описана причина ошибки"
        ]
    }
}
cURL
BASH
curl -k --request POST \
	--url 'https://your-domain/api/admin/v1/intercoms/{intercom}/flats' \
	--header 'Content-Type: application/json' \
	--header 'Accept: application/json' \
	--data '{
    "per_page": 0,
    "page": 0,
    "search": "string"
}'
PHP
PHP
$data = array (
  'per_page' => 0,
  'page' => 0,
  'search' => 'string',
);
$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/intercoms/{intercom}/flats', false, $context);
JavaScript errors detected

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

If this problem persists, please contact our support.