Skip to main content

MyGeotab API support request to update DVIR defect status from external system

AIlun-8235
Original Poster

Hello Geotab Support Team,

We are integrating an external fleet management system with Geotab. We can read DVIR defect data, but we are unable to update the defect status in Geotab.

Our goal is to push updates such as repaired or closed defects (stored in our internal system) into Geotab.

We need confirmation on the following points:

What is the correct object to update DVIR defects, DVIRLog or DVIRDefect

What is the required API payload to update repairStatusType, repairDateTime, repairUser and repair notes

Are there any required permissions or workflow constraints

Do you have a working API example for updating a DVIR defect

We want to ensure proper synchronization between our system and Geotab for defect lifecycle management.

Thank you for your support.

Join the conversation

You need to be logged in to reply to this post and participate in the Geotab Community discussions.

Top Answers

EishiFUN
Geotabber

Hey @AIlun-8235​ ,

 

 Great questions! I used an AI to help get this answer. Please let me know if you run into any issues with this or have any follow up questions!

                                         

 Use DVIRLog — DVIRDefect isn't directly writable via the API. It's a child object nested inside DVIRLog, so the workflow is:

 

 1. Get the DVIRLog by ID — the response includes the DVIRDefects array with each defect's current state

 2. Locate the specific DVIRDefect you want to update

 3. Set the repair fields on that defect:

  - repairStatus → "Repaired" (other valid values: "NotRepaired",

 "NotNecessary")

  - repairDateTime → ISO 8601 timestamp of the repair

  - repairUser → { "id": "<userId>" } — the user who performed the repair

  - defectRemarks → array of DefectRemark objects for notes

 4. Set the full DVIRLog back with the updated DVIRDefects

 

 Here's what that looks like in practice:

 

 Step 1 — Get the DVIRLog

 {

  "method": "Get",

  "params": {

   "typeName": "DVIRLog",

   "search": { "id": "a1B2C3" },

   "credentials": { "database": "...", "sessionId": "...", "userName": "..."

 }

  }

 }

 

 Step 2 — Set it back with the updated defect

 {

  "method": "Set",

  "params": {   

   "typeName": "DVIRLog",

   "entity": {      

    "id": "a1B2C3",

    "dvirDefects": [

     {       

      "id": "defectIdHere",

      "repairStatus": "Repaired",

      "repairDateTime": "2026-04-28T14:00:00.000Z",

      "repairUser": { "id": "userIdHere" },     

      "defectRemarks": [          

       { "remark": "Replaced brake pad, confirmed road-ready", "user": {

 "id": "userIdHere" } }

      ]                                  

     }

    ]                                    

   },                                   

   "credentials": { "database": "...", "sessionId": "...", "userName": "..."

 }

  }

 }

 

 Permissions — make sure your API user has DVIR repair rights in MyGeotab, otherwise the Set will be rejected.

 

 Hope that helps!

 Eishi FUN

1 Reply

EishiFUN
Geotabber

Hey @AIlun-8235​ ,

 

 Great questions! I used an AI to help get this answer. Please let me know if you run into any issues with this or have any follow up questions!

                                         

 Use DVIRLog — DVIRDefect isn't directly writable via the API. It's a child object nested inside DVIRLog, so the workflow is:

 

 1. Get the DVIRLog by ID — the response includes the DVIRDefects array with each defect's current state

 2. Locate the specific DVIRDefect you want to update

 3. Set the repair fields on that defect:

  - repairStatus → "Repaired" (other valid values: "NotRepaired",

 "NotNecessary")

  - repairDateTime → ISO 8601 timestamp of the repair

  - repairUser → { "id": "<userId>" } — the user who performed the repair

  - defectRemarks → array of DefectRemark objects for notes

 4. Set the full DVIRLog back with the updated DVIRDefects

 

 Here's what that looks like in practice:

 

 Step 1 — Get the DVIRLog

 {

  "method": "Get",

  "params": {

   "typeName": "DVIRLog",

   "search": { "id": "a1B2C3" },

   "credentials": { "database": "...", "sessionId": "...", "userName": "..."

 }

  }

 }

 

 Step 2 — Set it back with the updated defect

 {

  "method": "Set",

  "params": {   

   "typeName": "DVIRLog",

   "entity": {      

    "id": "a1B2C3",

    "dvirDefects": [

     {       

      "id": "defectIdHere",

      "repairStatus": "Repaired",

      "repairDateTime": "2026-04-28T14:00:00.000Z",

      "repairUser": { "id": "userIdHere" },     

      "defectRemarks": [          

       { "remark": "Replaced brake pad, confirmed road-ready", "user": {

 "id": "userIdHere" } }

      ]                                  

     }

    ]                                    

   },                                   

   "credentials": { "database": "...", "sessionId": "...", "userName": "..."

 }

  }

 }

 

 Permissions — make sure your API user has DVIR repair rights in MyGeotab, otherwise the Set will be rejected.

 

 Hope that helps!

 Eishi FUN

Still have questions?