Breadcrumbs

Мanage user intercoms

The method and parameters

POST  /api/v1/billing/user/manage/intercoms

The method is used to manage user's intercoms. It synchronizes intercoms with the user's associated apartments based on their login.

JSON
{
    "login": "test@mail.com",
    "sync": [
        {
            "intercom_external_id": "qweasdzxc",
            "flat": 15,
            "is_restricted_live": true,
            "is_restricted_archive": true,
            "is_open_door_key": false,
            "is_open_door_code": false,
            "is_open_door_app": true,
            "is_open_door_face": true,
            "landline_number": "+375291112233"
        },
        {
            "intercom_id": 1,
            "flat": 10,
            "is_restricted_live": true,
            "is_restricted_archive": true,
            "is_open_door_key": false,
            "is_open_door_code": false,
            "is_open_door_app": true,
            "is_open_door_face": true,
            "landline_number": null
        }
    ],
    "delete": [
        1,
        2,
        3
    ]
}

The parameters

string login – a user login


array update – An array linking the intercom and the user’s apartment


array delete – An array of intercom identifiers that must be detached from the user



204  No Content

A successful response

422  Unprocessable Entity

Returns a JSON object with an error. For details, see General information > Validation.

JSON
{
    "message": "No error message here",
    "errors": {
        "any_key": [
            "Error details"
        ]
    }
}
cURL
Bash
curl -k --request POST \
	--url 'https://your-domain/api/v1/billing/user/manage/intercoms' \
	--header 'Content-Type: application/json' \
	--header 'Accept: application/json' \
	--data '{
    "login": "string",
    "update": {
        "": "boolean"
    },
    "update.": "void",
    "delete": {
        "": 0
    },
    "delete.": "void"
}'
PHP
PHP
$data = array (
  'login' => 'string',
  'update' => 
  array (
    '' => 'boolean',
  ),
  'update.' => 'void',
  'delete' => 
  array (
    '' => 0,
  ),
  'delete.' => 'void',
);
$context = stream_context_create([
	'ssl'=>['verify_peer' => false],
	'http' => [
		'method' => 'POST',
		'header' => "Content-Type: application/json\r
Accept: application/json",
		'content'=>json_encode($data)
	]
]);
$result = file_get_contents('https://your-domain/api/v1/billing/user/manage/intercoms', false, $context);