Skip to main content
GET
/
v1
/
fleet
/
assets
/
{asset_id}
/
locations
List historical locations for a given asset
curl --request GET \
  --url https://api.samsara.com/v1/fleet/assets/{asset_id}/locations \
  --header 'Authorization: Bearer <token>'
[
  {
    "latitude": 37,
    "location": "525 York, San Francisco, CA",
    "longitude": -122.7,
    "speedMilesPerHour": 35,
    "time": 12314151
  }
]

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.

Path Parameters

asset_id
integer<int64>
required

ID of the asset. Must contain only digits 0-9.

Query Parameters

startMs
integer<int64>
required

Timestamp in milliseconds representing the start of the period to fetch, inclusive. Used in combination with endMs.

endMs
integer<int64>
required

Timestamp in milliseconds representing the end of the period to fetch, inclusive. Used in combination with startMs.

Response

Asset location details.

latitude
number

The latitude of the location in degrees.

Example:

37

location
string

The best effort (street,city,state) for the latitude and longitude.

Example:

"525 York, San Francisco, CA"

longitude
number

The longitude of the location in degrees.

Example:

-122.7

speedMilesPerHour
number

The speed calculated from GPS that the asset was traveling at in miles per hour.

Example:

35

time
number

Time in Unix milliseconds since epoch when the asset was at the location.

Example:

12314151