26.09 26.06 26.05 25.12
26.09 26.06 26.05 25.12 Russian English

Unlink residents from apartment (v2)

DELETE  /api/v2/billing/intercoms/{intercom}/flats/{flat}/users

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.

Unlinks users from an apartment. Returns 404 if the apartment belongs to another intercom.

JSON
{
    "users": [
        1001
    ]
}

Method parameters

int intercom  required , Intercom ID (in the URL)


int flat  required , Intercom apartment ID (in the URL)


array users  required , User IDs, 1 to 100, without duplicates

object array

int users.  required , User ID


204  No Content

Successful response

404  Not Found

Intercom not found or apartment belongs to another intercom

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 DELETE \
	--url 'https://your-domain/api/v2/billing/intercoms/{intercom}/flats/{flat}/users' \
	--header 'Content-Type: application/json' \
	--header 'Accept: application/json' \
	--data '{
    "intercom": 0,
    "flat": 0,
    "users": {
        "": 0
    },
    "users.": "void"
}'
PHP
PHP
$data = array (
  'intercom' => 0,
  'flat' => 0,
  'users' => 
  array (
    '' => 0,
  ),
  'users.' => 'void',
);
$context = stream_context_create([
	'ssl'=>['verify_peer' => false],
	'http' => [
		'method' => 'DELETE',
		'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/{flat}/users', false, $context);