Skip to main content
POST
/
api
/
webhook
/
v1
/
employee
/
update
/
Update Employee
curl --request POST \
  --url https://{env}.tartanhq.com/api/webhook/v1/employee/update/ \
  --header 'Content-Type: application/json' \
  --data '
{
  "id": "7",
  "employeeId": "5",
  "name": "Manas Mallik",
  "email": "manas@tartanhq.com",
  "personalEmail": "manas.mallik@gmail.com",
  "doj": "2021-06-01",
  "dob": "1983-06-08",
  "status": "Active",
  "employmentType": "Permanent",
  "gender": "Male",
  "pan": "************",
  "aadhar": "************",
  "uan": "************",
  "mobileNumber": "************",
  "maritalStatus": "Married",
  "nationality": "Indian",
  "fatherName": "Ritesh Mallik",
  "bloodGroup": "AB +ve",
  "designation": "NOT AVAILABLE",
  "department": "Engineering",
  "grade": "D-3",
  "groupName": "NOT AVAILABLE",
  "costCenter": "NOT AVAILABLE",
  "companyName": "NOT AVAILABLE",
  "terminationDate": "",
  "manager": "Meet Semlani",
  "managerEmail": "NOT AVAILABLE",
  "managerEmail2": "NOT AVAILABLE",
  "managerEmail3": "NOT AVAILABLE",
  "managerEmail4": "NOT AVAILABLE",
  "managerEmail5": "NOT AVAILABLE",
  "countryCode": "IN",
  "bankDetails": {
    "accountNumber": "************",
    "ifscCode": "************",
    "bankName": "SBI"
  },
  "currentAddress": {
    "addressPincode": "560080",
    "addressCity": "Banglore",
    "addressCountry": "India",
    "addressState": "Karnataka",
    "addressLine": "Sadashiva Nagar Armane Nagar"
  },
  "permanentAddress": {
    "addressPincode": "226001",
    "addressCity": "Luknow",
    "addressCountry": "India",
    "addressState": "Uttar Pradesh",
    "addressLine": "Yarana Nagar Luknow"
  },
  "jobLocation": {
    "pincode": "NOT AVAILABLE",
    "city": "NOT AVAILABLE"
  },
  "employeeMetadata": {
    "marriageDate": "NOT AVAILABLE"
  },
  "dependentDetails": [
    {
      "name": "Sohan Negi",
      "relation": "Father",
      "dob": "NOT AVAILABLE",
      "email": "NOT AVAILABLE",
      "gender": "NOT AVAILABLE",
      "mobileNumber": "NOT AVAILABLE",
      "profession": "NOT AVAILABLE"
    }
  ],
  "salaryDetails": {
    "ctc": {
      "basic": 50000,
      "dearnessAllowance": 9000.9,
      "hra": 25000.5,
      "gratuity": 2000.7,
      "medicalAllowance": 2000.7,
      "travelAllowance": 2000.7,
      "specialAllowance": null,
      "otherAllowance": null,
      "flexiBasketAllowance": null,
      "grossPay": null,
      "taxRegime": null,
      "fixedPay": null,
      "bonus": {
        "joining": 80000,
        "referral": null,
        "retention": null,
        "performance": null,
        "relocation": null,
        "misc": null
      },
      "deductions": {
        "pf": 1800,
        "esi": null,
        "professionalTax": null,
        "labourWelfareFund": null,
        "misc": null,
        "nps": null
      }
    },
    "monthly": {
      "month": 2,
      "year": 2025,
      "basic": null,
      "dearnessAllowance": null,
      "hra": null,
      "medicalAllowance": null,
      "travelAllowance": null,
      "specialAllowance": null,
      "flexiBasketAllowance": null,
      "gratuity": 1600,
      "otherAllowance": null,
      "taxRegime": null,
      "fixedPay": null,
      "grossPay": null,
      "bonus": {
        "joining": 20000,
        "referral": null,
        "retention": null,
        "performance": null,
        "relocation": 28907.17,
        "misc": null
      },
      "deductions": {
        "pf": null,
        "esi": null,
        "professionalTax": 300,
        "labourWelfareFund": null,
        "tds": null,
        "medicalClaimDeduction": null,
        "groupTermInsuranceDeductions": null,
        "earlyWageDeduction": null,
        "misc": 162023.24,
        "nps": 1234.34
      },
      "reimbursements": 93321.33
    }
  }
}
'
import requests

