System Dictionaries
Create or update company divisions
Creates or updates the structure of company divisions.<br> <span style="color:red">Important</span>: Method requires the full structure of the actual divisions to be passed
You can add some additional information for each division in the meta field.<br> This endpoint creates a background task for updating the division structure and returns its identifier.
Restrictions:
- name and foreign fields must be with non-zero length
- foreign must be unique in the entire structure of the request body
- Maximum nesting of subdivisions - 10
- You cannot create tasks to update the hierarchy of division more than once every 20 minutes (for the same organization). If an attempt is made to update divisions before 20 minutes have elapsed since the last successful request, the server will return an error with HTTP status 429 (Too Many Requests).
If the task to update the divisions is accepted, the response will contains payload.task_id - the unique identifier of the task. You can track this task here
post/accounts/{account_id}/divisions/batch
Request
- Base URL: https://api.huntflow.ru/v2
- URL: https://api.huntflow.ru/v2/accounts/{account_id}/divisions/batch
- Auth: HTTP bearer
Path parameters
account_idinteger required
Request body
Example request
{
"items": [
{
"name": "Division 1",
"foreign": "d1",
"meta": {
"lead": "director@example.com",
"comment": "Main division"
},
"items": [
{
"name": "Division 1.1",
"foreign": "d1.1",
"meta": {
"lead": "test@example.com"
}
}
]
}
]
}Response
Successful Response
Example response
{
"status": "ok",
"meta": {
"account_id": 11
}
}Changes
No recorded changes to this operation across all 1 revision of this API.