Skip to main content
Skip table of contents

Обновление ключa

Обновление ключа

JSON
{
    "flat": 7
}

PATCH /api/admin/v1/intercoms/{intercom}/keys/{intercom_key}

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

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


int intercom_key, Уникальный идентификатор ключа


integer flat, flat квартиры, к которой будут привязаны ключи [VMS Admin/Домофоны/Квартиры домофона/Список квартир домофона](../flats/index.md)

200 OK

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

JSON
{
    "id": 7,
    "key": "0000003045CAAC",
    "flat": {
        "id": 7,
        "flat": 7,
        "key_count": null,
        "users_count": null,
        "number": null,
        "landline_number": null,
        "is_smartphone_sip_line_available": false,
        "is_landline_sip_line_available": true,
        "is_analog_line_enable": false,
        "is_sip_line_enable": false
    },
    "created_at": "2022-11-14 14:27:14",
    "updated_at": "2022-11-14 14:31:21",
    "deleted_at": null
}

401 Unauthorized

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

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

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

If this problem persists, please contact our support.