{
"opencollection": "1.0.0",
"info": {
"name": "Samsara Assignments API",
"version": "2024-11-18"
},
"request": {
"auth": {
"type": "bearer",
"token": "{{bearerToken}}"
}
},
"items": [
{
"info": {
"name": "Assignments",
"type": "folder"
},
"items": [
{
"info": {
"name": "Get Driver Coach Assignments.",
"type": "http"
},
"http": {
"method": "GET",
"url": "https://api.samsara.com/coaching/driver-coach-assignments",
"params": [
{
"name": "driverIds",
"value": "",
"type": "query",
"description": "Optional string of comma separated IDs of the drivers. This can be either a unique Samsara driver ID or an external ID for the driver."
},
{
"name": "coachIds",
"value": "",
"type": "query",
"description": "Optional string of comma separated IDs of the coaches."
},
{
"name": "includeExternalIds",
"value": "",
"type": "query",
"description": "Optional boolean indicating whether to return external IDs on supported entities"
},
{
"name": "after",
"value": "",
"type": "query",
"description": " 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."
}
]
},
"docs": "This endpoint will return coach assignments for your organization based on the parameters passed in. Results are paginated.\n\n Rate limit: 10 requests/sec (learn more about rate limits here).\n\nTo use this endpoint, select **Read Coaching** under the Coaching category when creating or editing an API token. Learn More"
},
{
"info": {
"name": "Put Driver Coach Assignments.",
"type": "http"
},
"http": {
"method": "PUT",
"url": "https://api.samsara.com/coaching/driver-coach-assignments",
"params": [
{
"name": "driverId",
"value": "",
"type": "query",
"description": "Required string ID of the driver. This is a unique Samsara ID of a driver."
},
{
"name": "coachId",
"value": "",
"type": "query",
"description": "Optional string ID of the coach. This is a unique Samsara user ID. If not provided, existing coach assignment will be removed."
}
]
},
"docs": "This endpoint will update an existing or create a new coach-to-driver assignment for your organization based on the parameters passed in. This endpoint should only be used for existing Coach to Driver assignments. In order to remove a driver-coach-assignment for a given driver, set coachId to null\n\n Rate limit: 10 requests/sec (learn more about rate limits here).\n\nTo use this endpoint, select **Write Coaching** "
},
{
"info": {
"name": "Retrieve Assignments",
"type": "http"
},
"http": {
"method": "GET",
"url": "https://api.samsara.com/fleet/carrier-proposed-assignments",
"params": [
{
"name": "limit",
"value": "",
"type": "query",
"description": "The limit for how many objects will be in the response. Default and max for this value is 512 objects."
},
{
"name": "after",
"value": "",
"type": "query",
"description": "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."
},
{
"name": "driverIds",
"value": "",
"type": "query",
"description": "A filter on the data based on this comma-separated list of driver IDs and externalIds. Example: `driverIds=1234,5678,payroll:4841`"
},
{
"name": "activeTime",
"value": "",
"type": "query",
"description": "If specified, shows assignments that will be active at this time. Defaults to now, which would show current active assignments. In RFC 3339 format. 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)."
}
]
},
"docs": "Show the assignments created by the POST fleet/carrier-proposed-assignments. This endpoint will only show the assignments that are active for drivers and currently visible to them in the driver app. Once a proposed assignment has been accepted, the endpoint will not return any data. \n\n **Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our API feedback form. If you encountered an issue or"
},
{
"info": {
"name": "Create an Assignment",
"type": "http"
},
"http": {
"method": "POST",
"url": "https://api.samsara.com/fleet/carrier-proposed-assignments",
"body": {
"type": "json",
"data": "{}"
}
},
"docs": "Creates a new assignment that a driver can later use. Each driver can only have one future assignment. \n\n **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.\n\nTo use this endpoint, select **"
},
{
"info": {
"name": "Delete an Assignment",
"type": "http"
},
"http": {
"method": "DELETE",
"url": "https://api.samsara.com/fleet/carrier-proposed-assignments/:id",
"params": [
{
"name": "id",
"value": "",
"type": "path",
"description": "ID of the assignment."
}
]
},
"docs": "Permanently delete an assignment. You can only delete assignments that are not yet active. To override a currently active assignment, create a new empty one, instead. \n\n **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 "
},
{
"info": {
"name": "Get All Driver-vehicle Assignments",
"type": "http"
},
"http": {
"method": "GET",
"url": "https://api.samsara.com/fleet/driver-vehicle-assignments",
"params": [
{
"name": "filterBy",
"value": "",
"type": "query",
"description": "Option to filter by drivers or vehicles. Valid values: `drivers`, `vehicles`"
},
{
"name": "startTime",
"value": "",
"type": "query",
"description": " 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)."
},
{
"name": "endTime",
"value": "",
"type": "query",
"description": " 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)."
},
{
"name": "driverIds",
"value": "",
"type": "query",
"description": " A filter on the data based on this comma-separated list of driver IDs and externalIds. Example: `driverIds=1234,5678,payroll:4841`"
},
{
"name": "vehicleIds",
"value": "",
"type": "query",
"description": "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\"."
},
{
"name": "driverTagIds",
"value": "",
"type": "query",
"description": " A filter on the data based on this comma-separated list of driver tag IDs. Example: `tagIds=1234,5678`"
},
{
"name": "vehicleTagIds",
"value": "",
"type": "query",
"description": " A filter on the data based on this comma-separated list of vehicle tag IDs. Example: `tagIds=1234,5678`"
},
{
"name": "after",
"value": "",
"type": "query",
"description": " 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."
},
{
"name": "assignmentType",
"value": "",
"type": "query",
"description": "Specifies which assignment type to filter by. Valid values: `HOS`, `idCard`, `static`, `faceId`, `tachograph`, `safetyManual`, `RFID`, `trailer`, `external`, `qrCode`"
}
]
},
"docs": "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](https://developers.samsara.com/docs/migrating-from-driver-vehicle-assignment-or-vehicle-driver-assignment-endpoints) for more information.\n\n Rate limit: 5 requ"
},
{
"info": {
"name": "Create a New Driver-vehicle Assignment",
"type": "http"
},
"http": {
"method": "POST",
"url": "https://api.samsara.com/fleet/driver-vehicle-assignments",
"body": {
"type": "json",
"data": "{}"
}
},
"docs": "Assign vehicle drive-time to a driver via API. For a step-by-step instruction on how to leverage this endpoint, see [this guide](https://developers.samsara.com/docs/creating-driver-vehicle-assignments)\n\n Rate limit: 100 requests/min (learn more about rate limits here).\n\nTo use this endpoint, select **Write Assignments** under the Assignments category when creating or editing an API token. Rate limit: 100 requests/min (learn more about rate limits here).\n\nTo use this endpoint, select **Write Assignments** under the Assignments category when creating or editing an API token. Rate limit: 100 requests/min (learn more about rate limits here).\n\nTo use this endpoint, select **Write Assignments** under the Assignments category when creating or editing an API token. Rate limit: 25 requests/sec (learn more about rate limits Rate limit: 5 requests/sec (learn more about rate limits Rate limit: 10 requests/sec (learn more about rate limits here).\n\nTo use this endpoint, select **Write Training Assignments** under the Closed Beta categ"
},
{
"info": {
"name": "[beta] Get a Stream of Filtered Training Assignments.",
"type": "http"
},
"http": {
"method": "GET",
"url": "https://api.samsara.com/training-assignments/stream",
"params": [
{
"name": "after",
"value": "",
"type": "query",
"description": " 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."
},
{
"name": "startTime",
"value": "",
"type": "query",
"description": " 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)."
},
{
"name": "endTime",
"value": "",
"type": "query",
"description": " 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)."
},
{
"name": "learnerIds",
"value": "",
"type": "query",
"description": "Optional string of comma separated learner IDs. If learner ID is present, training assignments for the specified learner(s) will be returned. Max value for this value is 100 objects. Example: `learnerIds=driver-281474,driver-46282156`"
},
{
"name": "courseIds",
"value": "",
"type": "query",
"description": "Optional string of comma separated course IDs. If course ID is present, training assignments for the specified course ID(s) will be returned. Max value for this value is 100 objects. Defaults to returning all courses. Example: `courseIds=a4db8702-79d5-4396-a717-e301d52ecc11,c6490f6a-d84e-49b5-b0ad-b6baae304075`"
},
{
"name": "status",
"value": "",
"type": "query",
"description": "Optional string of comma separated values. If status is present, training assignments for the specified status(s) will be returned. Valid values: \"notStarted\", \"inProgress\", \"completed\". Defaults to returning all courses."
}
]
},
"docs": "Returns all training assignments data that has been created or modified for your organization based on the time parameters passed in. Results are paginated and are sorted by last modified date. If you include an endTime, the endpoint will return data up until that point (exclusive). If you don't include an endTime, you can continue to poll the API real-time with the pagination cursor that gets returned on every call. \n\n**Beta:** This endpoint is in beta and is likely to change before being broad"
},
{
"info": {
"name": "List Trailer Assignments for a Given Trailer",
"type": "http"
},
"http": {
"method": "GET",
"url": "https://api.samsara.com/v1/fleet/trailers/:trailerId/assignments",
"params": [
{
"name": "trailerId",
"value": "",
"type": "path",
"description": "ID of trailer. Must contain only digits 0-9."
},
{
"name": "startMs",
"value": "",
"type": "query",
"description": "Timestamp in Unix epoch milliseconds representing the start of the period to fetch. Omitting both startMs and endMs only returns current assignments."
},
{
"name": "endMs",
"value": "",
"type": "query",
"description": "Timestamp in Unix epoch milliseconds representing the end of the period to fetch. Omitting endMs sets endMs as the current time"
}
]
},
"docs": "\n\n\nThis endpoint is still on our legacy API.\n\n\n\nFetch trailer assignment data for a single trailer. \n\n Rate limit: 100 requests/sec (learn more about rate limits here). \n\n **Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our API feedbac"
}
]
}
],
"bundled": true
}