Subscribes to a feed of immutable, append-only updates for routes. The initial request to this feed endpoint returns a cursor, which can be used on the next request to fetch updated routes that have had state changes since that request.
The legacy version of this endpoint can be found at samsara.com/api-legacy.
Rate limit: 5 requests/sec (learn more about rate limits here).
To use this endpoint, select Read Routes under the Driver Workflow 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/fleet/routes/audit-logs/feed \
--header 'Authorization: Bearer <token>'{
"data": [
{
"changes": {
"after": {
"stops": [
{
"id": "141414",
"actualArrivalTime": "2006-01-02T15:04:05+07:00",
"actualDepartureTime": "2006-01-02T15:04:05+07:00",
"enRouteTime": "2006-01-02T15:04:05+07:00",
"eta": "2006-01-02T15:04:05+07:00",
"externalIds": {},
"liveSharingUrl": "https://cloud.samsara.com/fleet/viewer/job/fleet_viewer_token",
"scheduledArrivalTime": "2019-06-13T19:08:25Z",
"scheduledDepartureTime": "2019-06-13T19:08:25Z",
"skippedTime": "2006-01-02T15:04:05+07:00",
"state": "scheduled"
}
]
},
"before": {
"stops": [
{
"id": "141414",
"actualArrivalTime": "2006-01-02T15:04:05+07:00",
"actualDepartureTime": "2006-01-02T15:04:05+07:00",
"enRouteTime": "2006-01-02T15:04:05+07:00",
"eta": "2006-01-02T15:04:05+07:00",
"externalIds": {},
"liveSharingUrl": "https://cloud.samsara.com/fleet/viewer/job/fleet_viewer_token",
"scheduledArrivalTime": "2019-06-13T19:08:25Z",
"scheduledDepartureTime": "2019-06-13T19:08:25Z",
"skippedTime": "2006-01-02T15:04:05+07:00",
"state": "scheduled"
}
]
}
},
"route": {
"id": "342341",
"actualRouteEndTime": "2019-06-13T19:08:25Z",
"actualRouteStartTime": "2019-06-13T19:08:25Z",
"driver": {
"id": "45646",
"externalIds": {},
"name": "Driver Bob"
},
"externalIds": {},
"name": "Bid 123",
"notes": "These are my notes",
"orgLocalTimezone": "America/Los_Angeles",
"recurringRouteLiveSharingLinks": [
{
"liveSharingUrl": "https://cloud.samsara.com/o/123456/fleet/viewer/address/gEAitEnnOwcv92cuPzcU",
"name": "Name",
"expiresAtTime": "2020-01-27T07:06:25Z"
}
],
"scheduledRouteEndTime": "2019-06-13T19:08:25Z",
"scheduledRouteStartTime": "2019-06-13T19:08:25Z",
"settings": {
"routeCompletionCondition": "arriveLastStop",
"routeStartingCondition": "departFirstStop",
"sequencingMethod": "scheduledArrivalTime"
},
"stops": [
{
"id": "324231",
"name": "Stop #1",
"state": "scheduled",
"actualArrivalTime": "2006-01-02T15:04:05+07:00",
"actualDepartureTime": "2006-01-02T15:04:05+07:00",
"actualDistanceMeters": 5450,
"address": {
"id": "494123",
"name": "Company Office #1",
"externalIds": {}
},
"documents": [
{
"id": "494123",
"name": "Fuel Receipt Wichita"
}
],
"enRouteTime": "2006-01-02T15:04:05+07:00",
"eta": "2006-01-02T15:04:05+07:00",
"externalIds": {},
"forms": [
{
"id": "41234"
}
],
"issues": [
{
"id": "32812"
}
],
"liveSharingUrl": "https://cloud.samsara.com/fleet/viewer/job/fleet_viewer_token",
"locationLiveSharingLinks": [
{
"liveSharingUrl": "https://cloud.samsara.com/o/123456/fleet/viewer/address/gEAitEnnOwcv92cuPzcU",
"name": "Name",
"expiresAtTime": "2020-01-27T07:06:25Z"
}
],
"notes": "These are my notes",
"ontimeWindowAfterArrivalMs": 300000,
"ontimeWindowBeforeArrivalMs": 300000,
"plannedDistanceMeters": 5200,
"scheduledArrivalTime": "2019-06-13T19:08:25Z",
"scheduledDepartureTime": "2019-06-13T19:08:25Z",
"sequenceNumber": 10,
"singleUseLocation": {
"latitude": 123.456,
"longitude": 37.459,
"address": "1234 Main St, San Jose, CA",
"radiusMeters": 100
},
"skippedTime": "2006-01-02T15:04:05+07:00"
}
],
"tagIds": [
"123",
"321"
],
"vehicle": {
"externalIds": {},
"id": "494123",
"name": "Fleet Truck #1"
}
},
"source": "automatic",
"time": "2020-01-27T07:06:25Z",
"type": "route tracking",
"operation": "stop skipped"
}
],
"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.
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.
Expands the specified value(s) in the response object. Expansion populates additional fields in an object, if supported. Unsupported fields are ignored. To expand multiple fields, input a comma-separated list.
Valid value: route Valid values: route
route curl --request GET \
--url https://api.samsara.com/fleet/routes/audit-logs/feed \
--header 'Authorization: Bearer <token>'{
"data": [
{
"changes": {
"after": {
"stops": [
{
"id": "141414",
"actualArrivalTime": "2006-01-02T15:04:05+07:00",
"actualDepartureTime": "2006-01-02T15:04:05+07:00",
"enRouteTime": "2006-01-02T15:04:05+07:00",
"eta": "2006-01-02T15:04:05+07:00",
"externalIds": {},
"liveSharingUrl": "https://cloud.samsara.com/fleet/viewer/job/fleet_viewer_token",
"scheduledArrivalTime": "2019-06-13T19:08:25Z",
"scheduledDepartureTime": "2019-06-13T19:08:25Z",
"skippedTime": "2006-01-02T15:04:05+07:00",
"state": "scheduled"
}
]
},
"before": {
"stops": [
{
"id": "141414",
"actualArrivalTime": "2006-01-02T15:04:05+07:00",
"actualDepartureTime": "2006-01-02T15:04:05+07:00",
"enRouteTime": "2006-01-02T15:04:05+07:00",
"eta": "2006-01-02T15:04:05+07:00",
"externalIds": {},
"liveSharingUrl": "https://cloud.samsara.com/fleet/viewer/job/fleet_viewer_token",
"scheduledArrivalTime": "2019-06-13T19:08:25Z",
"scheduledDepartureTime": "2019-06-13T19:08:25Z",
"skippedTime": "2006-01-02T15:04:05+07:00",
"state": "scheduled"
}
]
}
},
"route": {
"id": "342341",
"actualRouteEndTime": "2019-06-13T19:08:25Z",
"actualRouteStartTime": "2019-06-13T19:08:25Z",
"driver": {
"id": "45646",
"externalIds": {},
"name": "Driver Bob"
},
"externalIds": {},
"name": "Bid 123",
"notes": "These are my notes",
"orgLocalTimezone": "America/Los_Angeles",
"recurringRouteLiveSharingLinks": [
{
"liveSharingUrl": "https://cloud.samsara.com/o/123456/fleet/viewer/address/gEAitEnnOwcv92cuPzcU",
"name": "Name",
"expiresAtTime": "2020-01-27T07:06:25Z"
}
],
"scheduledRouteEndTime": "2019-06-13T19:08:25Z",
"scheduledRouteStartTime": "2019-06-13T19:08:25Z",
"settings": {
"routeCompletionCondition": "arriveLastStop",
"routeStartingCondition": "departFirstStop",
"sequencingMethod": "scheduledArrivalTime"
},
"stops": [
{
"id": "324231",
"name": "Stop #1",
"state": "scheduled",
"actualArrivalTime": "2006-01-02T15:04:05+07:00",
"actualDepartureTime": "2006-01-02T15:04:05+07:00",
"actualDistanceMeters": 5450,
"address": {
"id": "494123",
"name": "Company Office #1",
"externalIds": {}
},
"documents": [
{
"id": "494123",
"name": "Fuel Receipt Wichita"
}
],
"enRouteTime": "2006-01-02T15:04:05+07:00",
"eta": "2006-01-02T15:04:05+07:00",
"externalIds": {},
"forms": [
{
"id": "41234"
}
],
"issues": [
{
"id": "32812"
}
],
"liveSharingUrl": "https://cloud.samsara.com/fleet/viewer/job/fleet_viewer_token",
"locationLiveSharingLinks": [
{
"liveSharingUrl": "https://cloud.samsara.com/o/123456/fleet/viewer/address/gEAitEnnOwcv92cuPzcU",
"name": "Name",
"expiresAtTime": "2020-01-27T07:06:25Z"
}
],
"notes": "These are my notes",
"ontimeWindowAfterArrivalMs": 300000,
"ontimeWindowBeforeArrivalMs": 300000,
"plannedDistanceMeters": 5200,
"scheduledArrivalTime": "2019-06-13T19:08:25Z",
"scheduledDepartureTime": "2019-06-13T19:08:25Z",
"sequenceNumber": 10,
"singleUseLocation": {
"latitude": 123.456,
"longitude": 37.459,
"address": "1234 Main St, San Jose, CA",
"radiusMeters": 100
},
"skippedTime": "2006-01-02T15:04:05+07:00"
}
],
"tagIds": [
"123",
"321"
],
"vehicle": {
"externalIds": {},
"id": "494123",
"name": "Fleet Truck #1"
}
},
"source": "automatic",
"time": "2020-01-27T07:06:25Z",
"type": "route tracking",
"operation": "stop skipped"
}
],
"pagination": {
"endCursor": "MjkY",
"hasNextPage": true
}
}