Locations
Retrieve the most recent location for a vehicle by unit ID
Retrieves the most recent vehicle location for a given vehicle unit ID
get/v2/vehicles/locations/latest
Request
- Base URL: https://api.onswitchboard.com
- URL: https://api.onswitchboard.com/v2/vehicles/locations/latest
- Auth: API key in header x-api-id and API key in header x-api-key
Query parameters
unitIdstring required
The vehicle unit ID to retrieve the most recent location for
Response
Successfully retrieved the most recent location
Example response
{
"company": {
"name": "Example Company"
},
"location": {
"objectId": "2ntvSpRGIK",
"id": "2ntvSpRGIK",
"city": "Vancouver",
"country": "CA",
"stateProvince": "BC",
"longitude": -123.123,
"latitude": 49.123,
"dateTime": "2020-01-01T00:00:00.000Z",
"drivers": [
{
"id": "2ntvSpRGIK"
}
],
"odometerReadingKm": 160424.12,
"engineHours": 1204.1,
"speedKm": 84,
"vehicleSerial": "563062023431345",
"vehicleVIN": "JTLKE50E581048963",
"vehicleUnitId": "TRUCK001"
}
}Changes
No recorded changes to this operation across all 1 revision of this API.