This endpoint will return trips that have been collected for your organization based on the time parameters passed in. Results are paginated.
Rate limit: 5 requests/sec (learn more about rate limits here).
To use this endpoint, select Read Trips under the Trips category when creating or editing an API token. Learn More.
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.
curl --request GET \
--url https://api.samsara.com/trips/stream \
--header 'Authorization: Bearer <token>'{
"data": [
{
"asset": {
"id": "12345",
"name": "MyAsset-1234",
"type": "trailer",
"vin": "1GBJ6P1B2HV112765"
},
"completionStatus": "completed",
"createdAtTime": "2024-04-16T19:08:25Z",
"startLocation": {
"headingDegrees": 120,
"latitude": 37.7749,
"longitude": 137.2719,
"accuracyMeters": 5.801,
"address": {
"city": "New York",
"country": "USA",
"neighborhood": "Mission District",
"pointOfInterest": "The Eiffel Tower",
"postalCode": "10010",
"state": "New York",
"street": "Main Street",
"streetNumber": "16"
},
"geofence": {
"externalIds": {},
"id": "12345"
}
},
"tripStartTime": "2024-04-16T19:08:25Z",
"updatedAtTime": "2024-04-16T19:08:25Z",
"endLocation": {
"headingDegrees": 120,
"latitude": 37.7749,
"longitude": 137.2719,
"accuracyMeters": 5.801,
"address": {
"city": "New York",
"country": "USA",
"neighborhood": "Mission District",
"pointOfInterest": "The Eiffel Tower",
"postalCode": "10010",
"state": "New York",
"street": "Main Street",
"streetNumber": "16"
},
"geofence": {
"externalIds": {},
"id": "12345"
}
},
"tripEndTime": "2024-04-16T20:00:00Z"
}
],
"pagination": {
"endCursor": "MjkY",
"hasNextPage": true
}
}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.
Indicates whether or not to return expanded “asset” data
Filters trips based on a specific completion status Valid values: inProgress, completed, all
inProgress, completed, all RFC 3339 timestamp that indicates when to begin receiving data. Value is compared against updatedAtTime or tripStartTime depending on the queryBy parameter.
RFC 3339 timestamp which is compared against updatedAtTime or tripStartTime depending on the queryBy parameter. If not provided then the endpoint behaves as an unending feed of changes.
Decide which timestamp the startTime and endTime are compared to. Valid values: updatedAtTime, tripStartTime
updatedAtTime, tripStartTime If specified, this should be the endCursor value from the previous page of results. When present, this request will return the next page of results that occur immediately after the previous page of results.
Comma-separated list of asset IDs. Include up to 50 asset IDs.
curl --request GET \
--url https://api.samsara.com/trips/stream \
--header 'Authorization: Bearer <token>'{
"data": [
{
"asset": {
"id": "12345",
"name": "MyAsset-1234",
"type": "trailer",
"vin": "1GBJ6P1B2HV112765"
},
"completionStatus": "completed",
"createdAtTime": "2024-04-16T19:08:25Z",
"startLocation": {
"headingDegrees": 120,
"latitude": 37.7749,
"longitude": 137.2719,
"accuracyMeters": 5.801,
"address": {
"city": "New York",
"country": "USA",
"neighborhood": "Mission District",
"pointOfInterest": "The Eiffel Tower",
"postalCode": "10010",
"state": "New York",
"street": "Main Street",
"streetNumber": "16"
},
"geofence": {
"externalIds": {},
"id": "12345"
}
},
"tripStartTime": "2024-04-16T19:08:25Z",
"updatedAtTime": "2024-04-16T19:08:25Z",
"endLocation": {
"headingDegrees": 120,
"latitude": 37.7749,
"longitude": 137.2719,
"accuracyMeters": 5.801,
"address": {
"city": "New York",
"country": "USA",
"neighborhood": "Mission District",
"pointOfInterest": "The Eiffel Tower",
"postalCode": "10010",
"state": "New York",
"street": "Main Street",
"streetNumber": "16"
},
"geofence": {
"externalIds": {},
"id": "12345"
}
},
"tripEndTime": "2024-04-16T20:00:00Z"
}
],
"pagination": {
"endCursor": "MjkY",
"hasNextPage": true
}
}