26.09 26.06 26.05 25.12
26.09 26.06 26.05 25.12 Russian English

Open the door (v2)

Open the door (v2)

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

Without duration the door opens with a pulse (capability device_control). duration: full_time opens the door and keeps it open until a close command is sent; requires capabilities door_hold_open and door_close. Other duration values open the door for a specified duration; requires capability door_open_with_duration. Returns 422 if the panel does not support the requested mode.

By default, the request waits for a response from the panel: 204 means the panel confirmed the command; 202 with request_id means the command was accepted but not yet confirmed; 422 means the panel rejected the command or is unavailable. With async: true the request does not wait for the panel and immediately returns 202 with request_id.

JSON
{
    "duration": "full_time",
    "async": false
}

Method parameters

int intercom  required , Intercom ID (in the URL)


string duration, Opening duration: `1_minute`, `10_minutes`, `30_minutes`, `1_hour`, `6_hours`, `12_hours`, `24_hours`, `full_time`


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}/open-door' \
	--header 'Content-Type: application/json' \
	--header 'Accept: application/json' \
	--data '{
    "intercom": 0,
    "duration": "string",
    "async": "boolean"
}'
PHP
PHP
$data = array (
  'intercom' => 0,
  'duration' => 'string',
  '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}/open-door', false, $context);