Update Employee
const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
userId: '271e6693-2130-4ea9-b02d-e6d57516186d',
userName: 'Jagatheesan M',
roleId: '271e6693-2130-4ea9-b02d-e6d57516186d',
teamId: ['5f6fe61c-15c6-47b7-899d-dba99da2464c'],
workMode: 'remote'
})
};
fetch('https://api.trackpilots.com/v1/employees', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PATCH \
--url https://api.trackpilots.com/v1/employees \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"userId": "271e6693-2130-4ea9-b02d-e6d57516186d",
"userName": "Jagatheesan M",
"roleId": "271e6693-2130-4ea9-b02d-e6d57516186d",
"teamId": [
"5f6fe61c-15c6-47b7-899d-dba99da2464c"
],
"workMode": "remote"
}
'import requests
url = "https://api.trackpilots.com/v1/employees"
payload = {
"userId": "271e6693-2130-4ea9-b02d-e6d57516186d",
"userName": "Jagatheesan M",
"roleId": "271e6693-2130-4ea9-b02d-e6d57516186d",
"teamId": ["5f6fe61c-15c6-47b7-899d-dba99da2464c"],
"workMode": "remote"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"success": true,
"statusCode": 200,
"statusMessage": "User details updated successfully",
"error": null,
"response": {
"userName": "Jagatheesan E",
"userId": "1269dd50-946d-4ce6-8428-dc258710e9af"
}
}Manage Employees
Update Employee
PATCH
/
v1
/
employees
Update Employee
const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
userId: '271e6693-2130-4ea9-b02d-e6d57516186d',
userName: 'Jagatheesan M',
roleId: '271e6693-2130-4ea9-b02d-e6d57516186d',
teamId: ['5f6fe61c-15c6-47b7-899d-dba99da2464c'],
workMode: 'remote'
})
};
fetch('https://api.trackpilots.com/v1/employees', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PATCH \
--url https://api.trackpilots.com/v1/employees \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"userId": "271e6693-2130-4ea9-b02d-e6d57516186d",
"userName": "Jagatheesan M",
"roleId": "271e6693-2130-4ea9-b02d-e6d57516186d",
"teamId": [
"5f6fe61c-15c6-47b7-899d-dba99da2464c"
],
"workMode": "remote"
}
'import requests
url = "https://api.trackpilots.com/v1/employees"
payload = {
"userId": "271e6693-2130-4ea9-b02d-e6d57516186d",
"userName": "Jagatheesan M",
"roleId": "271e6693-2130-4ea9-b02d-e6d57516186d",
"teamId": ["5f6fe61c-15c6-47b7-899d-dba99da2464c"],
"workMode": "remote"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"success": true,
"statusCode": 200,
"statusMessage": "User details updated successfully",
"error": null,
"response": {
"userName": "Jagatheesan E",
"userId": "1269dd50-946d-4ce6-8428-dc258710e9af"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Example:
"271e6693-2130-4ea9-b02d-e6d57516186d"
Required string length:
2 - 100Example:
"Jagatheesan M"
Example:
"271e6693-2130-4ea9-b02d-e6d57516186d"
Minimum array length:
1Example:
["5f6fe61c-15c6-47b7-899d-dba99da2464c"]
Available options:
remote, office, hybrid Example:
"remote"
