This endpoint retrieves a list of all timesheet entries for a specific employee.
https://api.employmenthero.com/api/v1/organisations/:organisation_id/employees/:employee_id/timesheet_entriesPath Parameters
The ID of the organisation to retrieve
The ID of the employee to retrieve, we also support the wildcard collection id "-" for searching for all timesheet across all employees
Query Parameters
The start date of time range for date field (dd/mm/yyyy)
The end date of time range for date field (dd/mm/yyyy)
Current page index
11Number of items per page
20100Response Body
A hash with a data property that contains an array of up to the limit of timesheets. Each entry in the array is a separate timesheet object. If there are no more timesheets, the resulting array will be empty.
Unique identifier for the object.
The date of your employee timesheet object.
The start time of timesheet.
The end time of timesheet.
The status of timesheet
The number of productive working hours for this timesheet record. This represents actual work time and excludes any break periods.
The unit type for this timesheet
The total number of break hours for this timesheet record
Array of break objects containing start_time and end_time for each break
The reason of timesheet.
The comment of timesheet
The time of timesheet (milliseconds), if start_time is empty or end_time is empty then this field will have the value
The cost centre associated with the timesheet
ID of the work site associated with the timesheet
Name of the work site associated with the timesheet
ID of the position associated with the timesheet
Name of the position associated with the timesheet
Current page index
11Number of items per page
20100Total items
Total pages
Example
curl -X GET \ "https://api.employmenthero.com/api/v1/organisations/:organisation_id/employees/:employee_id/timesheet_entries" \ -H "Authorization: Bearer AUXJ3123xyrj123fdsjkl124aAJKQ"Response
{ "data": { "items": [ { "id": "16a62c0d-bb91-45e4-ad47-a325117c87eb", "date": "2018-12-17T00:00:00+00:00", "start_time": "2018-12-17T01:00:00+11:00", "end_time": "2018-12-17T07:00:00+11:00", "status": "pending", "units": 6, "unit_type": "hours", "break_units": 0.5, "breaks": [ { "start_time": "2018-12-17T03:00:00+11:00", "end_time": "2018-12-17T03:30:00+11:00" } ], "reason": null, "comment": "Working hard", "time": 21600, "cost_centre": { "id": "1b9caf3d-ebdd-4a35-9606-659501cf5629", "name": "Main Cost Centre" }, "work_site_id": "cfe11859-e9c6-46dc-867c-d47119bcda84", "work_site_name": "Downtown Office", "position_id": "a4f1a78c-c877-46f3-829f-e3921ab0a007", "position_name": "Software Engineer" } ], "page_index": 1, "item_per_page": 20, "total_items": 1, "total_pages": 1 }}This endpoint allows you to create multiple timesheet entries for different employees in a single request. The endpoint supports bulk creation with validation and will return both successful creations and any failures.
https://api.employmenthero.com/api/v1/organisations/:organisation_id/timesheet_entriesPath Parameters
The ID of the organisation
Request Body
Array of timesheet entries to create (maximum 10 per request)
The ID of the employee for this timesheet entry
The date of the timesheet entry in YYYY-MM-DD format
The start time in ISO 8601 format
The end time in ISO 8601 format
Optional comment for the timesheet entry
Optional array of break periods consisting of start_time and end_time
The number of productive working hours for this timesheet entry. Overwritten if a start_time and end_time is provided, as units will be calculated automatically
Required if your organisation uses worksites and positions. The ID of the position associated with this timesheet entry
Notes
- Maximum 10 timesheet entries per request
- Start time and end time must be on the same date as the timesheet date, unless overnight timesheet is enabled by your organisation
- Break times must be within the timesheet start and end times
- Breaks cannot overlap with each other
- Timesheet entries cannot overlap with existing entries for the same employee
- All employees must exist in the organisation
Response Body
The endpoint returns a 201 status code even when some entries fail, allowing for partial success scenarios.
Unique identifier for the object.
The date of your employee timesheet object.
The start time of timesheet.
The end time of timesheet.
The status of timesheet
The number of productive working hours for this timesheet record. This represents actual work time and excludes any break periods.
The unit type for this timesheet
The total number of break hours for this timesheet record
Array of break objects containing start_time and end_time for each break
The reason of timesheet.
The comment of timesheet
The time of timesheet (milliseconds), if start_time is empty or end_time is empty then this field will have the value
The cost centre associated with the timesheet
ID of the work site associated with the timesheet
Name of the work site associated with the timesheet
ID of the position associated with the timesheet
Name of the position associated with the timesheet
Summary of the timesheet entries creation
Array of failed timesheet entries with error details
Example
curl -X POST \ "https://api.employmenthero.com/api/v1/organisations/:organisation_id/timesheet_entries" \ -H "Authorization: Bearer AUXJ3123xyrj123fdsjkl124aAJKQ" \ -H "Content-Type: application/json" \ -d '{ "timesheets": [ { "employee_id": "001c20e3-c752-4a46-81a1-a5e476e42d06", "date": "2024-01-15", "start_time": "2024-01-15T09:00:00+11:00", "end_time": "2024-01-15T17:00:00+11:00", "comment": "Regular work day", "breaks": [ { "start_time": "2024-01-15T12:00:00+11:00", "end_time": "2024-01-15T13:00:00+11:00" } ], "units": 7.5, "position_id": "87f926ac-1a21-45aa-a86e-302815e7e781" } ] }'Response
{ "data": { "items": [ { "id": "16a62c0d-bb91-45e4-ad47-a325117c87eb", "date": "2018-12-17T00:00:00+00:00", "start_time": "2018-12-17T01:00:00+11:00", "end_time": "2018-12-17T07:00:00+11:00", "status": "pending", "units": 6, "unit_type": "hours", "break_units": 0.5, "breaks": [ { "start_time": "2018-12-17T03:00:00+11:00", "end_time": "2018-12-17T03:30:00+11:00" } ], "reason": null, "comment": "Working hard", "time": 21600, "cost_centre": { "id": "1b9caf3d-ebdd-4a35-9606-659501cf5629", "name": "Main Cost Centre" }, "work_site_id": "cfe11859-e9c6-46dc-867c-d47119bcda84", "work_site_name": "Downtown Office", "position_id": "a4f1a78c-c877-46f3-829f-e3921ab0a007", "position_name": "Software Engineer" } ], "summary": { "total_created": 1, "total_failed": 0 }, "errors": [] }}