A document pack is a starter list of document types for one country. You will be able to add the pack for your country, see the types it creates, and attach documents of those types to vehicles and people so Fleet can track their expiry dates.
Each pack holds names and flags only. It holds no lead times, fees or legal rules. The packs are marked pending verification in Phase 7, and you remain responsible for the rules that apply where you operate.
Before you start #
- You need a role that manages Fleet (owner or manager).
- Fleet must be licensed; see
fleet-without-the-licence. - Set your country in the locale settings (
country_code). Seeunits-and-currency.
Steps #
- Set your country with
PATCH /settings/locale. Saving the locale adds the pack for that country straight away. - Check the list with
GET /fleet/doc-types. Each type shows its code, label, whether it belongs to a vehicle or a person, and whether it carries a number. - To add a pack for another country, send
POST /fleet/doc-types/seedwithcountryset toUS,INorGB. The answer says how many types were added. - Record a document against a type with
POST /fleet/documents. Seedocuments-and-expiry.
The packs #
United States
- Registration, Insurance, Inspection (vehicle)
- Driver license, Medical card (person)
India
- Registration certificate, Pollution under control, Fitness certificate, Permit, Insurance, Road tax (vehicle)
- Driving license (person)
Great Britain
- MOT, Vehicle tax, Insurance, V5C registration certificate, Private hire license (vehicle)
- Driving license, DBS check (person)
Every type also carries a purpose tag, such as registration, insurance, inspection, permit, tax, license, medical, emissions or background. The expiry check uses the tag, so a document named differently in another country still counts for the same purpose.
Seeding again #
Seeding is safe to repeat. A type your account already has is skipped, so running a pack a second time adds nothing twice, and a type you added yourself stays as it is. A country with no pack adds nothing.
Technical details
- Pack contents live in
store/src/doc_types.rs. Each type is stored per account with its country code, code, label, subject (assetorperson), tag, number flag and sort order. - The
has_numberflag says whether the document carries a reference number. For example, vehicle tax in the Great Britain pack has none, and the medical card in the United States pack has none. - Country codes are ISO 3166-1 alpha-2.
- The pending verification status covers the names, the tags and the choice of types. Phase 7 checks them against published sources.
If something goes wrong #
feature_not_licensed(403): the license lacksdispatch_fleet, so seeding refuses. Reading the list still works.validation_failed(422): thecountryfield is missing or has no pack. UseUS,INorGB.- A type you expected is missing: check
GET /fleet/doc-typesfor the country, then run the seed again.