Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 9 Next »

1 General

You can use our web (HTTP request) API to submit new employee information to HRWorks by way of this API. This creates a new employee record in HRWorks.

1.1 Authentication

Your API calls must contain the API key for the purpose of authentication.

Parameter

Description

keyPlease contact the HRWorks administrator in your organization for the API key.

You can generate the API key for your organization yourself.

1.2 Endpoint

https://www.hinote.in/hrworks/AttendanceFileUpload.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.

2 Post Request

Input can be provided as a request parameter named input. The value should be a data file in xls (in MS Excel 97/2000/XP format) or CSV format. The xls template file for this can be downloaded from HRWorks application itself.

The input file contains the following columns:

  1. Employee Id: Employee Id as specified in HRWorks.
  2. Date: Date for which attendance is being uploaded. Should be Excel date value in case of xls file. For CSV format, the date value should be in the yyyy-mm-dd format.
  3. In Time: Date and Time of the employee entry time. Should be Excel date time value. For CSV format, the "TimeStamp" format in Data Types should be used.
  4. Out Time: Date and Time of the employee exit time. Should be Excel date time value. For CSV format, the "TimeStamp" format in Data Types should be used.
  5. In Location: If attendance locations are configured, then specify the In Location, else can be left blank.
  6. Out Location: If attendance locations are configured, then specify the Out Location, else can be left blank.
  7. Comments: Enter comments for the attendance entry. Can be left blank.

3. Response


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

{
    "success": true,
    "statusCode": 200
}


4 Coding Examples

4.1 CURL


1
2
3
4
5
6
7
8
9
10
11

#The following command posts attendance data.

Curl -F input=@<local reference to the attendance data file>"https:www.hinote.in/hrworks/AttendanceFileupload.do?key=<customer_api_key>"





curl -F "key=<hrworks_user_id>" -F "input=@<local reference to the attendance data file>" https://www.hinote.in/hrworks/AttendanceFileUpload.do

On request of the customer a specific API userid/password is configured. Attendance upload API can be accessed only using this user id.

The data file should be an xls file (in MS Excel 97/2000/XP format) or in the CSV format. The template file for this can be downloaded from HRWorks application itself. The template file contains the following columns:

  1. Employee Id: Employee Id as specified in HRWorks.
  2. Date: Date for which attendance is being uploaded. Should be Excel date value.
  3. In Time: Date and Time of the employee entry time. Should be Excel date time value.
  4. Out Time: Date and Time of the employee exit time. Should be Excel date time value.
  5. In Location: Should be left as blank. Created for future use.
  6. Out Location: Should be left as blank. Created for future use.
  7. Comments: Any relevant comments for the attendance entry. Can be left blank.

Status: Must be left as blank. Used by HRWorks to show any error or warning message once the upload is completed.

  • No labels