Skip to main content
GET
/
v1
/
fleet
/
trips
Get vehicle trips
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.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

vehicleId
integer<int64>
required

Vehicle ID to query.

startMs
integer<int64>
required

Beginning of the time range, specified in milliseconds UNIX time. Limited to a 90 day window with respect to startMs and endMs

endMs
integer<int64>
required

End of the time range, specified in milliseconds UNIX time.

Response

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.

trips
object[]