How to Use the Timecloud Public API
The Timecloud Public API lets you connect external systems — payroll tools, HRIS platforms, scheduling engines, or custom dashboards — directly to your Timecloud data. Use it to automate employee management, roster scheduling, attendance tracking, and more.
Getting Started
- Contact your Timecloud account manager to enable API access for your company.
- You will receive client credentials (a Client ID and Client Secret).
- All API communication happens over HTTPS.
Authentication
- Call the /oauth/token endpoint with your Client ID and Client Secret.
- You'll receive a Bearer token.
- Include this token in the Authorization header of all subsequent requests:
Authorization: Bearer <your-token>
Date & Time Format
- Request date fields:
YYYY-MM-DD(e.g.2024-01-15) - Response date-time fields: ISO 8601 UTC (e.g.
2024-01-15T09:30:00.000Z) - All times are returned in UTC.
Available Endpoints
Below is an overview of what you can manage through the API. Full endpoint details (request/response schemas, query parameters, and error codes) are available in the interactive Swagger documentation provided with your API credentials.
Employees
|
Action |
Method & Path |
|---|---|
|
List all employees |
|
|
Get a single employee |
|
|
Create an employee |
|
|
Update an employee |
|
|
Archive an employee |
|
Tips:
- Assign roles, departments, or default job items by passing arrays of IDs in
companyRoles,userGroups, ordefaultJobItems.
Company Roles
|
Action |
Method & Path |
|---|---|
|
List roles |
|
|
Create a role |
|
|
Update a role |
|
|
Delete a role |
|
Note: You cannot delete a role while active employees are still assigned to it. Unassign employees first.
Departments (User Groups)
|
Action |
Method & Path |
|---|---|
|
List departments |
|
|
Create a department |
|
|
Update a department |
|
|
Delete a department |
|
|
List employees in a department |
|
Notes:
- Departments can be nested. Pass
parentGroupIdwhen creating to nest under a parent. - Deleting a department also removes its sub-departments. Employees are automatically unassigned.
- Deletion is blocked if active job items reference the department.
Roster — Employee View
|
Action |
Method & Path |
|---|---|
|
Get roster assignments |
|
|
Create or update shifts |
|
|
Publish draft shifts |
|
|
Clear draft shifts |
|
|
Delete a shift assignment |
|
|
Batch delete shift assignments |
|
Tips:
- Set
isPublished: trueon a shift to publish it immediately. Otherwise, it stays as a draft until you call /publish. - Use
conflictAuthorised: trueto bypass overlap checks when you know a double-booking is intentional. - Filter publish/clear actions by
employeeIdsoruserGroupIdsquery parameters.
Roster — Shift View
|
Action |
Method & Path |
|---|---|
|
Get shift roster grid |
|
|
Create or update shifts |
|
|
Publish draft shifts |
|
|
Clear draft shifts |
|
|
Delete a shift |
|
|
List invitations |
|
|
Send invitations |
|
|
Update draft invitations |
|
Tips:
- After creating shifts, the response includes
shiftMappingsso you can map your payload to the created shift IDs. - Send invitations with
draft=trueto save without notifying employees.
Attendance & Checkin Pairs
|
Action |
Method & Path |
|---|---|
|
List attendance days |
|
|
Create or update a checkin pair |
|
|
Delete checkins |
|
Notes:
- Checkin pairs use upsert via POST: include the checkin
_idto update an existing checkin, or omit it to create a new one. - Writes and deletes are blocked when the attendance day has been manager-approved (signed off).
- Each response returns the fully recalculated attendance record, so you always have up-to-date totals.
Job Items
|
Action |
Method & Path |
|---|---|
|
List job items |
|
|
Search job items |
|
|
Create a job item |
|
|
Update a job item |
|
|
Deactivate a job item |
|
Competencies
Manage competency groups, templates, and employee records via the API. In the Timecloud web app these appear under Competencies; the API paths use /compliance and /compliance-groups.
Competency Groups
|
Action |
Method & Path |
|---|---|
|
List all groups |
|
|
Get a group by ID |
|
|
Create a group |
|
|
Update a group |
|
|
Delete a group |
|
Competency Templates & Employee Items
|
Action |
Method & Path |
|---|---|
|
List all (templates or items) |
|
|
Get by ID |
|
|
Create a template or item |
|
|
Update a template or item |
|
|
Delete a template or item |
|
|
Bulk assign from a template |
|
Tips:
- Use
?isTemplate=trueto list or create templates (the reusable definitions). Use?isTemplate=falsefor employee items (actual records assigned to a person). - Filtering is available by
groupId,employeeId,templateId,expiryDate,issueDate, andalerts. - Results are paginated — use
pageandlimitquery parameters.
Bulk assign:
POST /compliance/bulklets you create up to 100 employee records in a single request.- Provide
templateId,groupId, and arowsarray. Each row requires anemployeeIdand can optionally includeissueDate,expiryDate,alertsEnabled, andcustomProperties. - The response reports each row's outcome (
createdorfailed) with a message.
Employee Competency Dashboard
|
Action |
Method & Path |
|---|---|
|
Get employee competency view |
|
|
Get totals only |
|
|
Get status for all items |
|
|
Get status for one item |
|
Notes:
/compliance/employeesreturns a flattened list of employee competency records with calculated statuses (valid,warning,expired,draft), days remaining, and employee details./compliance/employees/totalsreturns only the summary counts — more efficient when you just need an overview.- Filter by
status,groupId,employeeId,userGroupId,expiryDate,daysRemaining, or usesearchwithsearchFields. - Sort with
sortByandsortDirectionquery parameters.
Custom properties:
- Competency records support custom properties (e.g. certificate numbers, notes).
- File-type properties are read-only via the API. Use the Timecloud web app to upload documents.
Company & Shift Templates
|
Action |
Method & Path |
|---|---|
|
Get company details |
|
|
List shift templates |
|
Payroll Report
|
Action |
Method & Path |
|---|---|
|
Generate a custom payroll report |
|
How it works:
- Provide a date range (
start-date,end-date), optional employee IDs, and optional department filters. - Results are paginated by employee. Use the optional
pageandpageSizefields to control which slice of employees is returned. - The response returns data (report rows), errors (employees that could not be calculated), and pagination metadata (
total,page,pageSize,totalPages). - Successfully processed employees appear in data. Employees that encountered a processing issue are omitted from data and reported in errors instead.
Pagination:
- page — The page number to retrieve (default:
1). - pageSize — Number of employees per page (default:
50, maximum:50). - Employees are returned in a consistent order. To retrieve all employees, increment
pageuntilpageexceedstotalPages. - If
pageis beyond the last page of results, data returns an empty array with no error.
Response structure:
- data — A two-dimensional array of strings. When data rows exist, the first row contains column headers; subsequent rows contain the timesheet data for each successfully processed employee. When the requested page has no matching data, data is an empty array.
- errors — An array of objects, each describing an employee whose timesheet could not be generated. Each error includes:
- employeeId — The ID of the affected employee.
- employeeName — The employee's full name.
- date — The date (in your company timezone,
YYYY-MM-DD) of the shift that caused the issue, ornullif not shift-specific. - message — A human-readable description of what went wrong.
- total — Total number of employees matching your filters.
- page — The current page number.
- pageSize — The number of employees per page.
- totalPages — The total number of pages available.
Tips:
- Always check the errors array after receiving a response. An empty errors array means all employees on that page were processed successfully.
- If an employee appears in errors, their timesheet lines are excluded from data. Review the error message and correct the underlying issue before re-generating.
- The maximum date range is governed by your company's pay period.
- To fetch a complete report for all employees, loop through pages starting at
page=1and increment untilpageexceedstotalPages.
Common Integration Patterns
- Sync employees from your HRIS: Use
GET /employeesto compare, thenPOSTto create orPATCHto update. - Build a roster: List shift templates, then
POST /rosters/employeeorPOST /rosters/shiftto assign shifts. Call /publish when ready. - Push timesheet data: Use
POST /attendances/{id}/checkin-pairsto write clock-in/out records from an external system. - Archive leavers:
PATCH /employees/{id}with{"active": false}. - Set up your org structure: Create departments via
POST /company/groups(nest withparentGroupId), then assign employees. - Generate payroll reports: Call
POST /payroll/providers/{payrollProviderId}/report-builder/generatewith your date range. UsepageandpageSizeto paginate through employees. Process the data rows from each page and handle any entries in errors for employees that could not be calculated. - Manage competencies: Create groups via
POST /compliance-groups, add templates withPOST /compliance(isTemplate: true), then bulk-assign to employees withPOST /compliance/bulk. Monitor expiry viaGET /compliance/employees/totals.
Error Handling
- 400 — Bad request (missing or invalid fields). Check the response body for details.
- 401 — Unauthorised. Your token may have expired — request a new one.
- 404 — Resource not found. Verify the ID exists.
- 409 — Conflict (e.g. overlapping roster shifts). Use
conflictAuthorised: trueto override where appropriate. - 422 — Unprocessable (e.g. writing to a manager-approved attendance day).
Need Help?
Reach out to your Timecloud account manager or contact support@jointimecloud.com for API access, troubleshooting, or integration guidance.