Fetch Employees by User ID
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({userId: ['f0ad9ad9-d421-48dc-868d-9760e33e5089']})
};
fetch('https://api.trackpilots.com/v1/employees/filter', 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/filter \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"userId": [
"f0ad9ad9-d421-48dc-868d-9760e33e5089"
]
}
'import requests
url = "https://api.trackpilots.com/v1/employees/filter"
payload = { "userId": ["f0ad9ad9-d421-48dc-868d-9760e33e5089"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"statusCode": 200,
"statusMessage": "Fetched employee details successfully",
"error": null,
"data": [
{
"userId": "f0ad9ad9-d421-48dc-868d-9760e33e5089",
"userName": "Abirami Kannan",
"emailId": "abiramikannan2006@gmail.com",
"uniqueUrl": "6Vx3kEA8VU0q",
"profilePicUrl": null,
"teamId": [
{
"teamId": "c1e4416e-f57c-4614-886f-35a5541f4316",
"teamName": "Full Stack Developer"
},
{
"teamId": "a2b5416e-f57c-4614-886f-35a5541f4321",
"teamName": "Backend Team"
},
{
"teamId": "d9f4416e-f57c-4614-886f-35a5541f4399",
"teamName": "UI/UX Team"
}
],
"accountStatus": "active",
"roleId": "271e6693-2130-4ea9-b02d-e6d57516186d",
"roleName": "No Access",
"workMode": "hybrid"
}
]
}Manage Employees
Fetch Employees by User ID
Returns user details for the given list of user IDs.
POST
/
v1
/
employees
/
filter
Fetch Employees by User ID
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({userId: ['f0ad9ad9-d421-48dc-868d-9760e33e5089']})
};
fetch('https://api.trackpilots.com/v1/employees/filter', 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/filter \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"userId": [
"f0ad9ad9-d421-48dc-868d-9760e33e5089"
]
}
'import requests
url = "https://api.trackpilots.com/v1/employees/filter"
payload = { "userId": ["f0ad9ad9-d421-48dc-868d-9760e33e5089"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"statusCode": 200,
"statusMessage": "Fetched employee details successfully",
"error": null,
"data": [
{
"userId": "f0ad9ad9-d421-48dc-868d-9760e33e5089",
"userName": "Abirami Kannan",
"emailId": "abiramikannan2006@gmail.com",
"uniqueUrl": "6Vx3kEA8VU0q",
"profilePicUrl": null,
"teamId": [
{
"teamId": "c1e4416e-f57c-4614-886f-35a5541f4316",
"teamName": "Full Stack Developer"
},
{
"teamId": "a2b5416e-f57c-4614-886f-35a5541f4321",
"teamName": "Backend Team"
},
{
"teamId": "d9f4416e-f57c-4614-886f-35a5541f4399",
"teamName": "UI/UX Team"
}
],
"accountStatus": "active",
"roleId": "271e6693-2130-4ea9-b02d-e6d57516186d",
"roleName": "No Access",
"workMode": "hybrid"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
List of user IDs to fetch
Minimum array length:
1