Managing API Keys

Managing API Keys

Menu Path : Setup > Common Setup > General Setup > API tab
Accessible to : Application Administrator

APIs are used to seamless communicate across different software. EazeWork HRMS provides the feature to create and manage multiple APIs in a secure manner. An API calls a "data-set" using a "service". The following data-sets are available -
1. EmpHRData : provides all the HR data linked to employee's profile, this data is present on My Profile page. Input string is
- API Key : Mandatory
- CorpURL : Mandatory : pass the URL of your instance
- EmpCode : employee code is optional, if entered the response will be only for on employee if not entered then response will be for all employees
- ActiveYN : This field is used to query Active vs Inactive employees, all resigned employees are categorized as Inactive, this is a mandatory field

2. EmpLeaves : provides details of leaves taken in a given period. Input string is
- API Key : Mandatory
- CorpURL : Mandatory, pass the URL of your instance
- EmpCode : employee code is optional, if entered the response will be only for on employee if not entered then response will be for all employees
- ActiveYN : This field is used to query Active vs Inactive employees, all resigned employees are categorized as Inactive, this is a mandatory field
- DateFrom : The start date, mandatory field
- DateTo : The end date, mandatory field. Date range can be maximum 7 days. The date range is queried on Leave Start Date

3. HolidayList : provides details of holidays and shift pattern in a calendar. Input string is
- API Key : Mandatory
- CorpURL : Mandatory, pass the URL of your instance
- Year : this is optional, if entered then data for requested year is given, if not entered then details for current year are given

4. HRExpSummary :
- API Key : Mandatory
- CorpURL : Mandatory, pass the URL of your instance
- DateOption : Mandatory, you need to input the date for which you want to do the query, V (Voucher Date), F (Final Approval Date), P (Payment Date), if
OnDate : Mandatory, you need to input the date for which you want to run the query in dd/mmm/yyyy format

5. EmpPrlData : provides all payroll master data except salary related data. Input string is
- API Key : Mandatory
- CorpURL : Mandatory, pass the URL of your instance
- EmpCode : employee code is optional, if entered the response will be only for on employee if not entered then response will be for all employees- O
- ActiveYN : This field is used to query Active vs Inactive employees, all resigned employees are categorized as Inactive, this is a mandatory field

6. EmpSalaryDetails : provides salary breakup. Input string is
- API Key : Mandatory
- CorpURL : Mandatory,  pass the URL of your instance
- EmpCode : employee code is optional, if entered the response will be only for on employee if not entered then response will be for all employees
- ActiveYN : This field is used to query Active vs Inactive employees, all resigned employees are categorized as Inactive, this is a mandatory field

7. EmpSalarySlip :
- API Key : Mandatory
- CorpURL : Mandatory, pass the URL of your instance
- EmpCode : employee code is optional, if entered the response will be only for on employee if not entered then response will be for all employees
- Month : Mandatory, enter the month for which data is to be exported
- ActiveYN : This field is used to query Active vs Inactive employees, all resigned employees are categorized as Inactive, this is a mandatory field

8. EmpLoanDetails : provides details of loan / salary advance taken by the employee
- API Key : Mandatory
- CorpURL : Mandatory, pass the URL of your instance
- EmpCode : employee code is optional, if entered the response will be only for on employee if not entered then response will be for all employees
- ActiveYN : This field is used to query Active vs Inactive employees, all resigned employees are categorized as Inactive, this is a mandatory field

9. ResignedEmployees : provides details of resigned employees within a date range. Input string is
- API Key : Mandatory
- CorpURL : Mandatory, pass the URL of your instance
- EmpCode : employee code is optional, if entered the response will be only for on employee if not entered then response will be for all employees
- ActiveYN : This field is used to query Active vs Inactive employees, all resigned employees are categorized as Inactive, this is a mandatory field
- DateFrom : The start date, mandatory field
- DateTo : The end date, mandatory field. Date range can be maximum 7 days. The date range is queried on Last Working Day


From this tab you can do the following activities -
1. Combine different data sets to create your own custom API Key
2. Reset an existing API Key
3. Delete an existing API Key
4. Edit and make changes to an existing API

To create a new API key click on "Create New API" button and provide the details as shown below.


API Name : this is for your reference
Expiry Date : if you want to allow the usage of API for a fixed duration you can enter the expiry date
Data Set : select the data sets you want to use in the API

Error Codes

ResponseDescription
0No error
-1Invalid / expired API key
-2Invalid URL. Company URL is wrong, please use the URL which you use to login
-5Date From is missing
-6Date To is missing
-7Invalid date format. Correct date format is DD/MM/YYYY
-8Invalid date range, only 7 day period is allowed
-9Employee Code <code1, code2> does not exist in <active /inactive> employees
-10Date From should be less than or equal to Date To
-11Daily usage limit exceeded
-12
Enter value for Active Y/N
-13Invalid value for employee code

If the API call is returning an error code then it will not be counted in daily quota except a call which is returning error code -9.

Field Formats
Date will always be shown as dd/mm/yyyy : 05/02/2020 is 5th February 2020 and not 2nd May 2020
Month will always be shown as mmm-yyyy, for example May-2020
Year can be shown as YYYY or YYYY-YY depending on the way it is defined in the process



    • Related Articles

    • Managing reports

      Menu Path: Setup > Common Setup > Access Control and Report Visibility > Report Design tab Accessible to: Application Administrator From the first tab you can 1. manage the display of time format fields 2. enable or disable the visibility of a ...
    • Report- API Daily Log

      Menu : Reports > Admin Reports > API Daily Log The summary of API calls and results are shown in this report.
    • Report - API Call Details

      Menu : Reports > Admin Reports > API Call Details This report shows the details of Completed and Process Request. You can see 1 year data at a time.
    • Managing weekly offs

      Menu : Setup > Common > Shifts and Weekly Offs > Weekly Offs tab Accessible to : Application Administrator You can create and modify weekly off patterns from this page. A "Default" system defined weekly off is always available – you can change its ...
    • Managing system documents

      Overview EazeWork HRMS comes configured with a default template for all system defined letters. For some letters these default templates can be customized using this option. Letter customization might not be available if you have not subscribed to ...