Pre-aggregated numbers, built nightly, returned as raw numerics. This is the right surface for dashboards — far cheaper than deriving the same figures from position history.
All take from and to as YYYY-MM-DD unless noted.
7.1 Fleet headline
curl 'https://myfleet.sawatelematics.com/api/v2/analytics/statistics?from=2026-10-05&to=2026-10-07' \
-H 'Authorization: Bearer sk_live_…'
{ "total_vehicles": 917, "current_drivers": 206,
"total_mileage": "503372.03", "total_driving_time": "18799:38:48",
"total_fuel": "54308.11", "maintenance_cost": 20000 }
7.2 Status breakdown
curl 'https://myfleet.sawatelematics.com/api/v2/analytics/summary?from=…&to=…' \
-H 'Authorization: Bearer sk_live_…'
{ "statuses": [ { "label": "On Move", "data": 113, "color": "#4CB963" },
{ "label": "Idle", "data": 9, "color": "#F18F01" },
{ "label": "Parked", "data": 645, "color": "#4285F4" },
{ "label": "Offline", "data": 139, "color": "#D62839" } ],
"total": 917, "expenses": 164400, "total_drivers": 12 }
7.3 Today, without a date range
curl 'https://myfleet.sawatelematics.com/api/v2/analytics/today' \
-H 'Authorization: Bearer sk_live_…'
{ "status": 1, "date": "2026-10-07", "total_mileage": 17511.1,
"total_fuel": null, "drivers": 0, "violations": 499,
"active_vehicles": 572,
"top": [ { "device_id": 1035, "plate": "RAD 508Y", "mileage": 227.7 } ] }
7.4 Mileage, with a leaderboard
{ "top": [ { "device_id": 1239, "device_name": "RAJ 357L",
"mileage": 977.56, "fuel_consumption": 418.74,
"drive_duration": "29:31:00", "speed_avg": 36.82 } ],
"totals": { "mileage": 131997.39, … } }
7.5 Fuel
GET /api/v2/analytics/fuel_summary — a daily series:
{ "days": { "2026-10-05": { "fuel": 6957.86, "mileage": 64094.76 },
"2026-10-06": { "fuel": 6938.08, "mileage": 67902.63 } } }
| Endpoint | Returns |
|---|---|
GET /api/v2/analytics/fuel_metrics |
Fleet efficiency metrics |
GET /api/v2/analytics/fuel_metrics/{device_id} |
One vehicle |
GET /api/v2/analytics/fuel-events |
Fills and drains as events |
GET /api/v2/analytics/fuel-series |
Time series for charting |
GET /api/v2/analytics/fuel-reconciliation |
Issued vs consumed |
7.6 Driver scoring
curl 'https://myfleet.sawatelematics.com/api/v2/analytics/drivers-score?from=…&to=…' \
-H 'Authorization: Bearer sk_live_…'
{ "drivers": [
{ "driver_name": "Masabo Florent", "driver_id": 213,
"rfid": "762CFEF1CB419440", "device_id": 974, "device_name": "RAD 069U",
"total_distance": 521.73, "harsh_acceleration": 0, "harsh_braking": 0,
"harsh_turning": 0, "fines": 0, "average_score": 100 } ] }
| Endpoint | Returns |
|---|---|
GET /api/v2/analytics/drivers-score/{rfid} |
One driver, keyed by RFID |
GET /api/v2/analytics/drivers-ability-summary |
Aggregated ability |
GET /api/v2/analytics/drivers/{rfid}/vehicles-details |
Which vehicles that driver used |
GET /api/v2/analytics/vehicles/{device_id}/drivers-details |
Who drove that vehicle |
GET /api/v2/analytics/driver-custody |
Custody periods |
GET /api/v2/analytics/driver-fines |
Traffic fines per driver |
7.7 The rest of the v2 analytics surface
| Endpoint | Returns |
|---|---|
/api/v2/analytics/vehicles-activity |
Active vs dormant |
/api/v2/analytics/vehicle-types |
Fleet composition |
/api/v2/analytics/vehicle-history |
Per-vehicle history series |
/api/v2/analytics/utilization-heatmap |
Usage by hour and day |
/api/v2/analytics/mileage-series |
Mileage over time |
/api/v2/analytics/behaviour-series |
Driving behaviour over time |
/api/v2/analytics/harsh-events |
Harsh accel / brake / turn detail |
/api/v2/analytics/violations |
Violation counts |
/api/v2/analytics/trips |
Completed trips — see below |
/api/v2/analytics/stops |
Stops — requires device_id or device_ids[], max 25 vehicles |
/api/v2/analytics/geofence-summary |
Time and visits per geofence |
/api/v2/analytics/maintenance-metrics |
Maintenance cost and frequency |
/api/v2/analytics/maintenance-outlook |
What is coming due |
/api/v2/analytics/cost-per-km |
Cost per kilometre |
/api/v2/analytics/expenses-grouped |
Expenses by category |
/api/v2/analytics/fleet-health-series |
Fleet health over time |
/api/v2/analytics/energy, /ev-battery, /battery-capacity |
EV metrics |
/api/v2/analytics/custody-downtime |
Downtime between custodies |
/api/v2/analytics/kpi-targets, /kpi-targets/summary |
KPI targets and attainment |
/api/v2/analytics/performance-target-summary, /-compare, /target-history |
Performance targets |
/api/v2/analytics/cache-coverage |
How complete the nightly cache is |
GET /api/v2/analytics/trips returns completed trips with the driver attached —
the closest thing to a trip feed without running a report:
{ "status": 1, "items": [
{ "device_id": 1088, "plate": "RAD 291Z",
"driver_id": 188, "driver_name": "Sebatware J Bosco",
"start_time": "2026-10-06 23:57:28", "end_time": "2026-10-06 23:59:59",
"duration_s": 151, "distance_km": 1.03,
"speed_max": 31, "speed_avg": 19.4 } ] }
GET /api/v2/analytics/stops is per vehicle and refuses a fleet-wide call:
{ "status": 0,
"message": "Narrow to 25 vehicles or fewer with device_id / device_ids[] — stops are derived per vehicle" }
Pass device_ids[]=17&device_ids[]=22, batching in 25s.
7.8 Export
GET /api/v2/analytics/export/components → what can be exported
POST /api/v2/analytics/export → build an export
7.9 v1 analytics
/api/analytics/* still exists and returns near-identical data, plus url
fields pointing at the web UI:
{ "statuses": [ { "label": "On Move", "data": 118, "color": "#4CB963",
"url": "https://myfleet.sawatelematics.com/lookup/devices_move" } ],
"total": 917 }
| v1 | v2 equivalent |
|---|---|
/api/analytics/general_statistics |
/api/v2/analytics/summary |
/api/analytics/mileage |
/api/v2/analytics/mileage |
/api/analytics/fuel_summary |
/api/v2/analytics/fuel_summary |
/api/analytics/drivers_score |
/api/v2/analytics/drivers-score |
/api/analytics/alerts_summary |
/api/get_alerts_summary |
/api/analytics/maintenance |
/api/v2/analytics/maintenance-metrics |
Figures are nightly pre-aggregates. Today's numbers firm up after the night
run. /api/v2/analytics/cache-coverage tells you which days are built; if a
range looks low, check coverage before reporting a bug.