This endpoint is still on our legacy API.
Fetch trailer assignment data for all trailers in your organization.
Rate limit: 25 requests/sec (learn more about rate limits here).
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.
To use this endpoint, select Read Assignments under the Assignments category when creating or editing an API token. Learn More.
curl --request GET \
--url https://api.samsara.com/v1/fleet/trailers/assignments \
--header 'Authorization: Bearer <token>'{
"pagination": {
"endCursor": "MTU5MTEzNjA2OTU0MzQ3",
"hasNextPage": true,
"hasPrevPage": true,
"startCursor": "MTU5MTEzNjA2OTU0MzQ3"
},
"trailers": [
{
"id": 2041,
"name": "myTrailer",
"trailerAssignments": [
{
"driverId": 2047,
"endMs": 1462881998034,
"startMs": 1462878398034
}
]
}
]
}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.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Timestamp in Unix epoch miliseconds representing the start of the period to fetch. Omitting both startMs and endMs only returns current assignments.
Timestamp in Unix epoch miliseconds representing the end of the period to fetch. Omitting endMs sets endMs as the current time
Pagination parameter indicating the number of results to return in this request. Used in conjunction with either 'startingAfter' or 'endingBefore'.
Pagination parameter indicating the cursor position to continue returning results after. Used in conjunction with the 'limit' parameter. Mutually exclusive with 'endingBefore' parameter.
Pagination parameter indicating the cursor position to return results before. Used in conjunction with the 'limit' parameter. Mutually exclusive with 'startingAfter' parameter.
curl --request GET \
--url https://api.samsara.com/v1/fleet/trailers/assignments \
--header 'Authorization: Bearer <token>'{
"pagination": {
"endCursor": "MTU5MTEzNjA2OTU0MzQ3",
"hasNextPage": true,
"hasPrevPage": true,
"startCursor": "MTU5MTEzNjA2OTU0MzQ3"
},
"trailers": [
{
"id": 2041,
"name": "myTrailer",
"trailerAssignments": [
{
"driverId": 2047,
"endMs": 1462881998034,
"startMs": 1462878398034
}
]
}
]
}