List the latest location of the vehicles in the connected account.
GET
/
vehicles
/
locations
Copy
curl--request GET \--url https://api.withterminal.com/tsp/v1/vehicles/locations \--header'Authorization: Bearer <token>'\--header'Connection-Token: <connection-token>'
Copy
{"results":[{"provider":"geotab","vehicle":"vcl_01D8ZQFGHVJ858NBF2Q7DV9MNC","driver":"drv_01D8ZQFGHVJ858NBF2Q7DV9MNC","locatedAt":"2021-01-06T03:24:53.000Z","location":{"longitude":-122.4194155,"latitude":37.7749295},"address":{"formatted":"1.5 miles from Austin, TX"},"heading":25,"speed":95.33,"odometer":100,"fuel":{"primaryPercentage":50,"secondaryPercentage":50},"raw":[]}],"next":"cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw"}
This endpoint will call the providerβs API in real time to get the latest location of the vehicle.
Please note: this endpoint will exclude vehicles that have no last known location.
curl--request GET \--url https://api.withterminal.com/tsp/v1/vehicles/locations \--header'Authorization: Bearer <token>'\--header'Connection-Token: <connection-token>'
Copy
{"results":[{"provider":"geotab","vehicle":"vcl_01D8ZQFGHVJ858NBF2Q7DV9MNC","driver":"drv_01D8ZQFGHVJ858NBF2Q7DV9MNC","locatedAt":"2021-01-06T03:24:53.000Z","location":{"longitude":-122.4194155,"latitude":37.7749295},"address":{"formatted":"1.5 miles from Austin, TX"},"heading":25,"speed":95.33,"odometer":100,"fuel":{"primaryPercentage":50,"secondaryPercentage":50},"raw":[]}],"next":"cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw"}