Push Single Attendance Record

Description 

 

The Push Single Attendance Record API is an essential tool that efficiently records each employee's punch-in moment and seamlessly integrates the data into our HRMS system. This ensures meticulous tracking of attendance, emphasising the API's role in maintaining a smooth and synchronised flow of crucial attendance data. It's a professional solution that guarantees precision and effectiveness in managing workforce attendance.

 


API Endpoint

http://your_instance.uknowva.com/api.php/hrm/syncattendanceshiftwise/fetchAttendanceFromAttendanceServer

Bearer Token 

 

Please refer to the token generation documentation for generating API tokens to invoke uKnowva APIs. (Token Generation Docs)

 

Method Type

 

  •  POST

Mandatory fields

 

  1.  biometriccode: Ensure that the biometric code parameter contains the correct employee identifier.
  2.  logDate: The logDate parameter should be in the format YYYY-MM-DD HH:mm:ss, representing the date and time of the attendance punch.

 


Example Request


cURL

curl --location 'http://your_instance.uknowva.com/api.php/hrm/syncattendanceshiftwise/fetchAttendanceFromAttendanceServer' \
--header 'Authorization: Bearer Token' \
--form 'biometriccode="user_test_ID"' \
--form 'logDate="2024-01-01 09:00:00"'

PHP Code Snippet

<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'http://your_instance.uknowva.com/api.php/hrm/syncattendanceshiftwise/fetchAttendanceFromAttendanceServer',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS => array('biometriccode' => 'user_test_ID','logDate' => '2024-01-01 09:00:00'),
CURLOPT_HTTPHEADER => array( 'Authorization: Bearer Token' ), )); $response = curl_exec($curl); curl_close($curl); echo $response;

Python Code Snippet

import requests
url = "http://your_instance.uknowva.com/api.php/hrm/syncattendanceshiftwise/fetchAttendanceFromAttendanceServer"
payload = {'biometriccode': 'user_test_ID',
'logDate': '2024-01-01 09:00:00'}
files=[
]
headers = {
  'Authorization': 'Bearer Token'
}
response = requests.request("POST", url, headers=headers, data=payload, files=files)
print(response.text)
/span>

Java Code Snippet

OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = new MultipartBody.Builder().setType(MultipartBody.FORM)
  .addFormDataPart("biometriccode","user_test_ID")
  .addFormDataPart("logDate","2024-01-01 09:00:00")
.build(); Request request = new Request.Builder() .url("http://your_instance.uknowva.com/api.php/hrm/syncattendanceshiftwise/fetchAttendanceFromAttendanceServer") .method("POST", body) .addHeader("Authorization", "Bearer Token") .build(); Response response = client.newCall(request).execute();

 


Response Format

  • status : Indicates the overall success or failure of the request.
  • payload : Contains detailed information about the operation.
    • status : Represents the status of the operation.
    • message : Provides a descriptive message about the outcome.

Sample Response


  • Success
{
  "status": true,
  "payload": 
  {
    "status": true,
    "message": "Attendance added successfully."
  }
}
  • Failure
{
   "status":false,"message":"Bearer Token is not correct."
}
{
   "status": false,
   "message": "The given input parameters are not valid. 
   Please provide a valid group, plugin name and API function to execute. Please contact This email address is being protected from spambots. You need JavaScript enabled to view it. for technical  support"
}

Sample Response

Download Push Single Attendance API Collection

Explore the alternative 'Push Multiple Attendance Records' API for efficiently handling multiple attendance records with seamless integration into our HRMS system. Click here for more details.

 

In case you face any problems, then please write to This email address is being protected from spambots. You need JavaScript enabled to view it., our awesome support team will surely help you!