Retrieve vehicle location and trip data from a Samsara fleet for rental vehicle tracking

domain: developers.samsara.com · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Create a Samsara account and navigate to Settings > API Tokens to generate an API token with the appropriate read scopes (vehicles, locations, trips).
  2. Authenticate all requests by including the token as a Bearer token in the Authorization header.
  3. Call GET /fleet/vehicles to list all vehicles in the fleet; capture vehicle IDs for use in subsequent calls.
  4. Call GET /fleet/vehicles/locations with a vehicle ID or tag filter to retrieve real-time GPS positions, heading, and speed for vehicles of interest.
  5. Call GET /fleet/vehicles/stats with types set to fuelPercents or obdOdometerMeters to retrieve fuel level and odometer readings per vehicle.
  6. Call GET /fleet/trips with a vehicle ID and startMs/endMs time window to retrieve historical trip segments including distance, start/end addresses, and driver (if assigned).

Known gotchas

Related routes

Pull vehicle stats from the Samsara API
samsara.com · 6 steps · unrated
Retrieve vehicle locations and driver Hours of Service logs from the Samsara API
samsara.com · 5 steps · unrated
Share carrier-sourced Samsara ELD location data with a broker's track-and-trace system with driver consent
developers.samsara.com · 5 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans