Add Employee
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
userName: 'Jagatheesan M',
emailId: 'mjagatheesan.g@gmail.com',
password: 'Strong@123',
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 POST \
--url https://api.trackpilots.com/v1/employees \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"userName": "Jagatheesan M",
"emailId": "mjagatheesan.g@gmail.com",
"password": "Strong@123",
"roleId": "271e6693-2130-4ea9-b02d-e6d57516186d",
"teamId": [
"5f6fe61c-15c6-47b7-899d-dba99da2464c"
],
"workMode": "remote"
}
'import requests
url = "https://api.trackpilots.com/v1/employees"
payload = {
"userName": "Jagatheesan M",
"emailId": "mjagatheesan.g@gmail.com",
"password": "Strong@123",
"roleId": "271e6693-2130-4ea9-b02d-e6d57516186d",
"teamId": ["5f6fe61c-15c6-47b7-899d-dba99da2464c"],
"workMode": "remote"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"statusCode": 200,
"statusMessage": "User added successfully",
"error": null,
"response": {
"userName": "Jagatheesan M",
"emailId": "mjagatheesan.g@gmail.com",
"userId": "7f9a0d29-c3a3-419a-87f6-11c34948cf7e"
}
}Manage Employees
Add Employee
POST
/
v1
/
employees
Add Employee
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
userName: 'Jagatheesan M',
emailId: 'mjagatheesan.g@gmail.com',
password: 'Strong@123',
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 POST \
--url https://api.trackpilots.com/v1/employees \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"userName": "Jagatheesan M",
"emailId": "mjagatheesan.g@gmail.com",
"password": "Strong@123",
"roleId": "271e6693-2130-4ea9-b02d-e6d57516186d",
"teamId": [
"5f6fe61c-15c6-47b7-899d-dba99da2464c"
],
"workMode": "remote"
}
'import requests
url = "https://api.trackpilots.com/v1/employees"
payload = {
"userName": "Jagatheesan M",
"emailId": "mjagatheesan.g@gmail.com",
"password": "Strong@123",
"roleId": "271e6693-2130-4ea9-b02d-e6d57516186d",
"teamId": ["5f6fe61c-15c6-47b7-899d-dba99da2464c"],
"workMode": "remote"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"statusCode": 200,
"statusMessage": "User added successfully",
"error": null,
"response": {
"userName": "Jagatheesan M",
"emailId": "mjagatheesan.g@gmail.com",
"userId": "7f9a0d29-c3a3-419a-87f6-11c34948cf7e"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Required string length:
2 - 100Example:
"Jagatheesan M"
Example:
"mjagatheesan.g@gmail.com"
Must contain at least 1 uppercase letter, 1 lowercase letter, 1 number, and 1 special character.
Required string length:
8 - 128Pattern:
^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[^A-Za-z\d]).{8,128}$Example:
"Strong@123"
Example:
"271e6693-2130-4ea9-b02d-e6d57516186d"
Minimum array length:
1Example:
["5f6fe61c-15c6-47b7-899d-dba99da2464c"]
Available options:
remote, office, hybrid Example:
"remote"
