openapi: 3.0.0 info: title: Keka HR Assets Leave API description: REST API for the Keka HR and payroll platform covering employee records, attendance, leave, payroll, expense management, performance, recruitment, professional services automation, helpdesk, background verification, and rewards. version: v1 contact: url: https://developers.keka.com/ license: name: Keka Terms of Service url: https://www.keka.com/terms-of-service servers: - url: https://{tenant}.keka.com/api/v1 description: Keka HR API variables: tenant: default: your-company description: Your Keka tenant subdomain security: - oauth2: - kekaapi tags: - name: Leave paths: /api/v1/time/leaverequests: get: operationId: get_all_leave_requests summary: Get all leave requests tags: - Leave responses: '200': description: Successful response description: '

This API is used for fetching list of all leave requests in the organization between from and to date. If both from and to are not specified, last 30 days records are returned. From date should be before to date. The difference between from and to date cannot be more than 90 days.

Enumerated Values

SessionType LeaveRequestStatus
0 = FirstHalf
1 = SecondHalf
0 = Pending
1 = Approved
2 = Rejected
3 = Cancelled
4 = InApprovalProcess
' post: operationId: create_leave_request summary: Create leave request tags: - Leave responses: '200': description: Successful response description: '

This API is used for creating leave request against an employee. Create an leave request and returns leave request identifier.

' requestBody: content: application/json: schema: type: object example: employeeId: 444d61be-76c5-4f82-9107-31aa32a2f5df requestedBy: 444d61be-76c5-4f82-9107-31aa32a2f5df fromDate: '2023-11-03' toDate: '2023-11-03' fromSession: 0 toSession: 1 leaveTypeId: ABBE47B9-1AEF-4364-91E9-50EAD6C22E95 reason: Health Issue note: casual Leave /api/v1/time/leavetypes: get: operationId: get_all_leave_types summary: Get all leave types tags: - Leave responses: '200': description: Successful response description: '

This API is used for fetching list of all leave types.

Enumerated Values

SessionType LeaveRequestStatus
0 = FirstHalf
1 = SecondHalf
0 = Pending
1 = Approved
2 = Rejected
3 = Cancelled
4 = InApprovalProcess
' /api/v1/time/leavebalance: get: operationId: get_all_leave_balance summary: Get All Leave Balance tags: - Leave responses: '200': description: Successful response /api/v1/time/leaveplans: get: operationId: get_all_leave_plans summary: Get All Leave Plans tags: - Leave responses: '200': description: Successful response components: securitySchemes: oauth2: type: oauth2 description: OAuth 2.0 client credentials flow flows: clientCredentials: tokenUrl: https://login.keka.com/connect/token scopes: kekaapi: Access to Keka HR API