url = "https://{env}.tartanhq.com/api/webhook/v1/employee/update/"

payload = {
"id": "7",
"employeeId": "5",
"name": "Manas Mallik",
"email": "manas@tartanhq.com",
"personalEmail": "manas.mallik@gmail.com",
"doj": "2021-06-01",
"dob": "1983-06-08",
"status": "Active",
"employmentType": "Permanent",
"gender": "Male",
"pan": "************",
"aadhar": "************",
"uan": "************",
"mobileNumber": "************",
"maritalStatus": "Married",
"nationality": "Indian",
"fatherName": "Ritesh Mallik",
"bloodGroup": "AB +ve",
"designation": "NOT AVAILABLE",
"department": "Engineering",
"grade": "D-3",
"groupName": "NOT AVAILABLE",
"costCenter": "NOT AVAILABLE",
"companyName": "NOT AVAILABLE",
"terminationDate": "",
"manager": "Meet Semlani",
"managerEmail": "NOT AVAILABLE",
"managerEmail2": "NOT AVAILABLE",
"managerEmail3": "NOT AVAILABLE",
"managerEmail4": "NOT AVAILABLE",
"managerEmail5": "NOT AVAILABLE",
"countryCode": "IN",
"bankDetails": {
"accountNumber": "************",
"ifscCode": "************",
"bankName": "SBI"
},
"currentAddress": {
"addressPincode": "560080",
"addressCity": "Banglore",
"addressCountry": "India",
"addressState": "Karnataka",
"addressLine": "Sadashiva Nagar Armane Nagar"
},
"permanentAddress": {
"addressPincode": "226001",
"addressCity": "Luknow",
"addressCountry": "India",
"addressState": "Uttar Pradesh",
"addressLine": "Yarana Nagar Luknow"
},
"jobLocation": {
"pincode": "NOT AVAILABLE",
"city": "NOT AVAILABLE"
},
"employeeMetadata": { "marriageDate": "NOT AVAILABLE" },
"dependentDetails": [
{
"name": "Sohan Negi",
"relation": "Father",
"dob": "NOT AVAILABLE",
"email": "NOT AVAILABLE",
"gender": "NOT AVAILABLE",
"mobileNumber": "NOT AVAILABLE",
"profession": "NOT AVAILABLE"
}
],
"salaryDetails": {
"ctc": {
"basic": 50000,
"dearnessAllowance": 9000.9,
"hra": 25000.5,
"gratuity": 2000.7,
"medicalAllowance": 2000.7,
"travelAllowance": 2000.7,
"specialAllowance": None,
"otherAllowance": None,
"flexiBasketAllowance": None,
"grossPay": None,
"taxRegime": None,
"fixedPay": None,
"bonus": {
"joining": 80000,
"referral": None,
"retention": None,
"performance": None,
"relocation": None,
"misc": None
},
"deductions": {
"pf": 1800,
"esi": None,
"professionalTax": None,
"labourWelfareFund": None,
"misc": None,
"nps": None
}
},
"monthly": {
"month": 2,
"year": 2025,
"basic": None,
"dearnessAllowance": None,
"hra": None,
"medicalAllowance": None,
"travelAllowance": None,
"specialAllowance": None,
"flexiBasketAllowance": None,
"gratuity": 1600,
"otherAllowance": None,
"taxRegime": None,
"fixedPay": None,
"grossPay": None,
"bonus": {
"joining": 20000,
"referral": None,
"retention": None,
"performance": None,
"relocation": 28907.17,
"misc": None
},
"deductions": {
"pf": None,
"esi": None,
"professionalTax": 300,
"labourWelfareFund": None,
"tds": None,
"medicalClaimDeduction": None,
"groupTermInsuranceDeductions": None,
"earlyWageDeduction": None,
"misc": 162023.24,
"nps": 1234.34
},
"reimbursements": 93321.33
}
}
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
id: '7',
employeeId: '5',
name: 'Manas Mallik',
email: 'manas@tartanhq.com',
personalEmail: 'manas.mallik@gmail.com',
doj: '2021-06-01',
dob: '1983-06-08',
status: 'Active',
employmentType: 'Permanent',
gender: 'Male',
pan: '************',
aadhar: '************',
uan: '************',
mobileNumber: '************',
maritalStatus: 'Married',
nationality: 'Indian',
fatherName: 'Ritesh Mallik',
bloodGroup: 'AB +ve',
designation: 'NOT AVAILABLE',
department: 'Engineering',
grade: 'D-3',
groupName: 'NOT AVAILABLE',
costCenter: 'NOT AVAILABLE',
companyName: 'NOT AVAILABLE',
terminationDate: '',
manager: 'Meet Semlani',
managerEmail: 'NOT AVAILABLE',
managerEmail2: 'NOT AVAILABLE',
managerEmail3: 'NOT AVAILABLE',
managerEmail4: 'NOT AVAILABLE',
managerEmail5: 'NOT AVAILABLE',
countryCode: 'IN',
bankDetails: {accountNumber: '************', ifscCode: '************', bankName: 'SBI'},
currentAddress: {
addressPincode: '560080',
addressCity: 'Banglore',
addressCountry: 'India',
addressState: 'Karnataka',
addressLine: 'Sadashiva Nagar Armane Nagar'
},
permanentAddress: {
addressPincode: '226001',
addressCity: 'Luknow',
addressCountry: 'India',
addressState: 'Uttar Pradesh',
addressLine: 'Yarana Nagar Luknow'
},
jobLocation: {pincode: 'NOT AVAILABLE', city: 'NOT AVAILABLE'},
employeeMetadata: {marriageDate: 'NOT AVAILABLE'},
dependentDetails: [
{
name: 'Sohan Negi',
relation: 'Father',
dob: 'NOT AVAILABLE',
email: 'NOT AVAILABLE',
gender: 'NOT AVAILABLE',
mobileNumber: 'NOT AVAILABLE',
profession: 'NOT AVAILABLE'
}
],
salaryDetails: {
ctc: {
basic: 50000,
dearnessAllowance: 9000.9,
hra: 25000.5,
gratuity: 2000.7,
medicalAllowance: 2000.7,
travelAllowance: 2000.7,
specialAllowance: null,
otherAllowance: null,
flexiBasketAllowance: null,
grossPay: null,
taxRegime: null,
fixedPay: null,
bonus: {
joining: 80000,
referral: null,
retention: null,
performance: null,
relocation: null,
misc: null
},
deductions: {
pf: 1800,
esi: null,
professionalTax: null,
labourWelfareFund: null,
misc: null,
nps: null
}
},
monthly: {
month: 2,
year: 2025,
basic: null,
dearnessAllowance: null,
hra: null,
medicalAllowance: null,
travelAllowance: null,
specialAllowance: null,
flexiBasketAllowance: null,
gratuity: 1600,
otherAllowance: null,
taxRegime: null,
fixedPay: null,
grossPay: null,
bonus: {
joining: 20000,
referral: null,
retention: null,
performance: null,
relocation: 28907.17,
misc: null
},
deductions: {
pf: null,
esi: null,
professionalTax: 300,
labourWelfareFund: null,
tds: null,
medicalClaimDeduction: null,
groupTermInsuranceDeductions: null,
earlyWageDeduction: null,
misc: 162023.24,
nps: 1234.34
},
reimbursements: 93321.33
}
}
})
};

