FleetWorkAPI Docs
Dashboard

Summary Stats

Get KPI summary cards comparing the current period to the previous period.

GET/api/v1/workspace/dashboard/summary-stats

The previous period covers the same duration shifted back by 1 day.

Query Parameters

ParameterRequiredTypeDescription
fromTimeRequiredlongStart of date range (Unix ms)
toTimeRequiredlongEnd of date range (Unix ms)

Example

Request

curl -X GET \
  "https://live.fleetwork.vn/api/v1/workspace/dashboard/summary-stats?fromTime=1713139200000&toTime=1713225600000" \
  -H "API-KEY: <your-key>"

Response

{
  "code": "OK",
  "message": null,
  "data": {
    "totalJobs": 42,
    "previousTotalJobs": 38,
    "totalJobsChangePercent": 10.53,
    "totalLocations": 156,
    "previousTotalLocations": 140,
    "totalLocationsChangePercent": 11.43,
    "latePercentage": 12,
    "previousLatePercentage": 18,
    "latePercentageChangePercent": -33.33,
    "onTimePercentage": 88,
    "previousOnTimePercentage": 82,
    "onTimePercentageChangePercent": 7.32,
    "averageLateTime": 14,
    "previousAverageLateTime": 22,
    "averageLateTimeChangePercent": -36.36,
    "totalDistance": 1840.5,
    "previousTotalDistance": 1620.0,
    "totalDistanceChangePercent": 13.61,
    "cancelledJobPercentage": 3,
    "previousCancelledJobPercentage": 5,
    "cancelledJobPercentageChangePercent": -40.0
  }
}

On this page