List departments
Departments of the account with their parent department.
GET https://cotlet.dev/api/v1/ispring/departments
read
Returns the department tree of the Users section. Every user belongs to exactly one department. Department Administrators see only the departments they manage and their sub-departments. Use department_id in list_users and add_users_by_email.
Parameters
| Name | Type | Description |
|---|---|---|
| query string | string | Part of the department name. |
Request
curl https://cotlet.dev/api/v1/ispring/departments \
-H "Authorization: Bearer $COTLET_API_KEY" result = client.call("ispring", "list_departments") const result = await cotlet.call('ispring', 'list_departments'); cotlet call ispring list_departments Example response
{
"departments": [
{
"department_id": "d_10",
"name": "Sales",
"parent": "Company"
},
{
"department_id": "d_11",
"name": "Support",
"parent": "Company"
}
]
}