Get all driver-vehicle assignments

Get all driver-vehicle assignments for the requested drivers or vehicles in the requested time range. To fetch driver-vehicle assignments out of the vehicle trips' time ranges, assignmentType needs to be specified. Note: this endpoint replaces past endpoints to fetch assignments by driver or by vehicle. Visit this migration guide for more information.

Rate limit: 5 requests/sec (learn more about rate limits here).

To use this endpoint, select Read Assignments under the Assignments 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.

Query Params
string
enum
required

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

Allowed:
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).

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
array of strings

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

driverIds
vehicleIds
array of strings

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".

vehicleIds
string

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

string

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

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.

string
enum

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

Responses

Language
Credentials
Bearer
URL
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json