const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.trackpilots.com/v1/settings/work-day', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"success": true,
"statusCode": 200,
"statusMessage": "Fetched work day settings successfully",
"error": null,
"data": [
[
{
"userId": "f0ad9ad9-d421-48dc-868d-9760e33e5089",
"userName": "Abirami Kannan",
"emailId": "abiramikannan2006@gmail.com",
"profilePicUrl": null,
"workDaySettings": {
"workDays": [
"monday",
"wednesday",
"thursday",
"friday",
"tuesday",
"saturday"
]
}
},
{
"userId": "b514fe51-df34-414e-8bec-9dcdd23cde23",
"userName": "Swetha Senthil",
"emailId": "senthilsundari2802@gmail.com",
"profilePicUrl": "https://trackpilots.s3.amazonaws.com/profile-pic/9b8090ae-e4c9-49ee-9dbf-62817262d05a.jpeg",
"workDaySettings": {
"workDays": [
"tuesday",
"thursday",
"friday",
"saturday",
"wednesday"
]
}
},
{
"userId": "ab7c4f30-1024-471a-a767-739df0dc53fd",
"userName": "Sakthivel Govinthan",
"emailId": "sakthiveltechit@gmail.com",
"profilePicUrl": "https://trackpilots.s3.amazonaws.com/profile-pic/9b8090ae-e4c9-49ee-9dbf-62817262d05a.png",
"workDaySettings": {
"workDays": [
"monday",
"tuesday",
"wednesday",
"thursday",
"friday"
]
}
}
]
]
}const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.trackpilots.com/v1/settings/work-day', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"success": true,
"statusCode": 200,
"statusMessage": "Fetched work day settings successfully",
"error": null,
"data": [
[
{
"userId": "f0ad9ad9-d421-48dc-868d-9760e33e5089",
"userName": "Abirami Kannan",
"emailId": "abiramikannan2006@gmail.com",
"profilePicUrl": null,
"workDaySettings": {
"workDays": [
"monday",
"wednesday",
"thursday",
"friday",
"tuesday",
"saturday"
]
}
},
{
"userId": "b514fe51-df34-414e-8bec-9dcdd23cde23",
"userName": "Swetha Senthil",
"emailId": "senthilsundari2802@gmail.com",
"profilePicUrl": "https://trackpilots.s3.amazonaws.com/profile-pic/9b8090ae-e4c9-49ee-9dbf-62817262d05a.jpeg",
"workDaySettings": {
"workDays": [
"tuesday",
"thursday",
"friday",
"saturday",
"wednesday"
]
}
},
{
"userId": "ab7c4f30-1024-471a-a767-739df0dc53fd",
"userName": "Sakthivel Govinthan",
"emailId": "sakthiveltechit@gmail.com",
"profilePicUrl": "https://trackpilots.s3.amazonaws.com/profile-pic/9b8090ae-e4c9-49ee-9dbf-62817262d05a.png",
"workDaySettings": {
"workDays": [
"monday",
"tuesday",
"wednesday",
"thursday",
"friday"
]
}
}
]
]
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.