Description
The get user salary details API provides a seamless solution for retrieving comprehensive salary information of employees within our HRMS system. By accessing this API with the appropriate credentials, users can effortlessly obtain detailed breakdowns of earnings, such as Conveyance, Travel Allowance, Medical Allowance, and Special Allowance, as well as deductions like Employee-contribution PF. With its user-friendly interface and robust functionality, this API empowers organizations to efficiently manage payroll processes and gain valuable insights into employee compensation, ultimately enhancing operational efficiency and optimizing resource allocation.
API Endpoint
https://your_instance.uknowva.com/api.php/attendance/attendancedb/getUserSalaryDetails
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
“userid” OR “username”
Example Request
cURL
curl --location 'http://your_instance.uknowva.com/api.php/attendance/attendancedb/getUserSalaryDetails' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer Token' \
--data '{
"username" : "User1"
}
'
PHP Code Snippet
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'http://your_instance.uknowva.com/api.php/attendance/attendancedb/getUserSalaryDetails',
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 =>'{
"username" : "User1"
}
',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Authorization: Bearer Token'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Python Code Snippet
import requests
import json
url = "http://your_instance.uknowva.com/api.php/attendance/attendancedb/getUserSalaryDetails"
payload = json.dumps({
"username": "User1"
})
headers = {
'Content-Type': 'application/json',
'Authorization': 'Bearer Token'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
Java Code Snippet
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n \"username\" : \"User1
\"\r\n}\r\n");
Request request = new Request.Builder()
.url("http://your_instance.uknowva.com/api.php/attendance/attendancedb/getUserSalaryDetails")
.method("POST", body)
.addHeader("Content-Type", "application/json")
.addHeader("Authorization", "Bearer Token")
.build();
Response response = client.newCall(request).execute();
Sample Response
- Success
{
"status": true,
"payload": {
"earnings": {
"Conveyance": "1600",
"Travel Allowance": "1600",
"Medical Allowance": "1250",
"Special Allowance": "5541"
},
"deductions": {
"Employee contributed PF": "720"
},
"total_earnings": 12991,
"total_deductions": 720,
"total_salary": 12271,
"salary_structure_assign_on": "2020-09-19 13:16:58",
"salary_structure_updated_on": "2024-03-04 09:57:41"
}
}
- 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 Get User Salary Details 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!