Description
The Push Multiple Attendance Records is a vital resource within our HRMS system, designed to handle multiple attendance records efficiently. This intelligent tool allows for the seamless integration of batches of employee punch-in moments into our HRMS system. By leveraging this API, we prioritise precision and effectiveness in managing attendance data on a larger scale. It emphasises our commitment to maintaining a smooth and synchronised flow of crucial attendance data, ensuring that the process remains professional and efficient for the optimal functioning of your workforce management.
API Endpoint
https://your_instance.uknowva.com/api.php/hrm/syncattendanceshiftwise/fetchBulkAttendanceFromAttendanceServer
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
- biometriccode: Ensure that the biometric code parameter contains the correct employee identifier.
- logDate: The logDate parameter should be in the format YYYY-MM-DD HH:mm:ss, representing the date and time of the attendance punch.
- devicelogId (Optional): Include the unique ID of the client's DB or a description associated with each punch.
Example Request
cURL
curl --location 'http://your_instance.uknowva.com/api.php/hrm/syncattendanceshiftwise/fetchBulkAttendanceFromAttendanceServer' \
--header 'Authorization: Bearer Token' \
--form 'punches_data="[{\"biometriccode\":\"test1\",\"logDate\":\"2023-04-03 07:18:24\"},{\"biometriccode\":\"test2\",\"logDate\":\"2023-04-03 08:18:24\"}]"'
PHP Code Snippet
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'http://your_instance.uknowva/api.php/hrm/syncattendanceshiftwise/fetchBulkAttendanceFromAttendanceServer',
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('punches_data' => '[{"biometriccode":"test1","logDate":"2023-04-03 07:18:24"},{"biometriccode":"test2","logDate":"2023-04-03 08:18:24"}]'),
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/fetchBulkAttendanceFromAttendanceServer"
payload = {'punches_data': '[{"biometriccode":"test1","logDate":"2023-04-03 07:18:24"},{"biometriccode":"test2","logDate":"2023-04-03 08:18:24"}]'}
files=[
]
headers = {
'': '',
'Authorization': 'Bearer Token'
}
response = requests.request("POST", url, headers=headers, data=payload, files=files)
print(response.text)
Java Code Snippet
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = new MultipartBody.Builder().setType(MultipartBody.FORM)
.addFormDataPart("punches_data","[{\"biometriccode\":\"test1\",\"logDate\":\"2023-04-03 07:18:24\"},{\"biometriccode\":\"test2\",\"logDate\":\"2023-04-03 08:18:24\"}]")
.build();
Request request = new Request.Builder()
.url("http://your_instance.uknowva.com/api.php/hrm/syncattendanceshiftwise/fetchBulkAttendanceFromAttendanceServer")
.method("POST", body)
.addHeader("", "")
.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."
},
{
"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 Collection
Download Push Multiple Attendance API Collection
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!