Overview:
When the defects identified in a DVIR report have been repaired, a vehicle-inspection-repaired message can be submitted to update the DVIR report with details about the repairs that were made, if any. The vehicle-inspection-repair message will close out the DVIR report. The repair update should be submitted to the TTC Event Receiver.
URL:
https://cloud.api.trimble.com/transportation/api/v3/eventreceiver
DVIR repair updates should be submitted as POST with the authorization = "Bearer" and the SAS token acquired earlier. See here for more details about the authentication process for Event Receiver.
Once a DVIR is marked as "Safe to Operate" by a driver, that DVIR report can no longer be updated by any systems. One scenario:
The driver creates a DVIR with defects that need to be repaired.
The maintenance facility processes the DVIR, creates a repair order and completes the necessary repairs.
The maintenance facility releases the vehicle back to a driver, but the mechanic has not yet updated the repair order. No vehicle-inspection.repaired message has been submitted to update the DVIR reportNumber.
The driver logs in to the vehicle and reviews the defects on the previous DVIR. The driver indicates that repairs have been made and the vehicle is safe to operate. This closes out the DVIR report and no further updates can be made.
The mechanic completes his data entry to update the repair order and the DVIR report, but the updates to the DVIR report fail because the DVIR has already been closed out by the driver. Due to the asynchronous nature of the DVIR processes, this failure probably won't generate any errors.
A different scenario for DVIRs with no defects.:
When logging out, driver A does a post-trip inspection and creates a DVIR with no defects found.
The DVIR report (vehicle-inspection.created) is published and picked up by your system.
A new driver, B, logs in to the vehicle for the next shift. Driver B reviews the previous DVIR and marks the vehicle as safe to operate.
The DVIR report will be updated and repairCertification.certificationStatus will default to "REPAIRS_NOT_NECESSARY".
The updated DVIR report (vehicle-inspection.updated) is published to your system.
If a vehicle-inspection.repaired message is submitted with a null repairCertification object, it can be used to add one or more notes to the DVIR.
{
"specversion": "1.0",
"id": "992af874-a55d-444f-8868-6825e989f30b",
"source": "Link1701D_PROD",
"type": "com.trimble.transportation.safety.vehicle-inspection.repaired.v1",
"datacontenttype": "application/json",
"data": {
"organizationId": "1111",
"accountId": "123e4567-e89b-12d3-a456-426614174000",
"reportNumber": 203,
"repairOrder": "V203",
"repairCertification": null,
"notes": [{
"noteCreator": {
"userId": "23365",
"userIdType": "trimble"
},
"noteDateTime": "2022-08-04T09:10:00Z",
"note": "scheduled for repairs today"
}]
}
}