...
Please note that the API key must be appended with the URL as a request parameter.
2 Post Request
Input can be provided as a request parameter named inputData or as a request body. Input should comply with the output of the schema API. A typical example is as follows.
{ "employeeId": "<Employee ID>", "location": "<Swipe/Biometric machine ID>", "swipeTime": "<yyyy-mm-dd hh:mm:ss>", "in_out": "<In/Out>" } |
...
1.2 Authentication
Your API calls must contain the API key for the purpose of authentication.
Parameter
Description
Please contact the HRWorks administrator in your organization for the API key.
You can generate the API key for your organization yourself.
2 Post Request
You can post employee attendance information to HRWorks using this request. The post request can be made by way of JSON formatted string named attendanceInputJSON
, which allows you to submit attendance data with the following parameters as input.
...
Parameter | Description |
---|---|
| This is a text value specifying Employee Id of the employee swiping his card. This is a mandatory field. |
| This is a text value specifying the ID for the swipe card / biometric machine. This should correspond to a swipe card / biometric machine ID (referred to as Attendance Location ID in HRWorks) stored in HRWorks. This is a non-mandatory field. If a value is not provided, the default attendance location (as specified in HRWorks) shall be used. |
| Refers to the time of employee swiping his card/finger. This should be a date value as per the ISO8601 format. Typical Formats: yyyy-mm-dd hh:mm:ss or yyyy-mm-ddThh:mm:ssZ . Note:
The time format represents Coordinated Universal Time (UTC). For example, 2015-09-03 13:50:00 or 2015-09-03T13:50:00Z represents 01:50 p.m. (UTC) on September 09, 2015. Time Zones: The strings +hh:mm, +hhmm, -hh:mm, -hhmm can be appended to yyyy-mm-dd hh:mm:ss in order to specify a time zone relative to UTC. For example, UTC+5:30 represents Indian Standard Time (IST) and hence 2015-09-03 13:50:00+05:30 represents 01:50 p.m. (IST) on September 09, 2015. Accepted date and time formats: a. yyyy-mm-dd hh:mm:ss+hh:mm b. yyyy-mm-dd hh:mm:ss+hhmm c. yyyy-mm-dd hh:mm:ss-hh:mm d. yyyy-mm-dd hh:mm:ss-hhmm Note: a. In all of the above, the space between yyyy-mm-dd and hh:mm:ss can be replaced with the letter T. For example, both 2015-09-30 12:00:00 and 2015-09-30T12:00:00 are acceptable. b. In all of the above the letter Z can be appended to hh:mm:ss. Both hh:mm:ss and hh:mm:ssZ refer to time in UTC. For example, both 2015-09-30T12:00:00 and 2015-09-30T12:00:00Z refer to the same time in UTC . This is a mandatory field. |
| This should be a text input with the value “In” or “Out”. In/Out signifies whether swipe machine was used for employee's entry or exit. This is a mandatory field. |
2.3 API Example
https://www.hinote.in/hrworks/api/post/AttendanceInput.do?key=<customer_api_key>&attendanceInputJson=
{"employeeId": "1001", "location": "ChennaiOffice-MainEntrance", "swipeTime": "20152025-1108-03 10:05:00+05:30", "in_out": "In"}
The above API call submits employee attendance data for an employee whose employee ID is "1001" who swiped in to make an entry into a swipe card / biometric machine called "ChennaiOffice-MainEntrance" at 10:05 a.m. IST on 03-NovAug-2015 2025 while getting into the office.
...