Record a clock-in event for an employee. Optionally link the clock-in to a rostered shift or position, and provide the device timezone to ensure accurate overlap checks and shift auto-linking for employees in non-UTC timezones.
https://api.employmenthero.com/api/v1/organisations/:organisation_id/employees/:employee_id/clock_inPath Parameters
The ID of the organisation.
The ID of the employee to clock in.
Request Body
An optional note to attach to the clock-in event.
IANA timezone name of the employee device (e.g. "Australia/Sydney"). When provided, improves accuracy of overlap checks and automatic shift linking for employees in non-UTC timezones.
Optional details to link the clock-in to a rostered shift or position.
Response Body
Returns the clock-in time and the resulting clocking activity status.
The time the employee clocked in, in ISO 8601 format.
The status of the clocking activity (e.g. clocked_in).
Example
curl -X POST \ "https://api.employmenthero.com/api/v1/organisations/:organisation_id/employees/:employee_id/clock_in" \ -H "Authorization: Bearer AUXJ3123xyrj123fdsjkl124aAJKQ" \ -H "Content-Type: application/json" \ -d '{ "note": "Starting morning shift", "device_timezone": "Australia/Sydney", "shift_details": { "rostered_shift_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "position_relation_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901", "location_id": null } }'Response
{ "data": { "clock_in_time": "2025-05-01T09:00:00.000Z", "status": "clocked_in" }}Record a clock-out event for an employee, completing the active clocking session. Returns the total working time and break time for the shift.
https://api.employmenthero.com/api/v1/organisations/:organisation_id/employees/:employee_id/clock_outPath Parameters
The ID of the organisation.
The ID of the employee to clock out.
Request Body
An optional note to attach to the clock-out event.
IANA timezone name of the employee device (e.g. "Australia/Sydney"). Used to ensure note timestamps are recorded in the correct local time.
Response Body
Returns the total working time and total break time recorded for the completed shift.
Total working time for the shift in seconds.
Total break time recorded during the shift in seconds.
Example
curl -X POST \ "https://api.employmenthero.com/api/v1/organisations/:organisation_id/employees/:employee_id/clock_out" \ -H "Authorization: Bearer AUXJ3123xyrj123fdsjkl124aAJKQ" \ -H "Content-Type: application/json" \ -d '{ "note": "End of morning shift", "device_timezone": "Australia/Sydney" }'Response
{ "data": { "total_working_time": 28800, "total_break_time": 1800 }}