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