List the latest location of the vehicles in the connected account.
GET
/
vehicles
/
locations
curl--request GET \--url https://api.withterminal.com/tsp/v1/vehicles/locations \--header'Authorization: Bearer <token>'\--header'Connection-Token: <connection-token>'
{"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.
Raw data fetched from the source provider. Most of our endpoints support a raw query parameter that will append a list of the raw requests used to form our common model. This can be helpful for leveraging unique fields that are not part of our unified model.
curl--request GET \--url https://api.withterminal.com/tsp/v1/vehicles/locations \--header'Authorization: Bearer <token>'\--header'Connection-Token: <connection-token>'
{"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"}