Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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.

...

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.

[{
"employeeId": "<Employee ID>", 
"location": "<Swipe/Biometric machine ID>", 
"swipeTime": "<yyyy-mm-dd hh:mm:ss>", 
"in_out": "<In/Out>"
},
...
]

You can post employee attendance information to HRWorks using this request. The post request can be made by way of JSON formatted string named inputData, which allows you to submit attendance data with the following parameters as input.

...

If the API call is successful, the API shall return a response such as the below.

{"success":true,"statusCode":200,"recordsProcessed":1222,"recordsSuccessful":1222,"recordsFailed":0}

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.

...

4 Coding Examples

4.1 CURL

1
2
3
4
5

#The following command uploads attendance employee data.
  
curl --location --request POST 'https://hinote.in/hrworks/api/post/AttendanceInput.do?key=<customer_api_key>\
--header 'Content-Type: text/plain' \
--data-raw '{"employeeId": "XYZ0001", "loaction": "Deepika Sharma"}'