Three engines. Pick by what you need, not by which you find first.
| Engine | Scope | Date format | Best for |
|---|---|---|---|
new-reports (/api/v2/new-reports/) |
Per-vehicle or per-driver, you choose which | YYYY-MM-DD only |
23 modern report types |
consolidated-reports (/api/v2/consolidated-reports/) |
Whole fleet, no device list | date or datetime | 10 fleet-wide summaries |
legacy (/api/generate_report) |
Numeric type ids | see below | 66 historical types |
6.1 Discovering what is available
curl 'https://myfleet.sawatelematics.com/api/v2/report-types' \
-H 'Authorization: Bearer sk_live_…'
{ "status": 1, "items": [
{ "key": "trip_log", "title": "Trip Log", "subject": "device",
"group": "Fleet", "engine": "new-reports",
"endpoint": "v2/new-reports/trip_log/generate",
"params": { "date_from": "required", "date_to": "required",
"format": "required", "device_ids": "required" } } ] }
Each entry tells you its engine, its endpoint and its required parameters. max_devices and max_days give the
limits of Sensor Graph and Route Report (their device_ids rule still reads max:1, which the installed mobile app
uses to offer one vehicle). formats lists what the mobile app offers; export_formats adds xlsx, and
contracts lists the JSON contract versions.
Build against this list rather than hardcoding keys — it is generated from
the same table the server validates against.
6.2 new-reports — 23 types
| Key | Title | Group | Subject |
|---|---|---|---|
daily_summary |
Daily Vehicle Summary | Fleet | device |
trip_log |
Trip Log | Fleet | device |
vehicle_inspection |
Vehicle Inspection | Fleet | device |
geofence_compliance |
Geofence Compliance | Fleet | device |
events_alerts |
Events & Alerts Log | Fleet | device |
idle_duration |
Idle Duration | Fleet | device |
fleet_cost |
Fleet Cost Summary | Fleet | device |
odometer_service |
Odometer & Service Intervals | Fleet | device |
engine_hours |
Engine Hours | Fleet | device |
sensor_graph |
Sensor Graph | Fleet | device — up to 10 vehicles × 31 days, optional sensor_ids[] |
route_report |
Route Report | Fleet | device — up to 10 vehicles × 7 days |
service_status |
Service Status | Fleet | device — whole fleet if device_ids omitted; as of now |
dispatch_report |
Dispatch Report | Fleet | device — whole fleet if device_ids omitted |
vehicle_performance |
Vehicle Performance Score | Scores | device |
driver_performance |
Driver Performance Score | Scores | driver — driver_ids required |
speeding_events |
Speeding Events | Safety | device |
harsh_driving |
Harsh Driving Detail | Safety | device |
alcohol_events |
High Alcohol Events | Safety | device |
driver_hours |
Driver Hours | Drivers | driver — driver_ids required |
driver_trip_logbook |
Driver Trip Logbook | Drivers | driver — driver_ids required |
fuel_consumption |
Fuel Consumption | Fuel | device |
fuel_fillings |
Fuel Fillings | Fuel | device |
fuel_drain |
Fuel Drain | Fuel | device |
Request
curl -X POST 'https://myfleet.sawatelematics.com/api/v2/new-reports/trip_log/generate' \
-H 'Content-Type: application/json' \
-d '{ \
-H 'Authorization: Bearer sk_live_…'
"date_from": "2026-10-06",
"date_to": "2026-10-06",
"time_from": "00:00",
"time_to": "06:00",
"format": "json",
"device_ids": [17]
}'
| Parameter | Rule |
|---|---|
date_from, date_to |
YYYY-MM-DD. date_to must be ≥ date_from |
time_from, time_to |
Optional, HH:MM. Default 00:00 → 23:59:59 |
format |
json · pdf · xls · xlsx · html |
contract |
Optional. 2 returns JSON contract version 2 (§6.4b); omitted, version 1 |
device_ids |
Array, ≥ 1. sensor_graph and route_report take up to 10; service_status and dispatch_report may omit it |
driver_ids |
Array, ≥ 1 — required for the three driver-subject reports |
events |
harsh_driving only: 1 adds the events themselves (data.events). Up to 10 vehicles × 7 days |
status[] |
service_status only: OK, Due soon, Overdue, No odometer |
due_within_km, due_within_days |
service_status only: replace each service's own reminder lead for "Due soon" |
Days are the account's local days (Africa/Kigali): 2026-10-29 runs from 28 Oct 22:00 to 29 Oct 21:59:59 UTC.
Times in reports are local, and the date_from/date_to in the response carry the +02:00 offset. Cached days
before 29 Oct 2026 were recorded as UTC days and stay so.
Ranges reaching today are answered for up to 10 vehicles, with notice: "Includes today up to HH:MM.". With
more vehicles the report ends yesterday and says so in notice; a request for today alone is refused (422) with
the reason. Fleet (consolidated) reports end at the last complete night.
Form encoding works too: device_ids[]=17&device_ids[]=22.
The three driver reports reject a missing
driver_idsdeliberately. Running one across a whole fleet used to time out at HTTP 504 after scanning every vehicle's history.
6.2b What the new reports and options return (version 1)
Building a portal or a mobile app on these? Ask us for the report integration guide (layouts, flags, downloads, checklists). Version 1 shapes:
| Request | data |
|---|---|
service_status |
layout: table, columns Vehicle · Plate · Service · Basis · Last Done · Interval · Next Due · Remaining · Status · Current Reading; overdue first. note when vehicles have no service set up |
dispatch_report |
layout: table, columns Vehicle · Plate · Dispatch · Status · Driver · Planned Start · Actual Start · Planned End · Actual End · On Time · Planned Distance · Actual Distance · Stops Visited · Fuel At Start (L) · Fuel At End (L) · Fuel Used (L) · Expenses (RWF) · Expenses By Category · Schedule Score · Rules Score · Resource Score |
harsh_driving + events=1 |
as before, plus events: { columns: [Time, Type, Speed, Location], sections: [ { header, device_id, rows } ] } |
fuel_consumption |
five columns appended: Level At Start (L) · Level At End (L) · Fillings · Filled (L) · Drained (L) |
sensor_graph |
chart_data[] panels gain device_id, plate, model, sensor, figures { min, max, avg, first, last, points } |
route_report |
routes[] trips gain device_id, plate, model |
odometer_service |
Service and Status appended; one row per service |
fleet_cost |
Pending Expenses and Unpaid Fines appended |
consolidated vehicle_utilisation / maintenance_due |
Stop Time / Service appended |
Every change is appended at the end; no version 1 column moved (the installed mobile app reads them by position).
6.3 consolidated-reports — 10 fleet-wide types
No device_ids — these always cover the whole fleet, read the nightly cache, list only vehicles with something to
report, and end at the last complete night. Options may be sent flat (threshold=80) or nested
(parameters[threshold]=80); the default overspeed threshold is 80 km/h. format also takes xlsx, and
contract=2 returns version 2 with layout: "summary".
| Key | Title |
|---|---|
fuel_fillings |
Fuel Fillings |
fuel_drain |
Fuel Drain |
driver_comparison |
Driver Comparison |
maintenance_due |
Maintenance Due |
vehicle_utilisation |
Vehicle Utilisation |
overspeed_summary |
Overspeed Summary |
fleet_safety |
Fleet Safety Summary |
idle_ranking |
Idle Time Ranking |
dormant_vehicles |
Dormant Vehicles |
alcohol_events |
High Alcohol Events |
curl -X POST 'https://myfleet.sawatelematics.com/api/v2/consolidated-reports/overspeed_summary/generate' \
-H 'Content-Type: application/json' \
-d '{"date_from":"2026-10-06","date_to":"2026-10-06","format":"json"}' \
-H 'Authorization: Bearer sk_live_…'
6.4 The JSON response envelope
Identical across both v2 engines:
{
"status": 1,
"type": "daily_summary",
"report_title": "Daily Vehicle Summary",
"date_from": "2026-10-06T00:00:00+02:00",
"date_to": "2026-10-06T23:59:59+02:00",
"generated_at": "2026-10-07 09:09",
"data": { "layout": "…", "columns": [ … ], … },
"notice": "Includes today up to 11:00."
}
date_from/date_to are the account's local day (Africa/Kigali) with its offset; generated_at is local time.
notice appears only when there is something to say (today included, or the period shortened).
data.layout decides the rest, and there are two shapes:
layout: "table" — one flat grid. rows are arrays positionally
matching columns:
{ "layout": "table",
"columns": ["Rank","Vehicle","Plate","Idle Time","Drive Time","Idle %"],
"rows": [ [1,"RAJ 086E","RAJ 086E","08:09:11","03:56:32","67.4%"] ] }
layout: "sections" — grouped, usually one section per vehicle:
{ "layout": "sections",
"columns": ["Vehicle","Plate","Distance","Drive Time","Max Speed","Trips"],
"sections": [ { "header": …, "rows": [
["FAW","RAA 000A","105.91 Km","03:22:53","65 kph",8] ] } ] }
Rows are positional arrays, not objects. Zip them against
columns. The column set differs per report type and can change when a report gains a field, so index by column name, never by a hardcoded offset.Values are pre-formatted strings —
"105.91 Km","03:22:53","65 kph","67.4%". If you need numbers, either parse them or use the analytics endpoints in §7, which return raw numerics.
6.4b JSON contract version 2
How to draw it is in the report integration guide, available on request. Send contract=2 (with format=json) on either v2 engine. Version 1 above stays unchanged for existing clients;
version 2 carries the same figures, typed:
{ "status": 1, "contract": 2,
"report": { "key": "daily_summary", "title": "Daily Vehicle Summary",
"period": { "from": "2026-10-26T00:00:00+02:00", "to": "2026-10-27T23:59:59+02:00", "timezone": "Africa/Kigali" },
"generated_at": "2026-10-29T16:19:00+02:00", "selection": { "vehicles": 2, "days": 2 },
"layout": "totals", "brand": { "name": "Sawa Telematics" } },
"columns": [ { "key": "distance", "label": "Distance", "type": "number", "unit": "km", "total": "sum" },
{ "key": "drive_time", "label": "Drive Time", "type": "duration", "total": "sum" } ],
"kpis": [ { "key": "distance", "label": "Distance", "value": 860.8, "type": "number", "unit": "km" } ],
"summary": { "rows": [ { "vehicle": { "id": 1001, "plate": "RAK462A", "model": "LEVIN", "name": null },
"values": { "days_active": 2, "distance": 475.89, "drive_time": 69248 } } ],
"totals": { "distance": 860.8 } },
"groups": [ { "vehicle": { … }, "rows": [ { "date": "2026-10-26", "activity": true, "values": { … } } ],
"totals": { … }, "flags": [ { "row": "2026-10-26", "column": "engine_on_time",
"reason": "engine on for less time than the vehicle drove" } ] } ] }
| Field | Meaning |
|---|---|
columns[].type |
number · duration (seconds) · datetime (ISO 8601, local offset) · date · driver ({id,name,rfid}) · string |
columns[].total |
sum, max or null (averages, ratios, levels, readings) |
report.layout |
totals (rows are days, inactive days included as activity: false) · events (rows are events; days[] subtotals) · summary (fleet reports) · visual (Sensor Graph, Route Report: trips or sensor figures as rows, the series and paths in visual) |
summary |
One row per vehicle (or driver) with its totals, and the fleet total. null for a single vehicle |
flags |
Figures to check (design P7): engine-on below drive time; over 24 h in a day; fuel above 3× the vehicle's 30-day median; odometer vs GPS off by > 20 %; a fill below the vehicle's minimum; fuel that doesn't balance by > 5 % of the tank; harsh events far above the other vehicles |
events |
harsh_driving with events=1: its own columns and groups |
Totals reports (Fuel Consumption, Idle Duration, Engine Hours, Vehicle Performance, Harsh Driving) carry one row per day when every day is in the nightly cache; otherwise their groups hold the period only.
6.5 The other formats
format |
Response |
|---|---|
json |
The envelope above, or contract version 2 with contract=2 |
pdf |
Content-Type: application/pdf: logo, key figures, fleet summary, a section per vehicle with day subtotals and flagged figures. Charts and maps print their figures and trips; the drawing is in html |
xlsx |
Branded workbook — Summary (logo, title block, fleet table), Detail (one flat table: Plate, Model, Date, then numbers with formats; frozen header, filter), About (period, flags). File name Sawa_<Report-Title>_<from>_<to>.xlsx |
xls |
The older Excel file, unchanged (the mobile app names its download after the format) |
html |
A rendered fragment |
Request them the same way and stream the body to a file.
6.6 Scheduled report delivery
The platform can build and email reports on a schedule instead of you polling.
| Method | Path | Purpose |
|---|---|---|
GET |
/api/report-schedules |
List schedules |
POST |
/api/report-schedules |
Create |
PUT |
/api/report-schedules/{id} |
Update |
POST |
/api/report-schedules/{id}/toggle |
Enable / disable |
DELETE |
/api/report-schedules/{id} |
Remove |
POST |
/api/v2/new-reports/{key}/email |
Send one now, by email |
POST |
/api/v2/consolidated-reports/{key}/email |
Same, consolidated engine |
Existing schedules are visible through GET /api/get_reports, which also
exposes daily, weekly, monthly, the send time and the destination address.
6.6b Custom reports — /api/v2/custom-reports
The user picks attributes (distance, consumption, harsh events, overspeeding at a limit, fuel fillings and drains,
fuel levels, activity, engine hours, max speed, odometer), vehicles (or all_devices) and up to 31 days, today
included. The report runs in the background, one
vehicle at a time, and can be stopped, resumed, cancelled, saved, re-run, previewed (contract v2) and downloaded
(pdf, xlsx). One running report per user; unsaved runs are deleted after 7 days.
GET attributes · POST estimate · POST / · GET / |
Picker · size and warnings · create and start · the user's reports |
GET {id} · GET {id}/vehicles |
State and progress · per-vehicle status |
POST {id}/pause · resume · cancel · save · rerun |
|
GET {id}/preview · GET {id}/download?format=pdf|xlsx · DELETE {id} |
Listed in GET /api/v2/report-types under custom (not in items, which the installed mobile app reads).
A full custom reports guide is available on request.
6.6c Fleet insights — /api/v2/insights
A weekly (Monday–Sunday, from Monday 07:00 Kigali) and a monthly (calendar month, from the 1st 08:00) insight for
every manager and user with a vehicle, built from the nightly cache with the reports' rules and stored as a snapshot.
The email (with its PDF), the apps and the console all render the stored snapshot. Built on the report runners
(queue insights); emailed only while the console's "Fleet insights" email type is on.
GET latest · GET /?frequency=&page= |
Cards: the newest insights · history, newest first |
GET {id}?via=fleet|analytics|mobile · GET {id}/pdf |
One insight (the owner's first open is recorded) · its PDF |
GET preferences · PUT preferences |
Weekly / monthly / email / push switches, up to 5 extra recipients |
Console (/api/v2/console/insights, staff; writes admin only and audited): GET summary, runs, runs/{id},
deliveries, deliveries/{id}, users/{id}; POST deliveries/{id}/resend, runs/{id}/retry-failed, runs.
A full insights guide is available on request.
6.7 Legacy engine — 66 types
Still live, still supported. Discover with:
curl 'https://myfleet.sawatelematics.com/api/get_reports_types' \
-H 'Authorization: Bearer sk_live_…'
{ "status": 1, "items": [
{ "type": 1, "name": "General information",
"formats": ["html","json","xls","pdf","pdf_land"],
"fields": ["devices","metas","speed_limit","stops"] } ] }
Types are numeric ids, and fields lists which extra parameters that type
accepts. A sample:
type |
Name |
|---|---|
| 1 | General information |
| 2 | General information (merged) |
| 3 | Drives and stops |
| 18 | Drives and stops / Geofences |
| 19 | Drives and stops / Drivers |
| 41 | Drives and stops simplified |
| 72 | Drive time |
Flow: POST /api/add_report to define one, POST /api/generate_report to run
it, GET /api/get_reports to list, POST /api/destroy_report to remove.
For new integrations use the v2 engines. The legacy types exist for report shapes v2 does not cover yet.