26.09 26.06 26.05 25.12
26.09 26.06 26.05 25.12 Russian English

Close the door (v2)

Close the door (v2)

POST  /api/v2/billing/intercoms/{intercom}/close-door

Closes a door that was opened indefinitely (duration: full_time). A panel without capability door_close returns 422. Waiting for the panel response and response codes work the same way as for opening the door.

Method parameters

int intercom  required , Intercom ID (in the URL)


boolean async, Do not wait for the panel response: immediately return 202 with `request_id`

204  No Content

Panel confirmed the command

202  Accepted

Command accepted; panel confirmation is still pending

JSON
{
    "request_id": "9b2f6c1e-3c1a-4d5e-8f7a-1b2c3d4e5f60"
}

404  Not Found

Intercom not found

422  Unprocessable Entity

Returns a JSON error object. 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 POST \
	--url 'https://your-domain/api/v2/billing/intercoms/{intercom}/close-door' \
	--header 'Content-Type: application/json' \
	--header 'Accept: application/json' \
	--data '{
    "intercom": 0,
    "async": "boolean"
}'
PHP
PHP
$data = array (
  'intercom' => 0,
  'async' => 'boolean',
);
$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/v2/billing/intercoms/{intercom}/close-door', false, $context);