DVIR Forms

The DVIR Forms API is used to handle queries for creation and editing DVIR forms. Fleet managers would be allowed to manage DVIR forms and query DVIR inspections. Drivers would be allowed to query DVIR forms and manage their own inspections per Equipment.

DVIR Form Inspections are automatically deleted after a specific period of time following the data retention policy.

Fields

Tag Data Type Required Description
accountId Long Auto The id of the Account that owns this record.
areas Array No The areas of the DVIR record
description Text (unlimited) No A description of the DVIR Form
dvirId Long No The ID of the DVIR where this inspection belonged to. Value is 0 if the inspection has not yet been included in a DVIR record.
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 *     Condition of the Equipment according to the DVIR. Can either be:

  • DEFECTS_CORRECTED
  • UNSATISFACTORY
  • SATISFACTORY
  • NO_DEFECT_FOUND
equipmentId Long No Id of the Equipment associated with the DVIR record
id Auto-incremented Long Auto Unique identifier 
inspectionType * inspection_trip_type No Information on the type of inspection. Can either be: 

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

  • DRIVER
  • MECHANIC
isTemplate Boolean No Indicates if the record is a DVIR form (true) or an inspection (false)
location * Character (255) No The address where the DVIR was performed.
media Array No  Image associated with the DVIR Form, usually a picture of Equipment
name Character (255) Yes The name of the DVIR Form
odometerKm* Double Precision No The odometer value on the time of the DVIR. Value is 0.0 if the inspection has not yet been included in a DVIR record.
terminalId Long No  The Id of the terminal of the Driver of the specific DVIR Form.
templateId Long No The Id of the template used in the DVIR Form.
signatureMediaId Long No The id for the signature’s image.
startTime * Text No Timestamp when the inspection 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 The status of the inspection
templateId Long No The id of the DVIR Form template used for this inspection
terminalId * Long No The id of the Home Terminal of the User who performed the DVIR
userId Long No The id of the user who performed the DVIR
* this field is taken from the DVIR record that this DVIR Form is associated to. This field is only returned on the GET method if inspection has been included in the DVIR already and cannot be used in the POST and PUT method. 
 

Read DVIR Forms

Read Inspections

** additional fields marked with * from the table are also included in the response if inspection has been included in the DVIR already. 

Create DVIR Forms

Create Inspections

Update DVIR Forms

Update Inspections

Delete

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

API error calls

ERROR MESSAGE POSSIBLE CAUSES
Area: <AreaName> has two or more points with duplicate names, this is not allowed POST error because DVIR form has inspection points with the same name within the specified area
DVIR Form with ID <id> does not exist. PUT error because DVIR form id does not exist.