26.09 26.06 26.05 25.12
26.09 26.06 26.05 25.12 Russian English

Update general apartment settings (v2)

Update general apartment settings (v2)

PATCH  /api/v2/billing/intercoms/{intercom}/flats-settings

Writes general apartment settings directly to the panel and waits for its response. Fields, types, and limits depend on the manufacturer and are specified in batch_settings_spec in the "Intercom capabilities (v2)" response. A panel without general apartment settings (capability panel_flat_settings) returns 422. If the panel rejects some settings, returns 422 with the keys of the groups that could not be saved: sounds, resistances, access.

JSON
{
    "main_speaker_volume": 5
}

Method parameters

int intercom  required , Intercom ID (in the URL)

204  No Content

Successful response

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 PATCH \
	--url 'https://your-domain/api/v2/billing/intercoms/{intercom}/flats-settings' \
	--header 'Content-Type: application/json' \
	--header 'Accept: application/json' \
	--data '{
    "intercom": 0
}'
PHP
PHP
$data = array (
  'intercom' => 0,
);
$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/v2/billing/intercoms/{intercom}/flats-settings', false, $context);