Overview
Customers using the Keka API plan often integrate Keka with their internal systems to automate workflows or centralize reporting.
To support these integrations, APIs are provided to retrieve employee requests related to:
- Work From Home (WFH)
- On-Duty (OD)
- Attendance Regularisation
These APIs allow external systems to fetch request details across employees within a specified date range and synchronize the data with internal HR, payroll, or reporting systems.
Get Work From Home (WFH) Requests API
Objective
Customers on the API plan require access to employee Work From Home (WFH) requests so they can synchronize request data with their internal tools or reporting systems.
This API enables customers to retrieve WFH request details for employees across a selected date range.
Customers using this capability
- Foxsense Innovations
- SurveySparrow
- Kloudrac
Current State
Currently, Keka provides APIs for:
- Posting WFH requests
- Posting On-Duty requests
- Getting and posting Attendance
- Getting and posting Leave requests
However, APIs to retrieve WFH or On-Duty requests were not previously available. This API addresses that gap.
Method
GET
Endpoint
https://{company}.{environment}.com/api/v1/attendance/wfhrequests
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| employeeIds | string array | No | Fetch requests for one or more employees |
| startDate | date | Yes | Start date of the filter range |
| endDate | date | Yes | End date of the filter range |
| lastModifiedStartDate | date | No | Filter records updated after this date |
| lastModifiedEndDate | date | No | Filter records updated before this date |
| pageNumber | integer | No | Page number for pagination |
| pageSize | integer | No | Number of records per page (default 100, max 200) |
Validations
Employee ID Validation
If an employee ID provided does not exist within the tenant, the API returns:
Invalid Employee ID
Date Range Validation
The API validates that:
End Date >= Start Date
If validation fails, the API returns:
End date must be on or after start date
Request Overlap Rule
Requests that overlap with the given date range will be returned.
This behavior is consistent with the current product implementation.
Response Fields
| Field | Description |
|---|---|
| id | Unique request identifier |
| employeeId | Unique employee ID |
| employeeNumber | Employee number in Keka |
| employeeName | Employee full name |
| fromDate | Start date of WFH request |
| toDate | End date of WFH request |
| fromTime | Start time for single-day requests |
| toTime | End time for single-day requests |
| fromSession | First session (used for multi-day custom requests) |
| toSession | Last session (used for multi-day custom requests) |
| requestedOn | Date when request was submitted |
| requestedBy | Employee who submitted the request |
| note | Additional notes entered by employee |
| rejectionReason | Reason for rejection or cancellation |
| approvers | Array containing approver details |
| nextApprover | Next approver in workflow |
| comments | Array of comments with user and timestamp |
Approver Object
| Field | Description |
|---|---|
| approverName | Name of approver |
| status | Approval status |
| actionedOn | Date and time when action was taken |
Comments Object
| Field | Description |
|---|---|
| comment | Comment text |
| commentedBy | User who posted the comment |
| timestamp | Comment timestamp |
Pagination
Standard pagination parameters are supported.
| Parameter | Default | Max |
|---|---|---|
| pageSize | 100 | 200 |
The response includes pagination metadata.
Get On-Duty Requests API
Objective
Customers may also need to retrieve On-Duty (OD) requests submitted by employees. This API enables external systems to fetch OD request data within a defined date range.
Method
GET
Endpoint
https://{company}.{environment}.com/api/v1/attendance/ondutyrequests
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| employeeIds | string array | No | Retrieve requests for specific employees |
| startDate | date | Yes | Start date filter |
| endDate | date | Yes | End date filter |
| lastModifiedStartDate | date | No | Filter requests modified after date |
| lastModifiedEndDate | date | No | Filter requests modified before date |
| pageNumber | integer | No | Pagination page number |
| pageSize | integer | No | Records per page |
Validations
- Employee ID must exist in tenant
- End Date must be greater than or equal to Start Date
- Date range overlap logic applies
Response Fields
| Field | Description |
|---|---|
| id | Unique request ID |
| employeeId | Employee identifier |
| employeeNumber | Employee number |
| employeeName | Employee name |
| fromDate | Start date |
| toDate | End date |
| fromTime | Start time for single-day request |
| toTime | End time for single-day request |
| fromSession | First session in multi-day request |
| toSession | Last session in multi-day request |
| requestedOn | Request creation date |
| requestedBy | Employee who submitted request |
| note | Employee notes |
| rejectionReason | Reason if rejected or cancelled |
| approvers | Array of approver details |
| nextApprover | Next approver |
| comments | Array of comments |
Get Regularisation Requests API
Objective
Attendance regularisation allows employees to correct missing or incorrect attendance entries. This API enables customers to retrieve regularisation requests submitted by employees.
Method
GET
Endpoint
https://{company}.{environment}.com/api/v1/attendance/regularisationrequests
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| employeeIds | string array | No | Filter by employees |
| startDate | date | Yes | Start date |
| endDate | date | Yes | End date |
| lastModifiedStartDate | date | No | Filter by modification start date |
| lastModifiedEndDate | date | No | Filter by modification end date |
| pageNumber | integer | No | Page number |
| pageSize | integer | No | Page size |
Validations
- Employee ID must exist
- End date must be greater than or equal to start date
- Standard pagination rules apply
Response Fields
| Field | Description |
|---|---|
| id | Regularisation request ID |
| employeeId | Employee identifier |
| employeeNumber | Employee number |
| employeeName | Employee name |
| date | Attendance date being corrected |
| timeEntries | Array of updated in/out times |
| requestedOn | Date request was submitted |
| requestedBy | Request creator |
| note | Additional note |
| rejectionReason | Reason for rejection or cancellation |
| approvers | Array of approval actions |
| nextApprover | Next approver |
| comments | Comments with user and timestamp |
Time Entries Object
| Field | Description |
|---|---|
| type | In or Out |
| time | Updated timestamp |
Pagination
All APIs include standard pagination fields.
| Field | Description |
|---|---|
| pageNumber | Current page |
| pageSize | Records per page |
| totalRecords | Total number of records |
| totalPages | Total pages |
These APIs allow organizations to automate attendance workflows, synchronize request data, and build centralized reporting systems using Keka data.
Comments
0 comments
Please sign in to leave a comment.