DVIRS

The DVIRs API is used to handle queries for inspections. Drivers would be allowed to query their inspections of each equipment and manage them as a single DVIR until they have been certified.

DVIRs are automatically deleted after a specific period of time following the data retention policy.

Fields

Tag Data Type Required Description
accountId Long No The id of the Account that owns this record.
certifyMessage Character (255) No Certification message of the inspector along with the inspector’s name. 
dvirFormIds Array No A list of DVIR Form ids that belongs to this DVIR.
endTime Text No Timestamp when the inspection ended 
Note: Format is in timestamp and timezone (YYYY-MM-DDTHH:MM:SS.sssZ, e.g: 1970-01-01T00:00:00.000Z)
equipmentCondition equipment_condition No Condition of the equipment according to the DVIR. Can either be:

  • DEFECTS_CORRECTED
  • UNSATISFACTORY
  • SATISFACTORY
  • NO_DEFECT_FOUND
generalComments Text No Comments/Notes for the DVIR
id Auto-incremented Long Auto Unique identifier 
inspectionType inspection_trip_type No Information on the type of DVIR. Can either be: 

  • POST_TRIP
  • PRE_TRIP
  • AD_HOC
inspectorType inspector_type No Information on the type of inspector. Can either be: 

  • DRIVER
  • MECHANIC
lastChangedDate Text Auto Auto-generated timestamp of the last change made to this record
Note:
Format is in timestamp and timezone (YYYY-MM-DDTHH:MM:SS.sssZ, e.g: 1970-01-01T00:00:00.000Z)
location Character (255) No  The address where the DVIR of the assets occurred.
odometerKm Double Precision  No The odometer value on the time of the DVIR
signatureMediaId / signature  Long / Object No On GET, contains the id of the image of the signature associated with the DVIR record (signatureMediaId)
On POST, contains an object with the details of the signature of the inspector. (signature)
startTime Text No Timestamp when the DVIR started
Note: Format is in timestamp and timezone (YYYY-MM-DDTHH:MM:SS.sssZ, e.g: 1970-01-01T00:00:00.000Z)
status inspection_status No Information on the status of the DVIR
userId Long No The id of the Driver who is using the Equipment being inspected

Read DVIRS

Create DVIRs

Delete

API PATH: /api/v2/dvirs/<id>
METHOD: DELETE

API error calls

ERROR MESSAGE POSSIBLE CAUSES
DVIR Form is already being used by another DVIR POST/PUT error because a DVIR form id is already being used in another DVIR record.