Skip to main content
Skip table of contents

Update settings for an intercom

Apartment update

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}

Parameters

int intercom, Unique identifier of the intercom


int flat, Unique apartment identifier


bool is_smartphone_sip_line_available, Whether smartphone ringing is enabled


bool is_landline_sip_line_available, Is calling to a landline phone number enabled?


bool is_analog_line_available, Whether analog handset ringing is enabled


string landline_number, Landline phone number


string number, sip apartment number


array users_to_attach, array of users that will be added to the apartment

object array

integer

 

users_to_attach.

 

REQUIRED

, user id


array users_to_detach, array of users who will be deleted from the apartment

object array

integer

 

users_to_detach.

 

REQUIRED

, user id


array keys_to_attach, an array of keys that will be added to the apartment

object array

integer

 

keys_to_attach.

 

REQUIRED

, id ключа


array keys_to_detach, array of keys that will be deleted from the apartment

object array

integer

 

keys_to_detach.

 

REQUIRED

, key id


integer|null panel_system_volumes, Panel system sounds


integer|null handset_ring_analog_volumes, Analog handset melody volume


integer|null handset_talk_analog_volumes, Analog handset speaker volume


integer|null panel_talk_analog_volumes, Panel speaker volume when calling an analog handset


integer|null panel_talk_mobile_volumes, Speaker volume decreased when using the mobile application


integer|null gail_panel_micro_mobile_volumes, Gain the panel microphone when using a mobile application


integer|null answer_resistance, Resistance level of the analog handset raised


integer|null quiescent_resistance, On-hook resistance level

200 OK

Successful response

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

Authorization token not sent or not valid

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.