Free trial
Colour

Inspections and defects

Record a driver check, see failed items become open defects, and clear a defect when it is fixed.

For
OwnerFleet managerDriver
Hosting
Any hosting
Devices
All devices
Business
Fleet

Checked against Pop Dispatch 0.1.0

You will be able to record a driver's check of an asset, have every failed item become an open defect, and clear each defect once it is repaired. The ready-made check templates pack arrives later; today you send the items yourself.

Before you start #

  • The dispatch_fleet licence flag is on (Business plan, an add-on for Starter and Pro, included in the 14-day trial).
  • You know the asset id and the list of items to check.
  • Your role is allowed to record inspections and to clear defects. Roles are set in the roles and permissions article.

Steps #

  1. Send POST /fleet/inspections with asset_id, a kind (pre, post or dvir, default dvir) and items, a list of 1 to 200 checks.
  2. Give each item an item name and a state of ok, watch or fail. You can add section, note and critical: true.
  3. Add the asset's odometer as the driver typed it. It becomes a meter reading with source inspection.
  4. Read the answer. It holds outcome, outcome_label, the number of defects and out_of_service.
  5. List open defects with GET /fleet/defects. Filter with asset_id, or status=cleared to see the closed ones. Critical defects come first.
  6. When the repair is done, send POST /fleet/defects/:id/clear with an optional note. The defect moves to cleared with the time and the person.
  7. Review past checks with GET /fleet/inspections, filtered by asset_id.

Results and what they mean #

Worst itemOutcomeLabel
Any item with critical that failedout_of_serviceOut of service
Any other item that faileddefectsDefects found
Only ok or watch itemsokNo problems found

A watch item records that something needs attention. It creates no defect.

An out_of_service result marks the asset out of service: GET /fleet/assets/:id shows out_of_service, out_of_service_since and the reason, and a trip cannot start on it. When the last open critical defect on the asset is cleared, the asset goes back in service by itself.

Every check needs a result #

An inspection saves only when every item has a result. If one item has no state, the whole inspection is refused with validation_failed and nothing is stored. This keeps a half-done check out of the record.

Technical details
  • Each failed item creates one row in defects linked to the inspection, with the item name, the critical mark and the note.
  • The odometer is typed in the asset's distance unit and stored in metres. See the meter article for how a lower value is flagged.
  • The answer to a critical failure reports out_of_service: true so a screen or an integration can act on it.
  • Inspections and defects are written to the audit log.

If something goes wrong #

  • feature_not_licensed (403) or licence_read_only (403): writes are blocked until the flag or licence is restored.
  • validation_failed (422): kind holds a value other than pre, post or dvir; items is empty or over 200; an item has no name; a state holds a value other than ok, watch or fail; or an item lacks a result.
  • not_found (404): no asset or defect has that id.
  • conflict (409): the defect is already cleared.