メインコンテンツまでスキップ

Vehicle Mileage Report

The Vehicle Mileage Report provides a detailed calculation of the distance travelled by vehicles based on their GPS breadcrumbs.

Overview

This report is designed to give an accurate account of vehicle usage by aggregating the distance covered between GPS updates. Unlike estimated distances based on planned routes, this report relies on the actual GPS data transmitted by the vehicle, offering a precise reflection of movement on the ground.

Why is it important?

For planners and fleet managers, accurate mileage tracking is crucial for:

  • Cost Management: verifying fuel consumption and driver payments based on actual distance driven.
  • Maintenance: Scheduling vehicle maintenance based on real usage.
  • Audit & Compliance: ensuring vehicles are operating within authorized areas and distances.

Report Generation

The Vehicle Mileage Report is generated automatically by the system.

  • Trigger: The report generation is triggered approximately 5 minutes after the simulation ends.
  • Frequency: The report is generated once per simulation.

Retrieving the Report

You can retrieve the vehicle mileage report using the standard microservices get endpoint.

Endpoint

GET /api/v2/microservices/get

Parameters

ParameterTypeDescription
modelstringMust be set to vehiclemileagereport.
vehicleintegerThe ID of the vehicle to retrieve the report for.

Example Request

curl -X GET "https://sgerp.d.gcprod.swatrider.com/api/v2/microservices/get?model=vehiclemileagereport&vehicle=1738497" \
-H "Authorization: Basic <credentials>"

Example Response

{
"meta": {
"has_more": false,
"next": null,
"next_offset": null
},
"objects": [
{
"id": 1,
"created_at": "2025-11-04T14:05:00.931106+00:00",
"modified_at": "2025-11-04T14:05:00.931136+00:00",
"original_project_id": 121,
"type": "mileage",
"original_template_id": null,
"original_simulation_id": 124784,
"original_vehicle_id": 1738497,
"vehicle_service_number": "",
"vehicle_registration_number": null,
"vehicle_agent_id": "3d9771a8-0416-4e27-b3e8-b0963fa5dbb0",
"project_id": 121,
"template_id": null,
"report_id": 4,
"simulation_id": 124784,
"vehicle_id": 1738497,
"mileage_within_start_end_time": 0,
"mileage": 0,
"first_gps_ts": null,
"last_gps_ts": null
}
]
}

Field Descriptions

  • vehicle_id: The unique identifier of the vehicle.
  • mileage: Total mileage calculated from GPS breadcrumbs.
  • mileage_within_start_end_time: Mileage within the specific simulation or report window.
  • first_gps_ts / last_gps_ts: The timestamps of the first and last GPS points used for the calculation.