Skip to main content
PATCH
/
fleet
/
dvirs
/
{id}
Resolve a DVIR
curl --request PATCH \
  --url https://api.samsara.com/fleet/dvirs/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "authorId": "11",
  "isResolved": true,
  "mechanicNotes": "Replaced headlight on passenger side.",
  "signedAtTime": "2020-01-27T07:06:25Z"
}
'
{
  "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.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

ID of the DVIR.

Body

application/json

The dvir fields to update.

Information about resolving a DVIR.

authorId
string
required

The user who is resolving the dvir.

Example:

"11"

isResolved
boolean
required

Resolves the DVIR. Must be true.

mechanicNotes
string

The mechanics notes on the DVIR.

Example:

"Replaced headlight on passenger side."

signedAtTime
string

Time when user signed this DVIR. Defaults to now. UTC timestamp in RFC 3339 format. Example: 2020-01-27T07:06:25Z.

Example:

"2020-01-27T07:06:25Z"

Response

Updated dvir object with ID.

The DVIR response.

data
object

Information about a DVIR.