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_fleetlicence 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 #
- Send
POST /fleet/inspectionswithasset_id, akind(pre,postordvir, defaultdvir) anditems, a list of 1 to 200 checks. - Give each item an
itemname and astateofok,watchorfail. You can addsection,noteandcritical: true. - Add the asset's
odometeras the driver typed it. It becomes a meter reading with sourceinspection. - Read the answer. It holds
outcome,outcome_label, the number ofdefectsandout_of_service. - List open defects with
GET /fleet/defects. Filter withasset_id, orstatus=clearedto see the closed ones. Critical defects come first. - When the repair is done, send
POST /fleet/defects/:id/clearwith an optionalnote. The defect moves toclearedwith the time and the person. - Review past checks with
GET /fleet/inspections, filtered byasset_id.
Results and what they mean #
| Worst item | Outcome | Label |
|---|---|---|
Any item with critical that failed | out_of_service | Out of service |
| Any other item that failed | defects | Defects found |
Only ok or watch items | ok | No 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
defectslinked 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: trueso 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) orlicence_read_only(403): writes are blocked until the flag or licence is restored.validation_failed(422):kindholds a value other thanpre,postordvir;itemsis empty or over 200; an item has no name; astateholds a value other thanok,watchorfail; or an item lacks a result.not_found(404): no asset or defect has that id.conflict(409): the defect is already cleared.