Skip to main content
GET
/
v1
/
settings
/
expected-work-hours
Fetch Expected Work Hours Settings
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

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));
{ "success": true, "statusCode": 200, "statusMessage": "Fetched expected work day settings successfully", "error": null, "data": [ { "userId": "f0ad9ad9-d421-48dc-868d-9760e33e5089", "userName": "Abirami Kannan", "emailId": "abiramikannan2006@gmail.com", "profilePicUrl": null, "workHourSettings": { "expectedWorkMinutesPerDay": 480, "expectedProductiveWorkMinutesPerDay": 360, "expectedInTime": "12:30 am" } }, { "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", "workHourSettings": { "expectedWorkMinutesPerDay": 480, "expectedProductiveWorkMinutesPerDay": 360, "expectedInTime": "12:30 am" } }, { "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", "workHourSettings": { "expectedWorkMinutesPerDay": 480, "expectedProductiveWorkMinutesPerDay": 360, "expectedInTime": "12:30 am" } } ] }

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Response

Fetched expected work hours settings successfully

success
boolean
Example:

true

statusCode
integer
Example:

200

statusMessage
string
Example:

"Fetched expected work day settings successfully"

error
object
Example:

null

data
object[]
Example:
[
  {
    "userId": "f0ad9ad9-d421-48dc-868d-9760e33e5089",
    "userName": "Abirami Kannan",
    "emailId": "abiramikannan2006@gmail.com",
    "profilePicUrl": null,
    "workHourSettings": {
      "expectedWorkMinutesPerDay": 480,
      "expectedProductiveWorkMinutesPerDay": 360,
      "expectedInTime": "12:30 am"
    }
  },
  {
    "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",
    "workHourSettings": {
      "expectedWorkMinutesPerDay": 480,
      "expectedProductiveWorkMinutesPerDay": 360,
      "expectedInTime": "12:30 am"
    }
  },
  {
    "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",
    "workHourSettings": {
      "expectedWorkMinutesPerDay": 480,
      "expectedProductiveWorkMinutesPerDay": 360,
      "expectedInTime": "12:30 am"
    }
  }
]