26.09 26.06 26.05 25.12
26.09 26.06 26.05 25.12 Russian English

Update intercom (v1)

Update an intercom (v1)

With the release of request version v2, version v1 is being moved to legacy.
For new integrations, use the current v2.
Version v1 remains available to support existing integrations.

PATCH  /api/v1/billing/intercoms

The intercom is identified by id or mac,; id and mac cannot be used together.

Panel access settings can be updated in one of two mutually exclusive ways:

  • onvif_credentials — only credentials are saved; no connection to the panel is made.

  • schema, ip, port, login, password — VMS connects to the panel using the specified network settings, reads its mac, model and serial_number, checks model support, configures the SIP server address, and closes the doors. The intercom status is then recalculated (installed/uninstalled). All five parameters must be provided together. If the panel cannot be reached or its model is unsupported, an error is returned under 422; network settings are not applied.

JSON
{
    "group_external_id": "00000000-0000-0000-0000-000000000001",
    "flat_from": 1,
    "flat_to": 15,
    "new_serial_number": "new_serial_number",
    "mac": "AA:BB:CC:DD:EE:FF",
    "new_mac": "22:0D:CE:38:E7:15",
    "model": "3516EV200",
    "name": "intercom name",
    "department": 1,
    "log_extra": {
        "some": "information"
    }
}

Update panel network settings:

JSON
{
    "id": 1,
    "schema": "http",
    "ip": "192.168.1.100",
    "port": 80,
    "login": "admin",
    "password": "password"
}

Method parameters

int id, Intercom ID.


string mac, Intercom MAC address.


string name, Intercom name.


integer flat_from, First apartment number connected to the intercom.


integer flat_to, Last apartment number connected to the intercom.


integer group_id  required , ID of the group (address) where the intercom should be placed.


string group_external_id, External ID of the group (address) (used instead of `group_id`).


string new_mac, New intercom MAC address.


string new_serial_number, New intercom serial number.


string model, Intercom model (required when updating `new_mac` or `new_serial_number`).


string|array log_extra, Additional information received from an external system.


array onvif_credentials, Credentials for accessing the camera through ONVIF. Cannot be provided with `schema`, `ip`, `port`, `login`, or `password`.

object array

string onvif_credentials.login, ONVIF username.


string onvif_credentials.password, ONVIF password. Must not contain spaces, Cyrillic characters, or any of these characters: `: / ? # [ ] @ ! $ & ' ( ) * + , ; =`.


integer onvif_credentials.port, ONVIF port (1–65535).


string schema, Panel connection scheme: `http` or `https`. Required when providing `ip`, `port`, `login`, and `password`.


string ip, Panel IP address (IPv4), unique among intercoms (excluding this intercom). Required when providing `schema`, `port`, `login`, and `password`.


integer port, Panel port. Required when providing `schema`, `ip`, `login`, and `password`.


string login, Panel username. Required when providing `schema`, `ip`, `port`, and `password`.


string password, Panel password. Required when providing `schema`, `ip`, `port`, and `login`.


boolean is_restricted_live, Restriction on viewing the intercom camera's live stream.


boolean is_restricted_archive, Restriction on viewing the intercom camera's archive recordings.


boolean is_open_door_face, Opening by face recognition. Cannot be enabled if face recognition opening is disabled on the platform and the intercom (422).

200  OK

Successful response with updated intercom data

JSON
{
    "id": 123,
    "external_id": "EXT_123",
    "department": "main",
    "title": "New name",
    "mac": "22:22:22:22:22:22",
    "model": "DKS20211",
    "serial_number": "NEW_SERIAL_123",
    "status": "active",
    "flat_from": 1,
    "flat_to": 100,
    "source": "auto-replace",
    "group": {
        "id": 6,
        "name": "4",
        "external_id": "0e4bbda6-b7a5-4db4-8178-315bf0006d11",
        "has_items": false
    }
}

422  Unprocessable Entity

Returns a JSON object containing an error. For a gate, flat_from and flat_to are not sent, and changes to is_restricted_live and is_restricted_archive are rejected; the error is returned under the key error.

For more information, see General information > Validation.

JSON
{
    "message": "No informative message is provided here",
    "errors": {
        "any_key": [
            "The reason for the error is described here"
        ]
    }
}
cURL
Bash
curl -k --request PATCH \
	--url 'https://your-domain/api/v1/billing/intercoms' \
	--header 'Content-Type: application/json' \
	--header 'Accept: application/json' \
	--data '{
    "id": 0,
    "mac": "string",
    "name": "string",
    "flat_from": "integer",
    "flat_to": "integer",
    "group_id": "integer",
    "group_external_id": "string",
    "new_mac": "string",
    "new_serial_number": "string",
    "model": "string",
    "log_extra": "string|array",
    "onvif_credentials": {
        "login": "string",
        "password": "string",
        "port": "integer"
    },
    "onvif_credentials.login": "void",
    "onvif_credentials.password": "void",
    "onvif_credentials.port": "void",
    "schema": "string",
    "ip": "string",
    "port": "integer",
    "login": "string",
    "password": "string",
    "is_restricted_live": "boolean",
    "is_restricted_archive": "boolean",
    "is_open_door_face": "boolean"
}'
PHP
PHP
$data = array (
  'id' => 0,
  'mac' => 'string',
  'name' => 'string',
  'flat_from' => 'integer',
  'flat_to' => 'integer',
  'group_id' => 'integer',
  'group_external_id' => 'string',
  'new_mac' => 'string',
  'new_serial_number' => 'string',
  'model' => 'string',
  'log_extra' => 'string|array',
  'onvif_credentials' => 
  array (
    'login' => 'string',
    'password' => 'string',
    'port' => 'integer',
  ),
  'onvif_credentials.login' => 'void',
  'onvif_credentials.password' => 'void',
  'onvif_credentials.port' => 'void',
  'schema' => 'string',
  'ip' => 'string',
  'port' => 'integer',
  'login' => 'string',
  'password' => 'string',
  'is_restricted_live' => 'boolean',
  'is_restricted_archive' => 'boolean',
  'is_open_door_face' => 'boolean',
);
$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/billing/intercoms', false, $context);