...
Your API calls must contain the API key for the purpose of authentication.
Parameter | Description |
---|---|
key | Please contact the HRWorks administrator in your organization for the API key. |
You can generate the API key for your organization yourself.
...
https://www.hinote.in/hrworks/api/post/AttendanceInput.do?key=<customer_api_key>
You need to use https in your API call.
Please note that the API key must be appended with the URL as a request parameter. You need to use https in your API call.
2 Post Request
Input can be provided as a request parameter named inputData or as a request body. 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>" } |
Multiple objects can be supplied as a JSON array.
[{ |
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
inputData
, which allows you to submit attendance data with the following parameters as input.
2.1 Input Parameters
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>&attendanceInputJsoninputData=
{"employeeId": "1001", "location": "ChennaiOffice-MainEntrance", "swipeTime": "2025-08-03 10:05:00+05:30", "in_out": "In"}
...
If the API call is successful, the API shall return a response such as the below.
|
|
|
"msg": Bad Request - Invalid Date Format
|
3.1 Output Parameters
Parameter | Description |
---|---|
success | Denotes if the API call was successful. |
statusCode | Refers to the relevant http status code. Any status code other than "200" refers to an error while processing the request. |
msg | Refers to a text value describing the response |
in case of an error. It can describe |
the error which |
has occurred. |
The possible values for "statusCode" are presented here.
...
In case of error, the API returns the following JSON response:
|
4 Coding Examples
4.1 CURL
1 |
|
|
|
|
|