Creating a tree element
There are two types of tree, for cameras and for intercoms.
When creating elements, you can specify your own key, by which you can refer to this element. These keys must be unique within the same tree type.
When creating a subelement in the tree, you can send both the id from our database and the key that is specified during creation.
A tree element cannot contain subelements and leaf objects at the same time.
Once a tree root is created, it will be available to administrators who have access to Sync Tree Roots to User (groups-root-sync)
POST/api/v1/billing/treeHeaders | |||||||||
Accept | application/json |
Body | |||||||||
json |
JSON
| ||||||||
namerequired | string | Tree element name | |||||||
typerequired | string | tree type | |||||||
external_idrequired | string|int | Key for tree element | |||||||
parent_idrequired | int | Required to create a sub-element in the tree through id in our database | |||||||
parent_external_idrequired | string|int | Required to create a sub-element in the tree through a unique key specified when it was created |
Response | |||||||||
201 | Successful response | ||||||||
JSON
| |||||||||
422 | Returns a JSON object with an error. Validation | ||||||||
JSON
|
Example | |||||||||
JSON
|