Get Employee Salary Details
curl --request GET \
--url https://{env}.tartanhq.com/api/v2/salary_details/{employee_id}/ \
--header 'Authorization: <api-key>'import requests
url = "https://{env}.tartanhq.com/api/v2/salary_details/{employee_id}/"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://{env}.tartanhq.com/api/v2/salary_details/{employee_id}/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{env}.tartanhq.com/api/v2/salary_details/{employee_id}/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{env}.tartanhq.com/api/v2/salary_details/{employee_id}/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{env}.tartanhq.com/api/v2/salary_details/{employee_id}/")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{env}.tartanhq.com/api/v2/salary_details/{employee_id}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"requestId": "99ced2d1-c1e6-480a-8a00-1723ec968377",
"message": "Salary data points successfully fetched",
"data": {
"ctc": {
"dearnessAllowance": 123,
"gratuity": 123,
"medicalAllowance": 123,
"travelAllowance": 123,
"specialAllowance": 123,
"flexiBasketAllowance": 123,
"bonus": {
"joining": 123,
"referral": 123,
"retention": 123,
"performance": 123,
"relocation": 123,
"misc": 123
},
"deductions": {
"pf": 123,
"esi": 123,
"professionalTax": 123,
"labourWelfareFund": 123,
"misc": 123
}
},
"monthly": [
{
"month": 123,
"year": 123,
"basic": 123,
"dearnessAllowance": 123,
"hra": 123,
"medicalAllowance": 123,
"travelAllowance": 123,
"specialAllowance": 123,
"flexiBasketAllowance": 123,
"gratuity": 123,
"otherAllowance": 123,
"deductions": {
"pf": 123,
"esi": 123,
"professionalTax": 123,
"labourWelfareFund": 123,
"tds": 123,
"medicalClaimDeduction": 123,
"groupTermInsuranceDeductions": 123,
"earlyWageDeduction": 123,
"misc": 123
},
"bonus": {
"joining": 123,
"referral": 123,
"retention": 123,
"performance": 123,
"relocation": 123,
"misc": 123
},
"grossPay": 123,
"Reimbursements": 123
}
]
}
}{
"requestId": "e86c77c6-36a0-40e7-9df6-efc8c23fae33",
"message": "error",
"data": {
"org": [
"This field is required."
]
}
}{
"requestId": "1ef741b0-45b9-419e-a7f8-9c4cc77e1f61",
"message": "Authentication credentials were not provided.",
"data": null
}{
"requestId": "bf421cd7-fc71-4ad3-843d-8b3294484260",
"message": "Salary Details are not shared",
"data": null
}{
"requestId": "1f4c50f1-5741-4772-83df-8593bdf505bb",
"message": "Internal Server Error",
"data": null
}Internal
Get Employee Salary Details
Retrieve the salary details of a specific employee using employee ID.
GET
/
api
/
v2
/
salary_details
/
{employee_id}
/
Get Employee Salary Details
curl --request GET \
--url https://{env}.tartanhq.com/api/v2/salary_details/{employee_id}/ \
--header 'Authorization: <api-key>'import requests
url = "https://{env}.tartanhq.com/api/v2/salary_details/{employee_id}/"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://{env}.tartanhq.com/api/v2/salary_details/{employee_id}/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{env}.tartanhq.com/api/v2/salary_details/{employee_id}/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{env}.tartanhq.com/api/v2/salary_details/{employee_id}/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{env}.tartanhq.com/api/v2/salary_details/{employee_id}/")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{env}.tartanhq.com/api/v2/salary_details/{employee_id}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"requestId": "99ced2d1-c1e6-480a-8a00-1723ec968377",
"message": "Salary data points successfully fetched",
"data": {
"ctc": {
"dearnessAllowance": 123,
"gratuity": 123,
"medicalAllowance": 123,
"travelAllowance": 123,
"specialAllowance": 123,
"flexiBasketAllowance": 123,
"bonus": {
"joining": 123,
"referral": 123,
"retention": 123,
"performance": 123,
"relocation": 123,
"misc": 123
},
"deductions": {
"pf": 123,
"esi": 123,
"professionalTax": 123,
"labourWelfareFund": 123,
"misc": 123
}
},
"monthly": [
{
"month": 123,
"year": 123,
"basic": 123,
"dearnessAllowance": 123,
"hra": 123,
"medicalAllowance": 123,
"travelAllowance": 123,
"specialAllowance": 123,
"flexiBasketAllowance": 123,
"gratuity": 123,
"otherAllowance": 123,
"deductions": {
"pf": 123,
"esi": 123,
"professionalTax": 123,
"labourWelfareFund": 123,
"tds": 123,
"medicalClaimDeduction": 123,
"groupTermInsuranceDeductions": 123,
"earlyWageDeduction": 123,
"misc": 123
},
"bonus": {
"joining": 123,
"referral": 123,
"retention": 123,
"performance": 123,
"relocation": 123,
"misc": 123
},
"grossPay": 123,
"Reimbursements": 123
}
]
}
}{
"requestId": "e86c77c6-36a0-40e7-9df6-efc8c23fae33",
"message": "error",
"data": {
"org": [
"This field is required."
]
}
}{
"requestId": "1ef741b0-45b9-419e-a7f8-9c4cc77e1f61",
"message": "Authentication credentials were not provided.",
"data": null
}{
"requestId": "bf421cd7-fc71-4ad3-843d-8b3294484260",
"message": "Salary Details are not shared",
"data": null
}{
"requestId": "1f4c50f1-5741-4772-83df-8593bdf505bb",
"message": "Internal Server Error",
"data": null
}Authorizations
Path Parameters
Unique employee ID
Query Parameters
Organization UUID
Vendor Organization UUID
Type of salary details to fetch
Available options:
ctc, monthly, ctc_monthly Filter salaries from month-year (format MM-YYYY)
Filter salaries up to month-year (format MM-YYYY)
⌘I

