Skip to main content
GET
/
fleet
/
driver-vehicle-assignments
Get all driver-vehicle assignments
curl --request GET \
  --url https://api.samsara.com/fleet/driver-vehicle-assignments \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "driver": {
        "id": "45646",
        "externalIds": {},
        "name": "Driver Bob"
      },
      "isPassenger": true,
      "startTime": "2019-06-13T19:08:25Z",
      "vehicle": {
        "externalIds": {},
        "id": "494123",
        "name": "Fleet Truck #1"
      },
      "assignedAtTime": "2019-06-13T19:08:25Z",
      "assignmentType": "idCard",
      "endTime": "2019-06-13T19:08:25Z",
      "metadata": {
        "sourceName": "ExternalSourceName"
      }
    }
  ],
  "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.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

filterBy
enum<string>
required

Option to filter by drivers or vehicles. Valid values: drivers, vehicles

Available options:
drivers,
vehicles
startTime
string

A start time in RFC 3339 format. Defaults to now if not provided. Millisecond precision and timezones are supported. (Examples: 2019-06-13T19:08:25Z, 2019-06-13T19:08:25.455Z, OR 2015-09-15T14:00:12-04:00).

endTime
string

An end time in RFC 3339 format. Defaults to now if not provided. Millisecond precision and timezones are supported. (Examples: 2019-06-13T19:08:25Z, 2019-06-13T19:08:25.455Z, OR 2015-09-15T14:00:12-04:00).

driverIds
string[]

A filter on the data based on this comma-separated list of driver IDs and externalIds. Example: driverIds=1234,5678,payroll:4841

vehicleIds
string[]

ID of the vehicle. This can either be the Samsara-specified ID, or an external ID. External IDs are customer specified key-value pairs created in the POST or PATCH requests of this resource. To specify an external ID as part of a path parameter, use the following format: "key:value". For example, "maintenanceId:250020".

driverTagIds
string

A filter on the data based on this comma-separated list of driver tag IDs. Example: tagIds=1234,5678

vehicleTagIds
string

A filter on the data based on this comma-separated list of vehicle tag IDs. Example: tagIds=1234,5678

after
string

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.

assignmentType
enum<string>

Specifies which assignment type to filter by. Valid values: HOS, idCard, static, faceId, tachograph, safetyManual, RFID, trailer, external, qrCode, driverApp, voiceSignIn, smartAssign

Available options:
HOS,
idCard,
static,
faceId,
tachograph,
safetyManual,
RFID,
trailer,
external,
qrCode,
driverApp,
voiceSignIn,
smartAssign

Response

OK response.

data
object[]
required

List of driver assignment objects and their respective vehcile and driver info.

pagination
object
required

Pagination parameters.