Versions Compared

Key

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

...

You can generate the API key for your organization yourself.

1.2 Endpoint

https://www.hinote.in/hrworks/api/v1/addEmployeeAttendanceFileUpload.do?key=<customer_api_key>
You need to use https in your API call.

...

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": "XYZ0001",
  "firstName": "Deepika Sharma",
  "dateOfBirth": "1995-03-01",
  "nationality": "Indian",
  "fatherName": "Anil Sharma",
  "maritalStatus": "Unmarried",
  "salutation": "Ms",
  "bloodGroup": "A Positive",
  "bankBranch": "Axis Bank/Chennai",
  "bankAccountNo": "111111111111",
  "nameInBankAccount": "Deepika A Sharma",
  "dateOfJoining": "2021-04-01",
  "pfJoinDate": "2021-04-01",
  "userId": "XYZ0001",
  "password": "0723$XYZ",
  "tpg": "CPG",
  "gender": "Female",
  "statutoryId": {
    "pan": "DHCPS2159K"
  },
  "designation": "Project Manager",
  "manager": "E0101",
  "employeeType": "PM",
  "status": "Employed",
  "division": "Application Development",
  "workLocation": "Chennai",
  "shift": "Shift 1",
  "contactAddress": [{
    "addressType": "Current Address",
    "addressLine1": "Adyar Main Road",
    "city": "Chennai",
    "state": "Tamilnadu",
    "country": "India",
    "postalCode": "600113",
    "isPrimary": true
  }],
  "contactEmail": [{
    "emailType": "email",
    "emailId": "deepika@xyzco.com",
    "isPrimary": true
  }],
     
  "other.ePS_Contribution": "Yes",
  "payPackage": {
    "fromDate": "2021-04-01",
    "action": "Add Full",
    "compensationDetails": {
      "basic": 30000,
      "hra": 10000,
      "employerPF": "Inherit"
    },
    "deductionDetails": {
      "otherDeduction": 800,
      "employeePF": "Inherit"
    }
  }
}

3. Response

...

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

3.1 Response in case of error

...

{
    "success": false,
    "statusCode": 400,
    "errorMsg": "Invalid JSON. Please ensure you are passing a valid JSON string and it is url encoded properly."
}

 
Note:

  1. errorMsg is a string value describing the error. 
  2. Status codes are described in Status Codes section.

4 Coding Examples

4.1 CURL

1
2
3
4
5
6
7
8
9
10
11

#The following command posts new employee data.
  
curl --location --request POST 'https://hinote.in/hrworks/api/v1/addEmployee?key=<customer_api_key>' \
--header 'Content-Type: text/plain' \
--data-raw '{  "employeeId": "XYZ0001",  "firstName": "Deepika Sharma",  "dateOfBirth": "1995-03-01",  "nationality": "Indian",  "fatherName": "Anil Sharma",  "maritalStatus": "Unmarried",  "salutation": "Ms",  "bloodGroup": "A Positive","bankBranch": "Axis Bank/Chennai",  "bankAccountNo": "111111111111",  "nameInBankAccount": "Deepika A Sharma", "dateOfJoining": "2021-04-01",  "pfJoinDate": "2021-04-01",  "userId": "XYZ0001",  "password": "0723$XYZ", "tpg": "CPG",  "gender": "Female",  "statutoryId": {    "pan": "DHCPS2159K"  },  "designation": "Project Manager", "manager": "E0101",  "employeeType": "PM",  "status": "Employed",  "division": "Application Development", "workLocation": "Chennai",  "shift": "Shift 1",  "contactAddress": [{    "addressType": "Current Address",
"addressLine1": "Adyar Main Road", "city": "Chennai",    "state": "Tamilnadu",    "country": "India",
"postalCode": "600113",    "isPrimary": true  }],
"contactEmail": [{    "emailType": "email",    "emailId": "deepika@xyzco.com",    "isPrimary": true  }],
"other.ePS_Contribution": "Yes",  "payPackage": {    "fromDate": "2021-04-01",    "action": "Add Full",
"compensationDetails": {      "basic": 30000,      "hra": 10000,      "employerPF": "Inherit"    },
"deductionDetails": {      "otherDeduction": 800,      "employeePF": "Inherit"    }  }}'

CURL utility can be used to upload attendance data into HRWorks application. The following command can be used for the upload:

curl -F "userId=<hrworks_user_id>" -F "company="<customer_name>" -F "password="<hrworks_password>" -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.

...

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: 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 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.
  8. Out Location: 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.
  9. 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

#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>"