Skip to main content
Skip table of contents

Обновление настроек домофона квaртиры

Обновление квартиры

JSON
{
    "is_smartphone_sip_line_available": true,
    "is_landline_sip_line_available": false,
    "number": "91201692@vgw1.vms.local",
    "landline_number": "+375292769284",
    "users_to_attach": [
        5,
        6
    ],
    "users_to_detach": [
        6
    ],
    "keys_to_attach": [
        4
    ],
    "keys_to_detach": [
        3
    ],
    "map_user_key": {
        "user": 6,
        "method": "select",
        "keys": [
            1,
            2
        ]
    }
}

PATCH /api/admin/v1/intercoms/{intercom}/flats/{flat}

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

int intercom, Уникальный идентификатор домофона


int flat, Уникальный идентификатор квартиры


bool is_smartphone_sip_line_available, Включен ли звонок на смартфон


bool is_landline_sip_line_available, Включен ли звонок на городской номер телефона


bool is_analog_line_available, Включен ли звонок на аналоговую трубку


string landline_number, Городской номер телефона


string number, sip номер квартиры


array users_to_attach, массив пользователей которые будут добавлены в квартиру

object array

integer

 

users_to_attach.

 

REQUIRED

, id пользователя


array users_to_detach, массив пользователей которые будут удалены из квартиры

object array

integer

 

users_to_detach.

 

REQUIRED

, id пользователя


array keys_to_attach, массив ключей которые будут добавлены в квартиру

object array

integer

 

keys_to_attach.

 

REQUIRED

, id ключа


array keys_to_detach, массив ключей которые будут удалены из квартиры

object array

integer

 

keys_to_detach.

 

REQUIRED

, id ключа


integer|null panel_system_volumes, Системные звуки панели


integer|null handset_ring_analog_volumes, Громкость мелодии аналоговой трубки


integer|null handset_talk_analog_volumes, Громкость динамика в аналоговой трубке


integer|null panel_talk_analog_volumes, Громкость динамика панели при звонке на аналоговою трубку


integer|null panel_talk_mobile_volumes, Громкость динамика понели при использовании мобильного приложения


integer|null gail_panel_micro_mobile_volumes, Усиление микрофона панели при использовании мобильного приложения


integer|null answer_resistance, Уровень сопротивления поднятой аналоговой трубки


integer|null quiescent_resistance, Уровень сопротивления положенной аналоговой трубки

200 OK

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

JSON
{
    "id": 1,
    "flat": 1,
    "key_count": 3,
    "users_count": 2,
    "keys": [
        {
            "id": 1,
            "key": "0000003042CAAC",
            "user": {
                "id": 6,
                "name": "test",
                "login": "test@mail.com",
                "created_at": "2022-11-11 14:45:58",
                "updated_at": "2022-11-11 14:45:58",
                "expired_at": "2122-11-11 14:45:57",
                "is_licence_limit_reached": false,
                "ptz_priority": 1,
                "access_token_id": null
            },
            "created_at": "2022-11-11 14:46:16",
            "updated_at": "2022-11-14 15:56:40"
        },
        {
            "id": 2,
            "key": "000000A3B48D3C",
            "user": {
                "id": 6,
                "name": "test",
                "login": "test@mail.com",
                "created_at": "2022-11-11 14:45:58",
                "updated_at": "2022-11-11 14:45:58",
                "expired_at": "2122-11-11 14:45:57",
                "is_licence_limit_reached": false,
                "ptz_priority": 1,
                "access_token_id": null
            },
            "created_at": "2022-11-11 14:46:16",
            "updated_at": "2022-11-14 15:56:40"
        },
        {
            "id": 4,
            "key": "000000417EE9AA",
            "user": null,
            "created_at": "2022-11-11 14:46:16",
            "updated_at": "2022-11-14 15:56:40"
        }
    ],
    "users": [
        {
            "id": 5,
            "name": "user",
            "login": "user@mail.com",
            "created_at": "2022-11-11 14:45:57",
            "updated_at": "2022-11-11 14:45:57",
            "expired_at": "2122-11-11 14:45:57",
            "is_licence_limit_reached": false,
            "ptz_priority": 1,
            "access_token_id": null
        },
        {
            "id": 6,
            "name": "test",
            "login": "test@mail.com",
            "created_at": "2022-11-11 14:45:58",
            "updated_at": "2022-11-11 14:45:58",
            "expired_at": "2122-11-11 14:45:57",
            "is_licence_limit_reached": false,
            "ptz_priority": 1,
            "access_token_id": null
        }
    ],
    "properties": {
        "is_analog_line_enable": false,
        "is_sip_line_enable": true
    }
}

