Loss of Pay API

Description 

 

The LOP API is designed for our Partners, to access employees' Loss of Pay (LOP) attendance data. This LOP API allows for the retrieval of employee attendance data and can be extracted based on filtered data. For an illustrative guide on how to use this API, refer to below parameters.

 


API Endpoint

https://yourinstancename.uknowva.com/api.php/reportengine/generatereport/restapi/LOPReport

Bearer Token 

 

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

 

Method Type

 

  •  GET

Filters Available for API

Last Updated On, Date

API Endpoint

filter[Last Updated On_from]
filter[Last Updated On_to]
filter[DATE_from]
filter[DATE_to]


Example Request


cURL

curl --location 'https://yourinstancename.uknowva.com/api.php/reportengine/generatereport/restapi/LOPReport' \
--header 'Authorization: Bearer Token'

PHP Code Snippet

<?php
$curl = curl_init();
curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://yourinstancename.uknowva.com/api.php/reportengine/generatereport/restapi/LOPReport',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer Token'
 ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Python Code Snippet

import requests
url = "https://yourinstancename.uknowva.com/api.php/reportengine/generatereport/restapi/LOPReport"
payload = {}
headers = {
  'Authorization': 'Bearer Token'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)

Java Code Snippet

OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
  .url("https://yourinstancename.uknowva.com/api.php/reportengine/generatereport/restapi/LOPReport")
  .method("GET", body)
  .addHeader("Authorization", "Bearer Token")
 .build();
Response response = client.newCall(request).execute();

Sample Response


  • Success
{
    "status": true,
    "payload": {
        "total_record": "4720",
        "record_count": 500,
        "data": [
            {
                "user_id": "3044",
                "Name": "Test",
                "username": "anirud.test",
                "DATE": "2023-11-20",
                "Attendance Status": "A",
                "Last Updated On": "2023-10-21 00:14:10",
                "Value": "1.0"
            },
            {
                "user_id": "2827",
                "Name": "Ravindra Chitlangi",
                "username": "EMP001",
                "DATE": "2023-11-20",
                "Attendance Status": "A",
                "Last Updated On": "2023-10-21 00:14:10",
                "Value": "1.0"
            },
    }
}

Sample Collection

Download Pain and Unpaid 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!

Was this Article helpful?