Skip to main content
POST
/
v1
/
dashboard
/
weekly-summary
Fetch Weekly Summary
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: JSON.stringify({
    startDate: '2026-02-08 00:00:00',
    endDate: '2026-02-08 23:59:59',
    timeZone: 'Asia/Kolkata',
    userId: ['ab7c4f30-1024-471a-a767-739df0dc53fd'],
    teamId: []
  })
};

fetch('https://api.trackpilots.com/v1/dashboard/weekly-summary', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "success": true,
  "statusCode": 200,
  "statusMessage": "Fetched weekly summary successfully",
  "error": null,
  "data": {
    "breakdownSummary": [
      {
        "date": "2026-02-02T00:00:00.000Z",
        "day": "Monday",
        "metrics": {
          "totalTimeSpendSeconds": 15895,
          "activeTimeSpendSeconds": 13432,
          "idleTimeSpendSeconds": 2463,
          "productiveTimeSpendSeconds": 8942,
          "neutralTimeSpendSeconds": 4490,
          "unproductiveTimeSpendSeconds": 0
        }
      }
    ],
    "overallSummary": {
      "totalActiveTimeSpendSeconds": 215363,
      "totalIdleTimeSpendSeconds": 19974,
      "totalTimeSpendSeconds": 235337,
      "totalProductiveTimeSpendSeconds": 155530,
      "totalNeutralTimeSpendSeconds": 56841,
      "totalUnproductiveTimeSpendSeconds": 2992
    }
  }
}

Authorizations

Authorization
string
header
required

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

Body

application/json

Either userId or teamId must be provided. Both cannot be empty.

startDate
string<date-time>
required
Example:

"2026-02-08 00:00:00"

endDate
string<date-time>
required
Example:

"2026-02-08 23:59:59"

timeZone
string
required

IANA timezone of the requester

Example:

"Asia/Kolkata"

userId
string<uuid>[]
required

List of user UUIDs to fetch screenshots for

teamId
string<uuid>[]

List of team UUIDs to fetch screenshots for

Example:
[]

Response

Fetched weekly summary successfully.

success
boolean
Example:

true

statusCode
integer
Example:

200

statusMessage
string
Example:

"Fetched weekly summary successfully"

error
object
Example:

null

data
object