401 Unauthorized

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

cURL
BASH
curl -k --request POST \
	--url 'https://your-domain/api/admin/v1/intercoms/{intercom}/flats/{flat}' \
	--header 'Content-Type: application/json' \
	--header 'Accept: application/json' \
	--data '{
    "intercom": 0,
    "flat": 0,
    "is_smartphone_sip_line_available": true,
    "is_landline_sip_line_available": true,
    "is_analog_line_available": true,
    "landline_number": "string",
    "number": "string",
    "users_to_attach": {
        "": "integer"
    },
    "users_to_attach.": "void",
    "users_to_detach": {
        "": "integer"
    },
    "users_to_detach.": "void",
    "keys_to_attach": {
        "": "integer"
    },
    "keys_to_attach.": "void",
    "keys_to_detach": {
        "": "integer"
    },
    "keys_to_detach.": "void",
    "map_user_key.user": "void",
    "map_user_key": {
        "user": [],
        "method": [],
        "keys": {
            "": []
        }
    },
    "map_user_key.method": "void",
    "map_user_key.keys": "void",
    "map_user_key.keys.": "void",
    "panel_system_volumes": "integer|null",
    "handset_ring_analog_volumes": "integer|null",
    "handset_talk_analog_volumes": "integer|null",
    "panel_talk_analog_volumes": "integer|null",
    "panel_talk_mobile_volumes": "integer|null",
    "gail_panel_micro_mobile_volumes": "integer|null",
    "answer_resistance": "integer|null",
    "quiescent_resistance": "integer|null"
}'
PHP
PHP
$data = array (
  'intercom' => 0,
  'flat' => 0,
  'is_smartphone_sip_line_available' => true,
  'is_landline_sip_line_available' => true,
  'is_analog_line_available' => true,
  'landline_number' => 'string',
  'number' => 'string',
  'users_to_attach' => 
  array (
    '' => 'integer',
  ),
  'users_to_attach.' => 'void',
  'users_to_detach' => 
  array (
    '' => 'integer',
  ),
  'users_to_detach.' => 'void',
  'keys_to_attach' => 
  array (
    '' => 'integer',
  ),
  'keys_to_attach.' => 'void',
  'keys_to_detach' => 
  array (
    '' => 'integer',
  ),
  'keys_to_detach.' => 'void',
  'map_user_key.user' => 'void',
  'map_user_key' => 
  array (
    'user' => 
    array (
    ),
    'method' => 
    array (
    ),
    'keys' => 
    array (
      '' => 
      array (
      ),
    ),
  ),
  'map_user_key.method' => 'void',
  'map_user_key.keys' => 'void',
  'map_user_key.keys.' => 'void',
  'panel_system_volumes' => 'integer|null',
  'handset_ring_analog_volumes' => 'integer|null',
  'handset_talk_analog_volumes' => 'integer|null',
  'panel_talk_analog_volumes' => 'integer|null',
  'panel_talk_mobile_volumes' => 'integer|null',
  'gail_panel_micro_mobile_volumes' => 'integer|null',
  'answer_resistance' => 'integer|null',
  'quiescent_resistance' => 'integer|null',
);
$context = stream_context_create([
	'ssl'=>['verify_peer' => false],
	'http' => [
		'method' => 'PATCH',
		'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/{flat}', false, $context);
JavaScript errors detected

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

If this problem persists, please contact our support.