fetch('https://{env}.tartanhq.com/api/webhook/v1/employee/update/', 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/webhook/v1/employee/update/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'id' => '7',
'employeeId' => '5',
'name' => 'Manas Mallik',
'email' => 'manas@tartanhq.com',
'personalEmail' => 'manas.mallik@gmail.com',
'doj' => '2021-06-01',
'dob' => '1983-06-08',
'status' => 'Active',
'employmentType' => 'Permanent',
'gender' => 'Male',
'pan' => '************',
'aadhar' => '************',
'uan' => '************',
'mobileNumber' => '************',
'maritalStatus' => 'Married',
'nationality' => 'Indian',
'fatherName' => 'Ritesh Mallik',
'bloodGroup' => 'AB +ve',
'designation' => 'NOT AVAILABLE',
'department' => 'Engineering',
'grade' => 'D-3',
'groupName' => 'NOT AVAILABLE',
'costCenter' => 'NOT AVAILABLE',
'companyName' => 'NOT AVAILABLE',
'terminationDate' => '',
'manager' => 'Meet Semlani',
'managerEmail' => 'NOT AVAILABLE',
'managerEmail2' => 'NOT AVAILABLE',
'managerEmail3' => 'NOT AVAILABLE',
'managerEmail4' => 'NOT AVAILABLE',
'managerEmail5' => 'NOT AVAILABLE',
'countryCode' => 'IN',
'bankDetails' => [
'accountNumber' => '************',
'ifscCode' => '************',
'bankName' => 'SBI'
],
'currentAddress' => [
'addressPincode' => '560080',
'addressCity' => 'Banglore',
'addressCountry' => 'India',
'addressState' => 'Karnataka',
'addressLine' => 'Sadashiva Nagar Armane Nagar'
],
'permanentAddress' => [
'addressPincode' => '226001',
'addressCity' => 'Luknow',
'addressCountry' => 'India',
'addressState' => 'Uttar Pradesh',
'addressLine' => 'Yarana Nagar Luknow'
],
'jobLocation' => [
'pincode' => 'NOT AVAILABLE',
'city' => 'NOT AVAILABLE'
],
'employeeMetadata' => [
'marriageDate' => 'NOT AVAILABLE'
],
'dependentDetails' => [
[
'name' => 'Sohan Negi',
'relation' => 'Father',
'dob' => 'NOT AVAILABLE',
'email' => 'NOT AVAILABLE',
'gender' => 'NOT AVAILABLE',
'mobileNumber' => 'NOT AVAILABLE',
'profession' => 'NOT AVAILABLE'
]
],
'salaryDetails' => [
'ctc' => [
'basic' => 50000,
'dearnessAllowance' => 9000.9,
'hra' => 25000.5,
'gratuity' => 2000.7,
'medicalAllowance' => 2000.7,
'travelAllowance' => 2000.7,
'specialAllowance' => null,
'otherAllowance' => null,
'flexiBasketAllowance' => null,
'grossPay' => null,
'taxRegime' => null,
'fixedPay' => null,
'bonus' => [
'joining' => 80000,
'referral' => null,
'retention' => null,
'performance' => null,
'relocation' => null,
'misc' => null
],
'deductions' => [
'pf' => 1800,
'esi' => null,
'professionalTax' => null,
'labourWelfareFund' => null,
'misc' => null,
'nps' => null
]
],
'monthly' => [
'month' => 2,
'year' => 2025,
'basic' => null,
'dearnessAllowance' => null,
'hra' => null,
'medicalAllowance' => null,
'travelAllowance' => null,
'specialAllowance' => null,
'flexiBasketAllowance' => null,
'gratuity' => 1600,
'otherAllowance' => null,
'taxRegime' => null,
'fixedPay' => null,
'grossPay' => null,
'bonus' => [
'joining' => 20000,
'referral' => null,
'retention' => null,
'performance' => null,
'relocation' => 28907.17,
'misc' => null
],
'deductions' => [
'pf' => null,
'esi' => null,
'professionalTax' => 300,
'labourWelfareFund' => null,
'tds' => null,
'medicalClaimDeduction' => null,
'groupTermInsuranceDeductions' => null,
'earlyWageDeduction' => null,
'misc' => 162023.24,
'nps' => 1234.34
],
'reimbursements' => 93321.33
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://{env}.tartanhq.com/api/webhook/v1/employee/update/"

payload := strings.NewReader("{\n \"id\": \"7\",\n \"employeeId\": \"5\",\n \"name\": \"Manas Mallik\",\n \"email\": \"manas@tartanhq.com\",\n \"personalEmail\": \"manas.mallik@gmail.com\",\n \"doj\": \"2021-06-01\",\n \"dob\": \"1983-06-08\",\n \"status\": \"Active\",\n \"employmentType\": \"Permanent\",\n \"gender\": \"Male\",\n \"pan\": \"************\",\n \"aadhar\": \"************\",\n \"uan\": \"************\",\n \"mobileNumber\": \"************\",\n \"maritalStatus\": \"Married\",\n \"nationality\": \"Indian\",\n \"fatherName\": \"Ritesh Mallik\",\n \"bloodGroup\": \"AB +ve\",\n \"designation\": \"NOT AVAILABLE\",\n \"department\": \"Engineering\",\n \"grade\": \"D-3\",\n \"groupName\": \"NOT AVAILABLE\",\n \"costCenter\": \"NOT AVAILABLE\",\n \"companyName\": \"NOT AVAILABLE\",\n \"terminationDate\": \"\",\n \"manager\": \"Meet Semlani\",\n \"managerEmail\": \"NOT AVAILABLE\",\n \"managerEmail2\": \"NOT AVAILABLE\",\n \"managerEmail3\": \"NOT AVAILABLE\",\n \"managerEmail4\": \"NOT AVAILABLE\",\n \"managerEmail5\": \"NOT AVAILABLE\",\n \"countryCode\": \"IN\",\n \"bankDetails\": {\n \"accountNumber\": \"************\",\n \"ifscCode\": \"************\",\n \"bankName\": \"SBI\"\n },\n \"currentAddress\": {\n \"addressPincode\": \"560080\",\n \"addressCity\": \"Banglore\",\n \"addressCountry\": \"India\",\n \"addressState\": \"Karnataka\",\n \"addressLine\": \"Sadashiva Nagar Armane Nagar\"\n },\n \"permanentAddress\": {\n \"addressPincode\": \"226001\",\n \"addressCity\": \"Luknow\",\n \"addressCountry\": \"India\",\n \"addressState\": \"Uttar Pradesh\",\n \"addressLine\": \"Yarana Nagar Luknow\"\n },\n \"jobLocation\": {\n \"pincode\": \"NOT AVAILABLE\",\n \"city\": \"NOT AVAILABLE\"\n },\n \"employeeMetadata\": {\n \"marriageDate\": \"NOT AVAILABLE\"\n },\n \"dependentDetails\": [\n {\n \"name\": \"Sohan Negi\",\n \"relation\": \"Father\",\n \"dob\": \"NOT AVAILABLE\",\n \"email\": \"NOT AVAILABLE\",\n \"gender\": \"NOT AVAILABLE\",\n \"mobileNumber\": \"NOT AVAILABLE\",\n \"profession\": \"NOT AVAILABLE\"\n }\n ],\n \"salaryDetails\": {\n \"ctc\": {\n \"basic\": 50000,\n \"dearnessAllowance\": 9000.9,\n \"hra\": 25000.5,\n \"gratuity\": 2000.7,\n \"medicalAllowance\": 2000.7,\n \"travelAllowance\": 2000.7,\n \"specialAllowance\": null,\n \"otherAllowance\": null,\n \"flexiBasketAllowance\": null,\n \"grossPay\": null,\n \"taxRegime\": null,\n \"fixedPay\": null,\n \"bonus\": {\n \"joining\": 80000,\n \"referral\": null,\n \"retention\": null,\n \"performance\": null,\n \"relocation\": null,\n \"misc\": null\n },\n \"deductions\": {\n \"pf\": 1800,\n \"esi\": null,\n \"professionalTax\": null,\n \"labourWelfareFund\": null,\n \"misc\": null,\n \"nps\": null\n }\n },\n \"monthly\": {\n \"month\": 2,\n \"year\": 2025,\n \"basic\": null,\n \"dearnessAllowance\": null,\n \"hra\": null,\n \"medicalAllowance\": null,\n \"travelAllowance\": null,\n \"specialAllowance\": null,\n \"flexiBasketAllowance\": null,\n \"gratuity\": 1600,\n \"otherAllowance\": null,\n \"taxRegime\": null,\n \"fixedPay\": null,\n \"grossPay\": null,\n \"bonus\": {\n \"joining\": 20000,\n \"referral\": null,\n \"retention\": null,\n \"performance\": null,\n \"relocation\": 28907.17,\n \"misc\": null\n },\n \"deductions\": {\n \"pf\": null,\n \"esi\": null,\n \"professionalTax\": 300,\n \"labourWelfareFund\": null,\n \"tds\": null,\n \"medicalClaimDeduction\": null,\n \"groupTermInsuranceDeductions\": null,\n \"earlyWageDeduction\": null,\n \"misc\": 162023.24,\n \"nps\": 1234.34\n },\n \"reimbursements\": 93321.33\n }\n }\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://{env}.tartanhq.com/api/webhook/v1/employee/update/")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"7\",\n \"employeeId\": \"5\",\n \"name\": \"Manas Mallik\",\n \"email\": \"manas@tartanhq.com\",\n \"personalEmail\": \"manas.mallik@gmail.com\",\n \"doj\": \"2021-06-01\",\n \"dob\": \"1983-06-08\",\n \"status\": \"Active\",\n \"employmentType\": \"Permanent\",\n \"gender\": \"Male\",\n \"pan\": \"************\",\n \"aadhar\": \"************\",\n \"uan\": \"************\",\n \"mobileNumber\": \"************\",\n \"maritalStatus\": \"Married\",\n \"nationality\": \"Indian\",\n \"fatherName\": \"Ritesh Mallik\",\n \"bloodGroup\": \"AB +ve\",\n \"designation\": \"NOT AVAILABLE\",\n \"department\": \"Engineering\",\n \"grade\": \"D-3\",\n \"groupName\": \"NOT AVAILABLE\",\n \"costCenter\": \"NOT AVAILABLE\",\n \"companyName\": \"NOT AVAILABLE\",\n \"terminationDate\": \"\",\n \"manager\": \"Meet Semlani\",\n \"managerEmail\": \"NOT AVAILABLE\",\n \"managerEmail2\": \"NOT AVAILABLE\",\n \"managerEmail3\": \"NOT AVAILABLE\",\n \"managerEmail4\": \"NOT AVAILABLE\",\n \"managerEmail5\": \"NOT AVAILABLE\",\n \"countryCode\": \"IN\",\n \"bankDetails\": {\n \"accountNumber\": \"************\",\n \"ifscCode\": \"************\",\n \"bankName\": \"SBI\"\n },\n \"currentAddress\": {\n \"addressPincode\": \"560080\",\n \"addressCity\": \"Banglore\",\n \"addressCountry\": \"India\",\n \"addressState\": \"Karnataka\",\n \"addressLine\": \"Sadashiva Nagar Armane Nagar\"\n },\n \"permanentAddress\": {\n \"addressPincode\": \"226001\",\n \"addressCity\": \"Luknow\",\n \"addressCountry\": \"India\",\n \"addressState\": \"Uttar Pradesh\",\n \"addressLine\": \"Yarana Nagar Luknow\"\n },\n \"jobLocation\": {\n \"pincode\": \"NOT AVAILABLE\",\n \"city\": \"NOT AVAILABLE\"\n },\n \"employeeMetadata\": {\n \"marriageDate\": \"NOT AVAILABLE\"\n },\n \"dependentDetails\": [\n {\n \"name\": \"Sohan Negi\",\n \"relation\": \"Father\",\n \"dob\": \"NOT AVAILABLE\",\n \"email\": \"NOT AVAILABLE\",\n \"gender\": \"NOT AVAILABLE\",\n \"mobileNumber\": \"NOT AVAILABLE\",\n \"profession\": \"NOT AVAILABLE\"\n }\n ],\n \"salaryDetails\": {\n \"ctc\": {\n \"basic\": 50000,\n \"dearnessAllowance\": 9000.9,\n \"hra\": 25000.5,\n \"gratuity\": 2000.7,\n \"medicalAllowance\": 2000.7,\n \"travelAllowance\": 2000.7,\n \"specialAllowance\": null,\n \"otherAllowance\": null,\n \"flexiBasketAllowance\": null,\n \"grossPay\": null,\n \"taxRegime\": null,\n \"fixedPay\": null,\n \"bonus\": {\n \"joining\": 80000,\n \"referral\": null,\n \"retention\": null,\n \"performance\": null,\n \"relocation\": null,\n \"misc\": null\n },\n \"deductions\": {\n \"pf\": 1800,\n \"esi\": null,\n \"professionalTax\": null,\n \"labourWelfareFund\": null,\n \"misc\": null,\n \"nps\": null\n }\n },\n \"monthly\": {\n \"month\": 2,\n \"year\": 2025,\n \"basic\": null,\n \"dearnessAllowance\": null,\n \"hra\": null,\n \"medicalAllowance\": null,\n \"travelAllowance\": null,\n \"specialAllowance\": null,\n \"flexiBasketAllowance\": null,\n \"gratuity\": 1600,\n \"otherAllowance\": null,\n \"taxRegime\": null,\n \"fixedPay\": null,\n \"grossPay\": null,\n \"bonus\": {\n \"joining\": 20000,\n \"referral\": null,\n \"retention\": null,\n \"performance\": null,\n \"relocation\": 28907.17,\n \"misc\": null\n },\n \"deductions\": {\n \"pf\": null,\n \"esi\": null,\n \"professionalTax\": 300,\n \"labourWelfareFund\": null,\n \"tds\": null,\n \"medicalClaimDeduction\": null,\n \"groupTermInsuranceDeductions\": null,\n \"earlyWageDeduction\": null,\n \"misc\": 162023.24,\n \"nps\": 1234.34\n },\n \"reimbursements\": 93321.33\n }\n }\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://{env}.tartanhq.com/api/webhook/v1/employee/update/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"7\",\n \"employeeId\": \"5\",\n \"name\": \"Manas Mallik\",\n \"email\": \"manas@tartanhq.com\",\n \"personalEmail\": \"manas.mallik@gmail.com\",\n \"doj\": \"2021-06-01\",\n \"dob\": \"1983-06-08\",\n \"status\": \"Active\",\n \"employmentType\": \"Permanent\",\n \"gender\": \"Male\",\n \"pan\": \"************\",\n \"aadhar\": \"************\",\n \"uan\": \"************\",\n \"mobileNumber\": \"************\",\n \"maritalStatus\": \"Married\",\n \"nationality\": \"Indian\",\n \"fatherName\": \"Ritesh Mallik\",\n \"bloodGroup\": \"AB +ve\",\n \"designation\": \"NOT AVAILABLE\",\n \"department\": \"Engineering\",\n \"grade\": \"D-3\",\n \"groupName\": \"NOT AVAILABLE\",\n \"costCenter\": \"NOT AVAILABLE\",\n \"companyName\": \"NOT AVAILABLE\",\n \"terminationDate\": \"\",\n \"manager\": \"Meet Semlani\",\n \"managerEmail\": \"NOT AVAILABLE\",\n \"managerEmail2\": \"NOT AVAILABLE\",\n \"managerEmail3\": \"NOT AVAILABLE\",\n \"managerEmail4\": \"NOT AVAILABLE\",\n \"managerEmail5\": \"NOT AVAILABLE\",\n \"countryCode\": \"IN\",\n \"bankDetails\": {\n \"accountNumber\": \"************\",\n \"ifscCode\": \"************\",\n \"bankName\": \"SBI\"\n },\n \"currentAddress\": {\n \"addressPincode\": \"560080\",\n \"addressCity\": \"Banglore\",\n \"addressCountry\": \"India\",\n \"addressState\": \"Karnataka\",\n \"addressLine\": \"Sadashiva Nagar Armane Nagar\"\n },\n \"permanentAddress\": {\n \"addressPincode\": \"226001\",\n \"addressCity\": \"Luknow\",\n \"addressCountry\": \"India\",\n \"addressState\": \"Uttar Pradesh\",\n \"addressLine\": \"Yarana Nagar Luknow\"\n },\n \"jobLocation\": {\n \"pincode\": \"NOT AVAILABLE\",\n \"city\": \"NOT AVAILABLE\"\n },\n \"employeeMetadata\": {\n \"marriageDate\": \"NOT AVAILABLE\"\n },\n \"dependentDetails\": [\n {\n \"name\": \"Sohan Negi\",\n \"relation\": \"Father\",\n \"dob\": \"NOT AVAILABLE\",\n \"email\": \"NOT AVAILABLE\",\n \"gender\": \"NOT AVAILABLE\",\n \"mobileNumber\": \"NOT AVAILABLE\",\n \"profession\": \"NOT AVAILABLE\"\n }\n ],\n \"salaryDetails\": {\n \"ctc\": {\n \"basic\": 50000,\n \"dearnessAllowance\": 9000.9,\n \"hra\": 25000.5,\n \"gratuity\": 2000.7,\n \"medicalAllowance\": 2000.7,\n \"travelAllowance\": 2000.7,\n \"specialAllowance\": null,\n \"otherAllowance\": null,\n \"flexiBasketAllowance\": null,\n \"grossPay\": null,\n \"taxRegime\": null,\n \"fixedPay\": null,\n \"bonus\": {\n \"joining\": 80000,\n \"referral\": null,\n \"retention\": null,\n \"performance\": null,\n \"relocation\": null,\n \"misc\": null\n },\n \"deductions\": {\n \"pf\": 1800,\n \"esi\": null,\n \"professionalTax\": null,\n \"labourWelfareFund\": null,\n \"misc\": null,\n \"nps\": null\n }\n },\n \"monthly\": {\n \"month\": 2,\n \"year\": 2025,\n \"basic\": null,\n \"dearnessAllowance\": null,\n \"hra\": null,\n \"medicalAllowance\": null,\n \"travelAllowance\": null,\n \"specialAllowance\": null,\n \"flexiBasketAllowance\": null,\n \"gratuity\": 1600,\n \"otherAllowance\": null,\n \"taxRegime\": null,\n \"fixedPay\": null,\n \"grossPay\": null,\n \"bonus\": {\n \"joining\": 20000,\n \"referral\": null,\n \"retention\": null,\n \"performance\": null,\n \"relocation\": 28907.17,\n \"misc\": null\n },\n \"deductions\": {\n \"pf\": null,\n \"esi\": null,\n \"professionalTax\": 300,\n \"labourWelfareFund\": null,\n \"tds\": null,\n \"medicalClaimDeduction\": null,\n \"groupTermInsuranceDeductions\": null,\n \"earlyWageDeduction\": null,\n \"misc\": 162023.24,\n \"nps\": 1234.34\n },\n \"reimbursements\": 93321.33\n }\n }\n}"

response = http.request(request)
puts response.read_body

Body

application/json
id
string
Example:

"7"

employeeId
string
Example:

"5"

name
string
Example:

"Manas Mallik"

email
string<email> | null
Example:

"manas@tartanhq.com"

personalEmail
string<email> | null
Example:

"manas.mallik@gmail.com"

doj
string<date>
Example:

"2021-06-01"

dob
string<date> | null
Example:

"1983-06-08"

status
enum<string>
Available options:
Active,
Inactive,
Terminated
Example:

"Active"

employmentType
string | null
Example:

"Permanent"

gender
string
Example:

"Male"

pan
string | null

Masked PAN

Example:

"************"

aadhar
string | null

Masked Aadhaar

Example:

"************"

uan
string | null

Masked UAN

Example:

"************"

mobileNumber
string | null

Masked mobile number

Example:

"************"

maritalStatus
string | null
Example:

"Married"

nationality
string | null
Example:

"Indian"

fatherName
string | null
Example:

"Ritesh Mallik"

bloodGroup
string | null
Example:

"AB +ve"

designation
string
Example:

"NOT AVAILABLE"

department
string
Example:

"Engineering"

grade
string
Example:

"D-3"

groupName
string
Example:

"NOT AVAILABLE"

costCenter
string
Example:

"NOT AVAILABLE"

companyName
string
Example:

"NOT AVAILABLE"

terminationDate
string<date> | null
Example:

""

manager
string
Example:

"Meet Semlani"

managerEmail
string<email> | null
Example:

"NOT AVAILABLE"

managerEmail2
string<email> | null
Example:

"NOT AVAILABLE"

managerEmail3
string<email> | null
Example:

"NOT AVAILABLE"

managerEmail4
string<email> | null
Example:

"NOT AVAILABLE"

managerEmail5
string<email> | null
Example:

"NOT AVAILABLE"

countryCode
string
Example:

"IN"

bankDetails
object
currentAddress
object
permanentAddress
object
jobLocation
object
employeeMetadata
object
dependentDetails
object[]
salaryDetails
object

Response

Employee updated successfully