This endpoint is still on our legacy API.
Get historical trips data for specified vehicle. This method returns a set of historical trips data for the specified vehicle in the specified time range.
Submit Feedback: Likes, dislikes, and API feature requests should be filed as feedback in our API feedback form. If you encountered an issue or noticed inaccuracies in the API documentation, please submit a case to our support team.
To use this endpoint, select Read Vehicle Trips under the Vehicles category when creating or editing an API token. Learn More.
curl --request GET \
--url https://api.samsara.com/v1/fleet/trips \
--header 'Authorization: Bearer <token>'{
"trips": [
{
"assetIds": [
122
],
"codriverIds": [
122
],
"distanceMeters": 2500,
"driverId": 719,
"endAddress": {
"address": "123 Main St, Sunnyvale, CA 94089",
"id": 581,
"name": "Ramen Tatsunoya"
},
"endCoordinates": {
"latitude": 23.413702345,
"longitude": -91.502888123
},
"endLocation": "571 S Lake Ave, Pasadena, CA 91101",
"endMs": 1462881998034,
"endOdometer": 210430500,
"fuelConsumedMl": 75700,
"startAddress": {
"address": "123 Main St, Sunnyvale, CA 94089",
"id": 581,
"name": "Ramen Tatsunoya"
},
"startCoordinates": {
"latitude": 29.443702345,
"longitude": -98.502888123
},
"startLocation": "16 N Fair Oaks Ave, Pasadena, CA 91103",
"startMs": 1462878398034,
"startOdometer": 210430450,
"tollMeters": 32000
}
]
}Documentation Index
Fetch the complete documentation index at: https://samsara-showcase.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Vehicle ID to query.
Beginning of the time range, specified in milliseconds UNIX time. Limited to a 90 day window with respect to startMs and endMs
End of the time range, specified in milliseconds UNIX time.
List of trips taken by the requested vehicle within the specified timeframe. Ongoing trips will be returned with 9223372036854775807 as their endMs.
Contains the trips for the vehicle in the requested timeframe. A trip is represented as an object that contains startMs, startLocation, startAddress, startCoordinates, endMs, endLocation, endAddress and endCoordinates. Ongoing trips will be returned with 9223372036854775807 as their endMs.
Show child attributes
curl --request GET \
--url https://api.samsara.com/v1/fleet/trips \
--header 'Authorization: Bearer <token>'{
"trips": [
{
"assetIds": [
122
],
"codriverIds": [
122
],
"distanceMeters": 2500,
"driverId": 719,
"endAddress": {
"address": "123 Main St, Sunnyvale, CA 94089",
"id": 581,
"name": "Ramen Tatsunoya"
},
"endCoordinates": {
"latitude": 23.413702345,
"longitude": -91.502888123
},
"endLocation": "571 S Lake Ave, Pasadena, CA 91101",
"endMs": 1462881998034,
"endOdometer": 210430500,
"fuelConsumedMl": 75700,
"startAddress": {
"address": "123 Main St, Sunnyvale, CA 94089",
"id": 581,
"name": "Ramen Tatsunoya"
},
"startCoordinates": {
"latitude": 29.443702345,
"longitude": -98.502888123
},
"startLocation": "16 N Fair Oaks Ave, Pasadena, CA 91103",
"startMs": 1462878398034,
"startOdometer": 210430450,
"tollMeters": 32000
}
]
}