REST API

Endpoint reference

All paths are relative to https://safartrack-backend.safartrak.com/api/v1/external. Authenticate every request as described in getting started.

Vehicles & live location

Current fleet state, live positions and the full route a vehicle drove.

Vehicles & live location endpoints
MethodPathWhat it returns
GET/vehiclesList vehicles with their current status. Filter with search, status, vehicleType, vehicleCategory and fleetGroup; paginate with page and limit.
GET/vehicles/summaryFleet status counts (moving, idle, stopped, offline) using the same filters as /vehicles.
GET/vehicles/{uniqueId}One vehicle's current details and latest reading.
GET/vehicles/{uniqueId}/route-historyRoute history for a vehicle. Use period (default today) or a from and to range; add snap to align the path to roads.
GET/locationsLive location feed for the vehicles in your account.

Temperature (cold chain)

Readings from compatible temperature sensors.

Temperature (cold chain) endpoints
MethodPathWhat it returns
GET/temperatureCurrent temperature status across sensor-equipped vehicles.
GET/temperature/{uniqueId}/historyTemperature history for one vehicle over a date range.

Alerts & driver events

Speeding, idling, geofence and other configured events.

Alerts & driver events endpoints
MethodPathWhat it returns
GET/alertsList alerts, newest first, with filters and pagination.
GET/alerts/countNumber of alerts matching your filters.
GET/alerts/summaryAlert totals grouped by type.
GET/alerts/typesThe alert types available for your account.
GET/alerts/exportDownload matching alerts as CSV.

Analytics & reports

Distance, performance and fleet-level reporting.

Analytics & reports endpoints
MethodPathWhat it returns
GET/analytics/summaryFleet analytics summary for the selected range.
GET/analytics/distance-seriesDistance travelled over time, for charts and BI tools.
GET/analytics/performanceVehicle performance metrics for the selected range.
GET/analytics/exportExport analytics as JSON.

Utilisation & vendors

Kilometre and hour utilisation by vehicle, vendor and city.

Utilisation & vendors endpoints
MethodPathWhat it returns
GET/utilisation/summaryUtilisation overview for a date range.
GET/utilisation/vehiclesPer-vehicle utilisation, filterable by city, vendor, vehicle type and utilisation band.
GET/utilisation/vendorsUtilisation grouped by vendor; /utilisation/vendors/{vendorId} for one vendor.
GET/utilisation/matrixUtilisation matrix for planning and comparison.
GET/utilisation/alertsUnder- and over-utilisation flags.
GET/utilisation/reuseReuse opportunities for under-used vehicles.

Trip schedules

Create, update and track planned trips and checkpoints.

Trip schedules endpoints
MethodPathWhat it returns
GET/trip-schedulesList trip schedules; /trip-schedules/summary for totals.
POST/trip-schedulesCreate a trip schedule with its checkpoints.
GET/trip-schedules/{tripId}One trip schedule and its progress.
PATCH/trip-schedules/{tripId}Update a trip schedule.
DELETE/trip-schedules/{tripId}Remove a trip schedule.
GET/trip-schedules/template-csvDownload the CSV template for bulk upload.
POST/trip-schedules/bulk-uploadUpload many trip schedules from a CSV file (multipart form).

Reference data

Lists you can use to build filters and forms.

Reference data endpoints
MethodPathWhat it returns
GET/vehicle-typesVehicle types in your account.
GET/vehicle-categoriesVehicle categories.
GET/fleet-groupsFleet groups.
GET/vendorsVendors; /vendors/cities for the cities they operate in.
GET/associated-clientsAssociated client accounts you can access.

Responses & errors

Every successful response includes success: true. Errors return success: false and a message:

{
  "success": false,
  "message": "Invalid API key or API secret."
}
HTTP status codes
StatusMeaning
200Success. The body contains success: true and the requested data.
401The API key or secret is missing or invalid.
403The credentials are valid but the account is inactive or cannot access this data.
404The vehicle, trip or other record was not found in your account.
5xxA temporary server problem. Retry with backoff, and contact 24/7 support if it continues.

Questions about the API or MCP? Email support@safartrak.com (24/7) or contact the team.