Situation #
A vehicle has left the fleet and nobody should use or track it any more. Its records stay. The Fleet screens arrive with the web console, so the steps below use the API.
What the API does and does not do #
There is no sale record yet. Pop Dispatch has no call that books a sale price, a buyer or a disposal date, and it does not post a gain or loss. You retire the vehicle by switching it off, and you keep the sale details in the asset's notes field or in your accounts.
What keeps working #
- Every record of the vehicle: readings, fuel, expenses, documents, inspections and trips.
GET /fleet/assets/{id}/tco, so cost per vehicle still reports for the years it was yours.- Exports. Retired vehicles stay in
GET /fleet/export/assets.
Steps in order #
- Record the final odometer reading with
POST /fleet/assets/{id}/meters. It becomes the last figure on the asset. - List the tires on it with
GET /fleet/assets/{id}/tyres. - Remove each fitted tire with
POST /fleet/tyres/{id}/removeand areason. Usesoldwhen the tires left with the vehicle. Use another reason (worn,other) for tires that stay with you. The fitment history is kept. - List open defects with
GET /fleet/defects?asset_id={id}. Clear each withPOST /fleet/defects/{id}/clearand anotesuch as "sold as seen". - Export what you want in your own files:
GET /fleet/export/assets,meter-readings,fuel,expenses,documents. These give one file per kind for the whole fleet. - Add the sale details to
notesand switch the vehicle off in one call:PATCH /fleet/assets/{id}with{"active": false, "notes": "Sold on the agreed date, details in the accounts"}.
How to confirm it worked #
GET /fleet/assets?active=trueno longer lists the vehicle, andGET /fleet/assets?active=falsedoes.GET /fleet/liveno longer shows it, because the live view lists active assets only.GET /fleet/defects?asset_id={id}returns no open defects.GET /fleet/assets/{id}/tcostill returns its costs.
What to do afterwards #
- Maintenance schedules stay on the board. The API has no call yet to switch a schedule off, so expect to see the vehicle there and ignore it, or look at
GET /fleet/pm/boardper asset when you review it. - Documents stay with the vehicle. Void a document with
POST /fleet/documents/{id}/voidwhen it no longer applies. - Switch the vehicle back on with
{"active": true}if the sale falls through.
Technical details
- Nothing is deleted.
activeonly hides the asset from the active list and the live view. - A phone or tracker that still sends positions for the asset needs a shift or trip to be accepted. Stop the tracker when the vehicle leaves.
- Needs the
dispatch_fleetlicense flag for writes.