Create a new department for a work site. The department can include notification settings for clock-in and clock-out times, and can have specific members assigned to it.
https://api.employmenthero.com/api/v1/organisations/:organisation_id/departmentsPath Parameters
The ID of the organisation
Request Body
UUID of an existing work site
Department name
Clock-in time (e.g., "09:00", "9:00 AM")
Clock-out time (e.g., "17:00", "5:00 PM")
Days of week
Array of member UUIDs to assign to the department
Response Body
The created department object.
Unique identifier for the object.
The name of the department.
The number of employees assigned to this department.
Notification settings for this department.
Example
curl -X POST \ "https://api.employmenthero.com/api/v1/organisations/:organisation_id/departments" \ -H "Authorization: Bearer AUXJ3123xyrj123fdsjkl124aAJKQ" \ -H "Content-Type: application/json" \ -d '{ "work_site_id": "bdf48551-d061-45d2-b30f-9d78279f0707", "name": "Engineering Department", "clock_in_time": "09:00", "clock_out_time": "17:00", "days_applied": [ "Monday", "Tuesday", "Wednesday" ], "member_ids": [ "5388432b-2aa1-46b3-ad8c-f7c46356bb56", "032de036-9597-4119-be86-8602c3e2e363" ] }'Response
{ "data": { "id": "5b7cf013-9c7c-417b-abd7-ca1d5a8eb313", "name": "Engineering Department", "assignment_count": 2, "notification_settings": { "check_in_time": "09:00 AM", "check_out_time": "05:00 PM", "days_of_week": [ "Monday", "Tuesday", "Wednesday" ] } }}Update an existing department. You can modify the department name, notification settings for clock-in and clock-out times, and manage member assignments by adding or removing members from the department.
https://api.employmenthero.com/api/v1/organisations/:organisation_id/departments/:department_idPath Parameters
The ID of the organisation
The ID of the department
Request Body
Department name
Clock-in time (e.g., "09:00", "9:00 AM")
Clock-out time (e.g., "17:00", "5:00 PM")
Days of week
Array of member UUIDs to assign to the department
Response Body
The updated department object.
Unique identifier for the object.
The name of the department.
The number of employees assigned to this department.
Notification settings for this department.
Example
curl -X PATCH \ "https://api.employmenthero.com/api/v1/organisations/:organisation_id/departments/:department_id" \ -H "Authorization: Bearer AUXJ3123xyrj123fdsjkl124aAJKQ" \ -H "Content-Type: application/json" \ -d '{ "name": "Engineering Department", "clock_in_time": "09:00", "clock_out_time": "17:00", "days_applied": [ "Monday", "Tuesday", "Wednesday" ], "member_ids": [ "5388432b-2aa1-46b3-ad8c-f7c46356bb56", "032de036-9597-4119-be86-8602c3e2e363" ] }'Response
{ "data": { "id": "5b7cf013-9c7c-417b-abd7-ca1d5a8eb313", "name": "Engineering Department", "assignment_count": 2, "notification_settings": { "check_in_time": "09:00 AM", "check_out_time": "05:00 PM", "days_of_week": [ "Monday", "Tuesday", "Wednesday" ] } }}