Update Expected Work Hours Settings
const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
userId: '8126cc3e-ca66-4c02-83f5-06273452120d',
workHourSettings: {
expectedWorkMinutesPerDay: 430,
expectedProductiveWorkMinutesPerDay: 360,
expectedInTime: '08:00 am'
}
})
};
fetch('https://api.trackpilots.com/v1/settings/expected-work-hours', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PATCH \
--url https://api.trackpilots.com/v1/settings/expected-work-hours \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"userId": "8126cc3e-ca66-4c02-83f5-06273452120d",
"workHourSettings": {
"expectedWorkMinutesPerDay": 430,
"expectedProductiveWorkMinutesPerDay": 360,
"expectedInTime": "08:00 am"
}
}
'import requests
url = "https://api.trackpilots.com/v1/settings/expected-work-hours"
payload = {
"userId": "8126cc3e-ca66-4c02-83f5-06273452120d",
"workHourSettings": {
"expectedWorkMinutesPerDay": 430,
"expectedProductiveWorkMinutesPerDay": 360,
"expectedInTime": "08:00 am"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"success": true,
"statusCode": 200,
"statusMessage": "Expected work hours settings updated successfully",
"error": null,
"data": {
"userID": "8126cc3e-ca66-4c02-83f5-06273452120d",
"workHourSettings": {
"expectedWorkMinutesPerDay": 480,
"expectedProductiveWorkMinutesPerDay": 360,
"expectedInTime": "10:30 am"
}
}
}Settings
Update Expected Work Hours Settings
PATCH
/
v1
/
settings
/
expected-work-hours
Update Expected Work Hours Settings
const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
userId: '8126cc3e-ca66-4c02-83f5-06273452120d',
workHourSettings: {
expectedWorkMinutesPerDay: 430,
expectedProductiveWorkMinutesPerDay: 360,
expectedInTime: '08:00 am'
}
})
};
fetch('https://api.trackpilots.com/v1/settings/expected-work-hours', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PATCH \
--url https://api.trackpilots.com/v1/settings/expected-work-hours \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"userId": "8126cc3e-ca66-4c02-83f5-06273452120d",
"workHourSettings": {
"expectedWorkMinutesPerDay": 430,
"expectedProductiveWorkMinutesPerDay": 360,
"expectedInTime": "08:00 am"
}
}
'import requests
url = "https://api.trackpilots.com/v1/settings/expected-work-hours"
payload = {
"userId": "8126cc3e-ca66-4c02-83f5-06273452120d",
"workHourSettings": {
"expectedWorkMinutesPerDay": 430,
"expectedProductiveWorkMinutesPerDay": 360,
"expectedInTime": "08:00 am"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"success": true,
"statusCode": 200,
"statusMessage": "Expected work hours settings updated successfully",
"error": null,
"data": {
"userID": "8126cc3e-ca66-4c02-83f5-06273452120d",
"workHourSettings": {
"expectedWorkMinutesPerDay": 480,
"expectedProductiveWorkMinutesPerDay": 360,
"expectedInTime": "10:30 am"
}
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
