26.09 26.06 26.05 25.12
26.09 26.06 26.05 25.12 Russian English

Update apartment settings (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/intercom-flats

The intercom can be specified by intercom_id. The apartment can be specified by flat or flat_id.

Example request body:

JSON
{
    "intercom_id": 1,
    "flat": 10,
    "is_smartphone_sip_line_available": true,
    "is_landline_sip_line_available": true,
    "is_analog_line_available": false
}

Method parameters

int intercom_id, Intercom ID


int flat, Apartment number (mutually exclusive with flat_id)


int flat_id, Intercom apartment record ID (mutually exclusive with flat)


bool is_smartphone_sip_line_available, SIP line availability (smartphone)


bool is_landline_sip_line_available, SIP line availability (landline)


bool is_analog_line_available, Analog line availability

200  OK

Successful response with the updated apartment

JSON
{
    "id": 10,
    "flat": 12,
    "key_count": 0,
    "users_count": 0,
    "intercom_id": 1,
    "properties": {
        "is_smartphone_sip_line_available": true,
        "is_landline_sip_line_available": false,
        "is_analog_line_available": true
    }
}

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/v1/billing/intercom-flats' \
	--header 'Content-Type: application/json' \
	--header 'Accept: application/json' \
	--data '{
    "intercom_id": 0,
    "flat": 0,
    "flat_id": 0,
    "is_smartphone_sip_line_available": true,
    "is_landline_sip_line_available": true,
    "is_analog_line_available": true
}'
PHP
PHP
$data = array (
  'intercom_id' => 0,
  'flat' => 0,
  'flat_id' => 0,
  'is_smartphone_sip_line_available' => true,
  'is_landline_sip_line_available' => true,
  'is_analog_line_available' => true,
);
$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/intercom-flats', false, $context);