KEKA HRMS API Integration

KEKA HRMS API Integration

KEKA HRMS API Integration:

What is Keka?

Keka is a SaaS employee experience platform that combines HR, payroll, ATS and performance management in a single suite of tools. It simplifies common tasks and allows organizations to seamlessly manage human resources processes

References:

https://developers.keka.com/?shell#keka-api

API Integration:

Authentication:

Keka API uses OAuth2 as the authentication mechanism in which all the requests are authenticated using a bearer token.

·         Authorization URL = https://app.keka.com/connect/authorize

·         Token URL = https://app.keka.com/connect/token

Sample Input:

grant_type:kekaapi

client_id:b2d71d79-52af-4ffa-8af2-28ae63d1403d

client_secret:ZWwiatKPlLraSIShxxvo

scope:kekaapi openid profile offline_access

apikey:T7mZBD2KtkKE2I6BA4f+nQ==

**Refresh token is available in response when the scope offline_access is provided

Sample response :

{

    "access_token": "eyJhbGciOiJSUzI1NiIsImtpZCI6IjBGQ0JCNEZEQzNERjQ0Nzk4RjQyREY3ODc3ODgwN0E1MUVFNzUzMkUiLCJ0eXAiOiJKV1QiLCJ4NXQiOiJEOHUwX2NQZlJIbVBRdDk0ZDRnSHBSN25VeTQifQ.eyJuYmYiOjE2MzgzNjg2MzEsImV4cCI6MTYzODQ1NTAzMSwiaXNzIjoiaHR0cHM6Ly9hcHAua2VrYXN0YWdlLmNvbSIsImF1ZCI6WyJrZWthYXBpIiwiaHR0cHM6Ly9hcHAua2VrYXN0YWdlLmNvbS9yZXNvdXJjZXMiXSwiY2xpZW50X2lkIjoiYjJkNzFkNzktNTJhZi00ZmZhLThhZjItMjhhZTYzZDE0MDNkIiwic3ViIjoiMmRiZThhYjUtY2RkMC00ODUwLWE1ZDItYWI4MmNiZTc4ZDg2IiwiYXV0aF90aW1lIjoxNjM4MzY4NjMxLCJpZHAiOiJsb2NhbCIsImlhdCI6MTYzODM2ODYzMSwic2NvcGUiOlsia2VrYWFwaSIsIm9wZW5pZCIsInByb2ZpbGUiLCJvZmZsaW5lX2FjY2VzcyJdLCJhbXIiOlsia2VrYWFwaSJdfQ.u_e_qspXTgNry0MombCg8uW-GnecpVmji4R_JKRgpwRKP0TpKTD9DKYiomKhX2TqrbYst0CmhBMxnM8gAkw-SGyq9RwG2loqkw-PP1M6dNfnjRDwLQMa5NnwGAA9IKul7HGMRcbXSiFD-vLkkcSrG8y-zElgxRrYRaYQyYn0_lduxCrgyE4pmKCvgbc6qcDJxbQZoG5ZE0xlSPa38JKQK-5p45QkSC8Qs4YdF1WXa0bYGCkQonYQWr1H9VjD5ae0rw-x7tynkVQsyxk08eLnMTmjFsf7OquiQsPvBO-LSEjmFTOJRoRJUh97-kPw1aLqWULcmg3o59TA0Wz7fCudXw",

    "expires_in": 86400,

    "token_type": "Bearer",

    "refresh_token": "E9FB799459FFAAAB3F879AA25B696CBA61F53D0539D39DDC288FBF71AE74997E",

    "scope": "kekaapi offline_access openid profile"

}

 

The client_id, client_secret and apikey are obtained based on the subscription.

grant_type: kekaapi

scope: kekaapi                     

Base URLs:

https://tenantname.keka.com/api/

Multiple APIs resources are exposed for usage.

  1. Attendance

  1. Leave records

  1. Employee

  1. Groups

  1. Locations

  1. Client

  1. Project

  1. Timesheet

  1. Pay details

 

Employee:

Get all Employees

GET /v1/hr/employees

Get all the employees based on employee search parameters.

Request Parameters

Name

Description

employeeIds

Comma separated list of one or more Employee ids you’d like to filter on.

employeeNumbers

Comma separated list of one or more Employee numbers you’d like to filter on.

employmentStatus

Comma separated list of one or more Employment Status you’d like to filter on, allowed values are Working, Relieved.

inProbation

Fetches employees who are on probation. The allowed value is true or false.

inNoticePeriod

Fetches employees who are in notice period. The allowed value is true or false.

lastModified

Date/time when this time off request was last modified, in ISO 8601 format (YYYY-MM-DDThh:mm:ss±hh:mm).

pageNumber

none

pageSize

Represents how many results you’d like to retrieve per request (page). Default is 100. Max is 100

 

Response:

Note to Developers:

The request parameter ‘lastModified’ can be used to obtain the delta data after the full refresh.

 

Test run API: import to postman

https://drive.google.com/file/d/1sOHTxXHvqESAFM0RonCr3_0pUDhzbZWD/view?usp=sharing

Response:

https://drive.google.com/file/d/1LfGPY2GJyZUvf-sVQ08Vkwv7bLOB5eo7/view?usp=sharing

Field Mapping:

Default fields:

userName displayName

firstName firstName

lastName lastName

email email

mobileNumber mobilePhone

manager reportsTo.id**

 

**Manager details are provided as an embedded object ‘reportsTo’

"reportsTo": {

                "id": "fa04c616-9bce-46fc-836d-e5600a791ce6",

                "firstName": "Pihu",

                "lastName": "Bhalla",

                "email": "pihu@simha.in"

            },

The Id field provides the Keka unique identifier, name and email. In order to get the manager employee id or more information about the manager, hit the API below.

/api/v1/hr/employees/fa04c616-9bce-46fc-836d-e5600a791ce6?

 

 

 

User Defined Field mapping:

Designation : jobTitle.title

Department : groups[].groupType:2

Work_location :groups[].groupType:3

EmployeeID : employeeNumber

Cadre : bandInfo.title

Pillar: customFields[].title:pillar

 

We have two custom fields added to Keka portal,

  1. Pillar

  2. Chapter

 

Usage Restrictions:

You understand and agree that:

·         Several features in Keka have usage throttles in-built to ensure they are not abused. These include features like Keka API. You can only use these features within such thresholds.

·         Access to features within Keka is dependent on the Roles and Permissions granted to the users

Pricing:

Pricing | Keka

 

Add label