Skip to main content
Skip table of contents

Обновление пользователя квартиры

Обновление пользователя квартиры

JSON
{
    "is_restricted_live": false,
    "is_restricted_archive": true,
    "is_open_door_key": true,
    "is_open_door_code": false,
    "is_open_door_face": false,
    "is_open_door_app": true
}

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

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

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


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


int user, Уникальный идентификатор пользователя


bool is_open_door_key, Включение/Выключение открытия домофона ключем.


bool is_open_door_code, Включение/Выключение открытия домофона временным кодом.


bool is_open_door_app, Включение/Выключение открытия домофона приложением.


bool is_open_door_face, Включение/Выключение открытия домофона распознанием лица.

200 OK

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

JSON
{
    "id": 10530,
    "flat": 1,
    "key_count": null,
    "users_count": null,
    "intercom_id": 5,
    "users": [
        {
            "id": 5,
            "name": "170500",
            "login": "170500",
            "created_by": null,
            "created_at": "2023-04-17T15:15:49.000000Z",
            "updated_at": "2023-07-24T12:19:32.000000Z",
            "expired_at": "2024-05-19T09:48:41.000000Z",
            "user_type": "user",
            "parent_id": null,
            "is_system": 0,
            "cameras_count": null,
            "is_licence_limit_reached": true,
            "ptz_priority": 10,
            "access_token_id": null,
            "is_restricted_live": true,
            "is_restricted_archive": true
        }
    ],
    "properties": {
        "is_analog_line_enable": false,
        "is_sip_line_enable": false,
        "is_can_manage_resistance": false,
        "handset_talk_analog_volumes": null,
        "handset_ring_analog_volumes": null,
        "panel_system_volumes": null,
        "panel_talk_analog_volumes": null,
        "number": null
    }
}

401 Unauthorized

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

cURL
BASH
curl -k --request POST \
	--url 'https://your-domain/api/v1/admin/intercoms/{intercom}/flats/{flat}/users/{user}' \
	--header 'Content-Type: application/json' \
	--header 'Accept: application/json' \
	--data '{
    "intercom": 0,
    "flat": 0,
    "user": 0,
    "is_open_door_key": true,
    "is_open_door_code": true,
    "is_open_door_app": true,
    "is_open_door_face": true
}'
PHP
PHP
$data = array (
  'intercom' => 0,
  'flat' => 0,
  'user' => 0,
  'is_open_door_key' => true,
  'is_open_door_code' => true,
  'is_open_door_app' => true,
  'is_open_door_face' => true,
);
$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/v1/admin/intercoms/{intercom}/flats/{flat}/users/{user}', false, $context);
JavaScript errors detected

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

If this problem persists, please contact our support.