Departments
API calls to work with departments
Department is essentially just a group of employees. They can be assigned to departments by
specifying non-null department_id.
Department object
{
"id": 222,
"label": "Drivers",
"location": {
"lat": 46.9,
"lng": 7.4,
"address": "Rosenweg 3",
"radius": 150
}
}id- int. An ID of department.label- string. Name of department.location- optional object. Location associated with these departments. Should be valid or null.address- string. Address of the location.radius- int. Radius of location zone in meters.
API actions
API base path: /department.
list
Gets all departments belonging to user.
Examples
Response
Errors
7 – Invalid parameters.
217 – The list contains non-existent entities – if one of the specified trackers does not exist, is blocked or doesn't have required tariff features.
221 – Device limit exceeded - if device limit set for the user’s dealer has been exceeded.
create
Creates a new department with specified parameters.
required sub-user rights: employee_update.
Parameters
Example
cURL
Response
id- int. An ID of the created department.
Errors
7 – Invalid parameters.
217 – The list contains non-existent entities – if one of the specified trackers does not exist, is blocked or doesn't have required tariff features.
221 – Device limit exceeded - if device limit set for the user’s dealer has been exceeded.
update
Updates existing department with a new specified parameters.
required sub-user rights: employee_update.
Parameters
Example
cURL
Response
Errors
201 – Not found in the database - if there is no department with specified ID.
delete
Deletes department with the specified ID.
required sub-user rights: employee_update.
Parameters
department_id
An ID of the department.
int
Examples
Response
Errors
201 – Not found in the database - if there is no department with specified ID.
Last updated
Was this helpful?