# Fleet Analytics API

The analytics controller exposes several fleet-related endpoints for dashboard widgets.

## Endpoints

- `GET /api/analytics/upcomingServices` – next service date per vehicle and service type.
- `GET /api/analytics/fitnessExpiries` – upcoming vehicle fitness expiry dates.
- `GET /api/analytics/kilometresDriven` – total kilometres travelled for each vehicle.
- `GET /api/analytics/vehicleCosts` – sum of service and repair costs by vehicle.
- `GET /api/analytics/downtimeSummary` – accumulated downtime days per vehicle.

All endpoints return JSON arrays that can be exported using the `?export=` query parameter (`csv`, `pdf` or `xlsx`).
