Skip to main content
Skip table of contents

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

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

Headers

Authorization

Bearer token

Accept

application/json

X-Client

ios-cctv|android-cctv|thick-legal|web

X-UUID

unique device id

Body

per_pagerequired

int

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

pagerequired

int

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

searchrequired

string

Response

200

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

JSON
{
                "data": [
                    {
                        "id": 1,
                        "flat": 1,
                        "key_count": 0,
                        "users_count": 0,
                        "intercom_id": 1,
                        "properties": {
                            "duplicate_number": "+хххххххххххх",
                            "is_duplicated_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,
                            "duplicate_number": null,
                            "is_duplicated_sip_line_available": true,
                            "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,
                            "duplicate_number": null,
                            "is_duplicated_sip_line_available": true,
                            "number": "917423",
                            "is_sip_line_enable": true
                        }
                    },
                    {
                        "id": 4,
                        "flat": 4,
                        "key_count": 0,
                        "users_count": 0,
                        "intercom_id": 1,
                        "properties": {
                            "is_analog_line_enable": true,
                            "is_can_manage_resistance": true,
                            "duplicate_number": null,
                            "is_duplicated_sip_line_available": true,
                            "number": "184787",
                            "is_sip_line_enable": true
                        }
                    },
                    {
                        "id": 5,
                        "flat": 5,
                        "key_count": 0,
                        "users_count": 0,
                        "intercom_id": 1,
                        "properties": {
                            "is_analog_line_enable": true,
                            "is_can_manage_resistance": true,
                            "duplicate_number": null,
                            "is_duplicated_sip_line_available": true,
                            "number": "556946",
                            "is_sip_line_enable": true
                        }
                    }
                ],
                "links": {
                    "first": "http://127.0.0.1:8080/api/admin/v1/intercoms/1/flats?page=1",
                    "last": "http://127.0.0.1:8080/api/admin/v1/intercoms/1/flats?page=4",
                    "prev": null,
                    "next": "http://127.0.0.1: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": "http://127.0.0.1:8080/api/admin/v1/intercoms/1/flats?page=1",
                            "label": "1",
                            "active": true
                        },
                        {
                            "url": "http://127.0.0.1:8080/api/admin/v1/intercoms/1/flats?page=2",
                            "label": "2",
                            "active": false
                        },
                        {
                            "url": "http://127.0.0.1:8080/api/admin/v1/intercoms/1/flats?page=3",
                            "label": "3",
                            "active": false
                        },
                        {
                            "url": "http://127.0.0.1:8080/api/admin/v1/intercoms/1/flats?page=4",
                            "label": "4",
                            "active": false
                        },
                        {
                            "url": "http://127.0.0.1:8080/api/admin/v1/intercoms/1/flats?page=2",
                            "label": "pagination.next",
                            "active": false
                        }
                    ],
                    "path": "http://127.0.0.1:8080/api/admin/v1/intercoms/1/flats",
                    "per_page": 5,
                    "to": 5,
                    "total": 20
                }
            }
401

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

422

Возвращает JSON объект с ошибкой, см. Валидация

JSON
{
    "message": "Тут не будет информативного сообщения",
    "errors": {
        "any_key": [
            "Тут будет описана причина ошибки"
        ]
    }
}

Пример

JSON
curl -k --location --request GET 'https://vms.local/api/admin/v1/intercoms/{intercom}/flats?per_page=int&page=int&search=string' \
--header 'Authorization:Bearer token' \
--header 'Accept:application/json' \
--header 'X-Client:ios-cctv|android-cctv|thick-legal|web' \
--header 'X-UUID:unique device id'
JavaScript errors detected

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

If this problem persists, please contact our support.