v1

latestOpenAPI 3.1.02026-07-2617501.1 MB

List all the vehicles and their locations (v2)

get/v2/vehicle_locations

Query parameters

vehicle_ids[]integer[]

Enter the id or the ids of the vehicle(s) for which you want to check the location. NOTE: The endpoint has a limit of 100 vehicles for fetching their locations.

vehicle_statusstring

Enter the status of the vehicle whose location you want to check. The status can be "active", or "deactivated".

per_pageinteger

Number of records to return per page.

page_nointeger

Denotes the current page number.

Headers

X-Time-Zonestring

Specify the timezone for formatting the timestamps.

X-Metric-Unitsboolean

Specify if you want to use the Metric units or the Imperial units. TRUE: Metric units. FALSE: Imperial Units

X-User-Idinteger

Specify the ID of the Fleet Admin or the Fleet Manager who is accessing this endpoint.

Response

200

Example response

{
  "vehicles": [
    {
      "vehicle": {
        "id": 23,
        "number": "V-1000",
        "fuel_type": "diesel",
        "current_location": {
          "id": "af5b6e0d-c442-414c-88d2-d95e5cb7affe",
          "lat": 47.565647,
          "lon": -122.276261,
          "description": "Seattle, WA",
          "located_at": "2016-03-17T12:12:07Z",
          "bearing": 90,
          "battery_voltage": 12,
          "type": "vehicle_moving",
          "speed": 65.1,
          "engine_hours": 123.56,
          "fuel": 121.33,
          "fuel_primary_remaining_percentage": 50.5,
          "fuel_secondary_remaining_percentage": 90.5,
          "odometer": 456.22,
          "true_odometer": 160.2742,
          "true_engine_hours": 38.5,
          "veh_range": 10.1,
          "hvb_state_of_charge": 20.2,
          "hvb_charge_source": 1,
          "hvb_lifetime_energy_output": 30.3
        },
        "current_driver": {
          "id": 104,
          "first_name": "Jensen",
          "last_name": "Effertz",
          "email": "6b6cf86e12d4@keeptruckin.com",
          "status": "deactivated",
          "role": "driver"
        }
      }
    }
  ],
  "pagination": {
    "per_page": 25,
    "page_no": 1,
    "total": 1
  }
}