Department API can perform functions to interact or exchange data with Department.
Add department
Name
Description of department.
{ "id": "apiTestDept", "name": "API TEST Department", "description": "This is a department created by API.", "organization": { "id": "ORG-001" } }
Assign user to department
{ "userId": "cat", "startDate": null, "endDate": null, "employeeCode": "", "gradeId": "G-003", "departmentId": "apiTestDept", "organizationId": "ORG-001" }
Delete department
{ "date": "Wed Aug 28 01:29:38 SGT 2019", "code": "200", "message": "Successful operation" }
Find department
Gets all departments from all organizations by default.
Able to filter or sort the returned results via parameters.
Department data column to sort.
Must be used in conjunction with "sortDescending" parameter.
Sort the specified "sort" parameter value in ascending or descending order.
Expects a boolean value.
Must be used in conjunction with "sort" parameter.
[ { "id": "D-001", "name": "CEO Office", "description": "", "organization": { "id": "ORG-001" } }, { "id": "D-002", "name": "Human Resource and Admin", "description": "", "organization": { "id": "ORG-001" } }, ..... ]
Get department by ID
{ "id": "D-001", "name": "CEO Office", "description": "", "organization": { "id": "ORG-001" } }
Unassign user from department
{ "date": "Thu Dec 05 03:29:56 SGT 2019", "code": "200", "message": "Successful operation" }
Update department
{ "id": "apiTestDept", "name": "API TEST Department", "description": "I update this department description via API.", "organization": { "id": "ORG-001" } }