{
"opencollection": "1.0.0",
"info": {
"name": "Samsara Driver API",
"version": "2024-11-18"
},
"request": {
"auth": {
"type": "bearer",
"token": "{{bearerToken}}"
}
},
"items": [
{
"info": {
"name": "Driver",
"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": "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: 10 requests/sec (learn more about rate limits here).\n\nTo use this endpoint, select **Read Driver Efficiency** under the Closed Beta category when creating or editing an API token. Rate limit: 5 requests/sec (learn more about rate limits here).\n\nTo use this endpoint, select **Read Driver Efficiency** under the Closed Beta category when creating or editing an API token.