Creates a new mechanic DVIR in the organization.
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 Write DVIRs under the Maintenance category when creating or editing an API token. Learn More.
curl --request POST \
--url https://api.samsara.com/fleet/dvirs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"authorId": "11",
"safetyStatus": "safe",
"type": "mechanic",
"licensePlate": "XHK1234",
"location": "350 Rhode Island St Ste. 400S, San Francisco, CA 94103",
"mechanicNotes": "Replaced headlight on passenger side.",
"odometerMeters": 14010293,
"resolvedDefectIds": [
"<string>"
],
"trailerId": "11",
"vehicleId": "10"
}
'{
"data": {
"id": "7107471",
"authorSignature": {
"signatoryUser": {
"id": "88668",
"name": "Susan Bob"
},
"signedAtTime": "2020-01-27T07:06:25Z",
"type": "driver"
},
"endTime": "2020-01-27T07:06:25Z",
"licensePlate": "XHK1234",
"location": "350 Rhode Island St Ste. 400S, San Francisco, CA 94103",
"mechanicNotes": "Replaced headlight on passenger side.",
"odometerMeters": 14010293,
"safetyStatus": "unsafe",
"secondSignature": {
"signatoryUser": {
"id": "88668",
"name": "Susan Bob"
},
"signedAtTime": "2020-01-27T07:06:25Z",
"type": "driver"
},
"startTime": "2020-01-27T07:06:25Z",
"thirdSignature": {
"signatoryUser": {
"id": "88668",
"name": "Susan Bob"
},
"signedAtTime": "2020-01-27T07:06:25Z",
"type": "driver"
},
"trailer": {
"id": "123456789",
"name": "Midwest Trailer #5"
},
"trailerDefects": [
{
"id": "18",
"isResolved": true,
"comment": "Air Compressor not working",
"createdAtTime": "2020-01-27T07:06:25Z",
"defectType": "Air Compressor",
"mechanicNotes": "Extremely large oddly shaped hole in passenger side window.",
"mechanicNotesUpdatedAtTime": "2020-01-27T07:06:25Z",
"resolvedAtTime": "2020-01-27T07:06:25Z",
"resolvedBy": {
"id": "11",
"name": "Christopher 'The Handyman' Zhen",
"type": "driver"
},
"trailer": {
"id": "123456789",
"name": "Midwest Trailer #5"
},
"vehicle": {
"ExternalIds": {
"maintenanceId": "250020",
"payrollId": "ABFS18600"
},
"id": "123456789",
"name": "Midwest Truck #4"
}
}
],
"trailerName": "Midwest Trailer #5",
"type": "preTrip",
"vehicle": {
"ExternalIds": {
"maintenanceId": "250020",
"payrollId": "ABFS18600"
},
"id": "123456789",
"name": "Midwest Truck #4"
},
"vehicleDefects": [
{
"id": "18",
"isResolved": true,
"comment": "Air Compressor not working",
"createdAtTime": "2020-01-27T07:06:25Z",
"defectType": "Air Compressor",
"mechanicNotes": "Extremely large oddly shaped hole in passenger side window.",
"mechanicNotesUpdatedAtTime": "2020-01-27T07:06:25Z",
"resolvedAtTime": "2020-01-27T07:06:25Z",
"resolvedBy": {
"id": "11",
"name": "Christopher 'The Handyman' Zhen",
"type": "driver"
},
"trailer": {
"id": "123456789",
"name": "Midwest Trailer #5"
},
"vehicle": {
"ExternalIds": {
"maintenanceId": "250020",
"payrollId": "ABFS18600"
},
"id": "123456789",
"name": "Midwest Truck #4"
}
}
]
}
}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.
The DVIR to create.
DVIR creation body
Samsara user ID of the mechanic creating the DVIR.
"11"
Whether or not this vehicle or trailer is safe to drive.
safe, unsafe "safe"
Only type 'mechanic' is currently accepted.
mechanic "mechanic"
The license plate of this vehicle.
12"XHK1234"
Optional string if your jurisdiction requires a location of the DVIR.
"350 Rhode Island St Ste. 400S, San Francisco, CA 94103"
The mechanics notes on the DVIR.
"Replaced headlight on passenger side."
The odometer reading in meters.
14010293
Array of ids for defects being resolved with this DVIR.
Id of trailer being inspected. Either vehicleId or trailerId must be provided.
"11"
Id of vehicle being inspected. Either vehicleId or trailerId must be provided.
"10"
Newly created DVIR.
The DVIR response.
Information about a DVIR.
Show child attributes
curl --request POST \
--url https://api.samsara.com/fleet/dvirs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"authorId": "11",
"safetyStatus": "safe",
"type": "mechanic",
"licensePlate": "XHK1234",
"location": "350 Rhode Island St Ste. 400S, San Francisco, CA 94103",
"mechanicNotes": "Replaced headlight on passenger side.",
"odometerMeters": 14010293,
"resolvedDefectIds": [
"<string>"
],
"trailerId": "11",
"vehicleId": "10"
}
'{
"data": {
"id": "7107471",
"authorSignature": {
"signatoryUser": {
"id": "88668",
"name": "Susan Bob"
},
"signedAtTime": "2020-01-27T07:06:25Z",
"type": "driver"
},
"endTime": "2020-01-27T07:06:25Z",
"licensePlate": "XHK1234",
"location": "350 Rhode Island St Ste. 400S, San Francisco, CA 94103",
"mechanicNotes": "Replaced headlight on passenger side.",
"odometerMeters": 14010293,
"safetyStatus": "unsafe",
"secondSignature": {
"signatoryUser": {
"id": "88668",
"name": "Susan Bob"
},
"signedAtTime": "2020-01-27T07:06:25Z",
"type": "driver"
},
"startTime": "2020-01-27T07:06:25Z",
"thirdSignature": {
"signatoryUser": {
"id": "88668",
"name": "Susan Bob"
},
"signedAtTime": "2020-01-27T07:06:25Z",
"type": "driver"
},
"trailer": {
"id": "123456789",
"name": "Midwest Trailer #5"
},
"trailerDefects": [
{
"id": "18",
"isResolved": true,
"comment": "Air Compressor not working",
"createdAtTime": "2020-01-27T07:06:25Z",
"defectType": "Air Compressor",
"mechanicNotes": "Extremely large oddly shaped hole in passenger side window.",
"mechanicNotesUpdatedAtTime": "2020-01-27T07:06:25Z",
"resolvedAtTime": "2020-01-27T07:06:25Z",
"resolvedBy": {
"id": "11",
"name": "Christopher 'The Handyman' Zhen",
"type": "driver"
},
"trailer": {
"id": "123456789",
"name": "Midwest Trailer #5"
},
"vehicle": {
"ExternalIds": {
"maintenanceId": "250020",
"payrollId": "ABFS18600"
},
"id": "123456789",
"name": "Midwest Truck #4"
}
}
],
"trailerName": "Midwest Trailer #5",
"type": "preTrip",
"vehicle": {
"ExternalIds": {
"maintenanceId": "250020",
"payrollId": "ABFS18600"
},
"id": "123456789",
"name": "Midwest Truck #4"
},
"vehicleDefects": [
{
"id": "18",
"isResolved": true,
"comment": "Air Compressor not working",
"createdAtTime": "2020-01-27T07:06:25Z",
"defectType": "Air Compressor",
"mechanicNotes": "Extremely large oddly shaped hole in passenger side window.",
"mechanicNotesUpdatedAtTime": "2020-01-27T07:06:25Z",
"resolvedAtTime": "2020-01-27T07:06:25Z",
"resolvedBy": {
"id": "11",
"name": "Christopher 'The Handyman' Zhen",
"type": "driver"
},
"trailer": {
"id": "123456789",
"name": "Midwest Trailer #5"
},
"vehicle": {
"ExternalIds": {
"maintenanceId": "250020",
"payrollId": "ABFS18600"
},
"id": "123456789",
"name": "Midwest Truck #4"
}
}
]
}
}