Tuhund - Attendance Push API

API # : 8043 | API Name : attendance

This API is used to register attendance record in Tuhund.

URL : <domain>/apic/attendance
Methods Allowed : POST

Creates a complete attendance record for an employee by recording both Time In and Time Out in a single transaction.

The API identifies the employee using the supplied punch code (code). If no matching employee is found, the request is rejected.

Before inserting the new attendance record, the API checks for an existing attendance entry for the same employee with the same Time In. If one exists, it is automatically deleted to prevent duplicate records.

After insertion, the API calculates the total attendance duration in minutes and performs the following validations:

  • The duration must not be negative.
  • The duration must be at least 10 minutes.

If either validation fails, the transaction is rolled back and an appropriate error is returned.

The behaviour of the API depends on the value of the mode parameter:

  • If mode begins with T (for example TEST), all validations are performed but no data is committed to the database. The API returns a success message indicating that the request is valid.
  • For all other values, the attendance record is committed to the database and a success response is returned.

This API is intended for automated attendance integrations such as biometric devices, facial recognition systems, mobile applications and third-party attendance systems that already know both the check-in and check-out times.

It is commonly used in combination with API 8042 (Attendance Punch Push API). API 8042 continuously captures and synchronises employee punch events throughout the day as they occur. After attendance processing is completed, API 8043 (Attendance Push API) can be used to synchronise the final attendance records from the attendance system.

This approach ensures that any changes made after the initial punches, such as missed punches, manual corrections, shift adjustments, approved regularisations or other attendance modifications, are reflected accurately in Tuhund. As a result, Tuhund receives the final processed attendance data rather than relying solely on the raw punch events captured during the day.

Note: While this API supports synchronising attendance records that may have been modified in an external attendance system, Tuhund strongly discourages performing attendance corrections, regularisations or manual adjustments outside Tuhund.

Tuhund is designed to be the system of record for attendance management and provides comprehensive features to handle attendance exceptions, including attendance correction, attendance claims with configurable approval workflows, missed punch handling, shift adjustments, overtime processing and other attendance regularisation functions. Performing these activities within Tuhund ensures that all changes are fully traceable, properly authorised and consistently reflected across payroll, HR and reporting modules.

The ability to synchronise modified attendance records through this API is provided primarily for compatibility with third-party attendance systems and for organisations migrating to Tuhund. Wherever possible, attendance devices should synchronise punch events using API 8042, after which all attendance processing, corrections and approvals should be carried out within Tuhund.

 

Payload Schema :

Request Headers :

Name Description
device A short name of your application. Device is mandatory but any value between 3 and 20 characters is accepted.
Authentication Authentication code generated for API call.

Sample Payload :

Sample Payload Test :

Sample Response :

Sample Response - Test :

Error Codes

Error Code Message Description
806 No employee with punch code XXX found here Employee code not recognised
808 This looks like a double punch Duplicate punch detected within the permitted interval
808 Cannot punch out a person who has no punch in record Punch Out received without an open attendance record
500 Internal server error Unexpected server exception
Tuhund Logo
TUHUND®
Home About us Modules CRM HR SALES BI SERVICES MANAGEMENT INVENTORY MANAGEMENT ACCOUNTING AND FINANCE PROCUREMENT PROJECT MANAGEMENT ERP ADMINISTRATION DATA REPOSITORY API & SUB PORTALS Careers Community Blog
M Home Schedule Demo About us Community Blog
CRM HR SALES BI SERVICES MANAGEMENT INVENTORY MANAGEMENT ACCOUNTING AND FINANCE PROCUREMENT PROJECT MANAGEMENT ERP ADMINISTRATION DATA REPOSITORY API & SUB PORTALS Careers
API Documents
Request Demo