Breadcrumbs

Delete a tree element

The method and parameters

DELETE  /api/v1/billing/tree

A tree element can be deleted only if it has no child elements and contains no leaf objects.

A tree element can be deleted by id or by external_id.

JSON
{
    "id": 16,
    "external_id": "current_value",
    "type": "cameras|intercoms",
    "log_extra": {
        "some": "information"
    }
}

int id – the ID of the tree element to be deleted


string|int external_id – the key of the tree element


string type – the type of tree within which deletion occurs


string|array log_extra – additional information received from an external system

204  No Content

A successful response

cURL
Bash
curl -k --request DELETE \
	--url 'https://your-domain/api/v1/billing/tree' \
	--header 'Content-Type: application/json' \
	--header 'Accept: application/json' \
	--data '{
    "id": 0,
    "external_id": "string|int",
    "type": "string",
    "log_extra": "string|array"
}'
PHP
PHP
$data = array (
  'id' => 0,
  'external_id' => 'string|int',
  'type' => 'string',
  'log_extra' => 'string|array',
);
$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/v1/billing/tree', false, $context);