User Guide‎ > ‎

Web Service APIs for Attendance Import

The HRPro Web Service APIs (Application Programming Interfaces) allow to you to upload attendance record to HRPro through JSON (web service).

Developers can use the APIs to integrate your card reader system or web site to enable real-time attendance record update.

1.  Upload Attendance Log

POST /api/AttendanceLogInsert

This web service will create an unposted Attendance Log Record and optionally post to HRPro Attendance Record.

 Property Compulsory Type     Description
 Database     optional  String name of database, e.g. dbXXX, if omitted, see Notes
 UserID required String HRPro User ID
 Password required String Password for HRPro User ID
 EENo optional if BadgeNo provided   String  Employee Number in HRPro
 BadgeNo optional if EENo provided String Badge Number in HRPro
 CardDate required String    in yyyy/MM/dd format
 CardTime required String in hh:mm or hh:mm:ss format
 InOutMode     optional Integer See below for possible values (default 99)
 PostImmediately optional Boolean If true, create HRPro attendance record immediately
 If false, required to call AttendanceLogPost after all  Attendance Log records are inserted. 
 (default false)


2.  Post Attendance Log

POST /api/AttendanceLogPost

This web service will post all unposted Attendance Log Records to HRPro Attendance Record and then delete them.

 Property Compulsory Type     Description
 Database optional String name of database, e.g. dbXXX, if omitted, see Notes
 UserID required String HRPro User ID
 Password required String Password for HRPro User ID

3.  Delete Attendance Log

POST /api/AttendanceLogDelete

This web service will delete all posted Attendance Log Records and optionally delete the unposted records

 Property Compulsory Type     Description
 Database     optional String name of database, e.g. dbXXX, if omitted, see Notes
 UserID required String HRPro User ID
 Password required String Password for HRPro User ID

 WithUnpost Optional     Boolean Whether also delete the unposted Attendance Log  Records
 (default false)


InOutMode

0 - Work-in, earliest check-in time
1 - Meal-out
2 - Meal-in
3 - Rest-out
4 - Rest-in
9 - Work-out, latest check-out time
10 - Work-in (meal-in/rest-in from scan range)
19 - Work-out (meal-out/rest-out from scan range)
20 - Call-Back In Time
29 - Call-Back Out Time
30 - Work-in work-out from Scan Range (no meal/rest time)
31 - All work-in work-out, meal-in, meal-out, rest-in, rest-out from Scan Range
98 - First In Last Out (meal-in meal-out rest-in rest-out from scan range)
99 - First In Last Out


Notes

  • Please note that the database to update is the data source defined in HRPro.Config/Web.Config if Database property is not provided.