Fleet keeps the paperwork of each asset and each person with its expiry date. You will be able to add the document types for your country, record documents and renewals, void a mistake and see which documents are expiring or expired.
Before you start #
- Set your country preset so the right document types exist. See units-and-currency.
- Add the asset or person the document belongs to.
- Fleet writes need the
dispatch_fleetlicence flag.
Document types by country #
Types carry names and flags only. Pop Dispatch ships packs for the United States, India and the United Kingdom, and each type belongs to either an asset or a person.
- United States: registration, insurance, inspection, driver licence, medical card.
- India: registration certificate, pollution under control, fitness certificate, permit, insurance, road tax, driving licence.
- United Kingdom: MOT, vehicle tax, insurance, V5C registration certificate, driving licence, DBS check, private hire licence.
Packs list names. Check the current rules for your area with the issuing authority, since you stay responsible for them.
Steps #
- Read the types with
GET /fleet/doc-types. Each has acode,label,subject(asset or person) and whether it takes an expiry and a number. - Add another country's types with
POST /fleet/doc-types/seedand{"country": "IN"}. Saving your locale adds your own country's types for you. - Record a document with
POST /fleet/documents. Send exactly one ofasset_idorperson_id, adoc_typecode (ordoc_type_id), and any ofdoc_no,issued_on,expires_on,issuer,cost_centsandnotes. - Renew by recording a new document of the same type with the new dates. The old one remains in the history.
- List current documents with
GET /fleet/documents. Narrow the list withasset_id,person_id,stateorsoon_days. - Void a mistaken document with
POST /fleet/documents/:id/void.
One current document for each type #
For each asset or person and each type, one document is current: the latest one standing, by expiry date. A renewal therefore replaces its predecessor without any edit. A voided document never counts. If you void the newest, the previous one becomes current again.
Expiry states #
- No expiry: the document has no expiry date.
- Valid: the expiry date is more than 30 days away.
- Expiring soon: the expiry date falls within 30 days, including today. Pass
soon_daysto the list to use another window. - Expired: the expiry date has passed.
The nightly job writes a reminder at expiring and at expired. See reminders-email-and-whatsapp.
Cost feeds cost per vehicle #
A cost_cents on an asset document counts toward that asset's cost per vehicle on the issue date, under the type's category such as insurance or registration. A voided document leaves the total. See cost-per-vehicle-and-tco.
Technical details
- Money is an integer in minor units.
cost_centsis in the business currency. - Expiry is judged on the business's local date, using its time zone.
- The type's
tag(registration, insurance, inspection, licence, medical, emissions, permit, tax, background) tells the expiry check what a type is for whatever the country calls it. - Voiding sets a flag on the row. The row stays for the audit trail.
- A person's driver licence and medical documents are documents on the person. See driver-profiles.
If something goes wrong #
validation_failed(422) withfields: ["asset_id", "person_id"]: send exactly one of the two.validation_failed(422) withfields: ["doc_type"]: use a code fromGET /fleet/doc-types.validation_failed(422) withfields: ["expires_on"]: the expiry cannot come before the issue date.validation_failed(422) withfields: ["country"]: packs exist for US, IN and GB.invalid_date(422): write dates as YYYY-MM-DD.not_found(404): no such asset, person or document.feature_not_licensed(403) orlicence_read_only(403): see fleet-overview-and-setup.