Delete Employee
const options = {
method: 'DELETE',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({userId: 'c0296718-3538-461b-9045-e12d11a80605'})
};
fetch('https://api.trackpilots.com/v1/employees', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request DELETE \
--url https://api.trackpilots.com/v1/employees \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"userId": "c0296718-3538-461b-9045-e12d11a80605"
}
'import requests
url = "https://api.trackpilots.com/v1/employees"
payload = { "userId": "c0296718-3538-461b-9045-e12d11a80605" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text){
"success": true,
"statusCode": 200,
"statusMessage": "User deleted successfully",
"error": null,
"data": {
"userId": "c0296718-3538-461b-9045-e12d11a80605"
}
}Manage Employees
Delete Employee
Delete a user using userId provided in the request body.
DELETE
/
v1
/
employees
Delete Employee
const options = {
method: 'DELETE',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({userId: 'c0296718-3538-461b-9045-e12d11a80605'})
};
fetch('https://api.trackpilots.com/v1/employees', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request DELETE \
--url https://api.trackpilots.com/v1/employees \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"userId": "c0296718-3538-461b-9045-e12d11a80605"
}
'import requests
url = "https://api.trackpilots.com/v1/employees"
payload = { "userId": "c0296718-3538-461b-9045-e12d11a80605" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text){
"success": true,
"statusCode": 200,
"statusMessage": "User deleted successfully",
"error": null,
"data": {
"userId": "c0296718-3538-461b-9045-e12d11a80605"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Unique ID of the user to delete
