Authenticate to the Samsara API using an API token with the appropriate vehicle read scopes for your organization
Make an initial call to the vehicle stats feed endpoint to retrieve the most recent stats snapshot for all vehicles and capture the endCursor returned in the response
On subsequent calls, pass the endCursor as a query parameter to retrieve only new or updated stat records since the last call, implementing an efficient polling loop
Select the specific stat types you need (for example, GPS location, engine state, odometer, fuel percent) by specifying them in the types parameter to limit response payload size
Process each vehicle stat record, extracting the vehicle ID, stat type, value, and time fields, and write to your telemetry store with idempotent upsert logic keyed on vehicle ID and timestamp
Tune your polling interval based on the data freshness requirements of your use case while respecting Samsara API rate limits documented in the developer portal
Known gotchas
The vehicle stats feed uses cursor-based pagination rather than time-range queries; do not use time parameters to try to backfill missed data — use the cursor pattern consistently to avoid gaps or duplicates
Not all stat types are available for all vehicles; vehicles with older Samsara hardware gateways may not report all stat categories — handle missing stat types gracefully in your data pipeline
Samsara API rate limits apply per organization token; if you are polling multiple stat types across a large fleet, stagger requests or use the batch stat endpoint to avoid hitting rate ceilings
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp