Developer API - Attendance
Introduction
The WorkComposer Attendance API allows you to access and manage attendance data for your team members. Use these endpoints to retrieve clock-in/clock-out records, track work hours, and monitor attendance patterns across your organization.
This API is particularly useful for integrating WorkComposer's attendance tracking with your HR systems, payroll software, or custom reporting tools.
Attendance Report
The Attendance Report endpoint provides detailed clock-in and clock-out records for all users in your workspace. This data includes the start and end times of work sessions, break periods, and the total duration of each activity.
API Endpoint
https://api.workcomposer.com/v1/report/attendance/clockinout/
Parameters
Parameter | Required | Description |
---|---|---|
apiKey | Required | Your unique API Key |
from | Optional | Start date (YYYY-MM-DD). Defaults to today |
to | Optional | End date (YYYY-MM-DD). Defaults to today |
timezone | Optional | Timezone (e.g., America/New_York). Defaults to account timezone |
limit | Optional | Maximum results to return (default: 50) |
offset | Optional | Number of results to skip for pagination |
Response Example
{
"status": 1,
"totalCount": 2,
"data": [
{
"user": {
"id": "5be0b0b693be911e427b628f",
"externalId": "123"
},
"clockInOut": [
{
"activity": "work",
"start": "2022-08-03T01:51:00+04:00",
"end": "2022-08-03T01:54:00+04:00",
"duration": "00:03:41"
},
{
"activity": "work",
"start": "2022-08-03T02:27:00+04:00",
"end": "2022-08-03T02:29:00+04:00",
"duration": "00:02:26"
}
]
},
{
"user": {
"id": "5d2f694dd5f2b56d18ad0c57",
"externalId": "345"
},
"clockInOut": [
{
"activity": "work",
"start": "2022-08-03T01:17:00+04:00",
"end": "2022-08-03T01:19:00+04:00",
"duration": "00:02:33"
}
]
}
]
}
Daily Summary
The Daily Summary endpoint provides aggregated attendance data for each user, including total work hours, break time, and overtime for each day in the specified date range.
API Endpoint
https://api.workcomposer.com/v1/report/attendance/daily-summary/
Parameters
Parameter | Required | Description |
---|---|---|
apiKey | Required | Your unique API Key |
from | Optional | Start date (YYYY-MM-DD). Defaults to start of current month |
to | Optional | End date (YYYY-MM-DD). Defaults to end of current month |
timezone | Optional | Timezone (e.g., America/New_York). Defaults to account timezone |
userId | Optional | Filter results for a specific user by ID |
Response Example
{
"status": 1,
"data": [
{
"user": {
"id": "5be0b0b693be911e427b628f",
"name": "John Smith",
"email": "john@example.com"
},
"days": [
{
"date": "2022-08-01",
"totalWorked": "07:45:12",
"breakTime": "00:30:00",
"overtime": "00:15:12",
"firstClockIn": "09:00:23",
"lastClockOut": "17:15:35"
},
{
"date": "2022-08-02",
"totalWorked": "08:12:45",
"breakTime": "00:45:10",
"overtime": "00:27:55",
"firstClockIn": "08:45:12",
"lastClockOut": "17:43:07"
}
]
}
]
}
Best Practices
Use appropriate date ranges: For attendance data, it's recommended to query by specific date ranges (e.g., weekly or monthly) to optimize performance and manage data volume.
Consider timezone differences: Always specify the timezone
parameter to ensure accurate reporting, especially for teams working across different geographical locations.
Schedule regular syncs: For integrations with HR or payroll systems, schedule regular API calls (e.g., daily or weekly) to ensure your external systems have up-to-date attendance information.
Need Help?
If you have questions about using the Attendance API or need assistance with implementing these endpoints in your application, our developer support team is available to help.
Contact Developer Support