Skip to content

Fleet and equipment through the API

  • Create and update items: vehicles and equipment.
  • Add due dates by date or mileage and mark them as done.
  • Hand an item to an employee, log servicing, refuelling and defects, and attach documents.
  • Import items in bulk.

This is the admin API (/api/v1), with the company secret key. The Fleet and equipment module must be on.

What you do Scope
read assets:read
write assets:write
also record a cost in Expenses (add_expense) plus write on finance
create a task from a due date plus tasks:write

Item types and deadline types are company lists, assets.types and assets.deadline_types. Send the code from them in type_code.

POST /api/v1/assets

{
"name": "Dacia Logan",
"kind": "vehicle",
"type_code": "car",
"plate": "B 123 ABC",
"odometer": 68000
}

kind is vehicle or equipment. status is active, in_service or retired. Equipment linked to a Scheduling resource (resource_id) cannot be booked while it is in service or retired.

POST /api/v1/asset_deadlines

{
"asset_id": "<item uuid>",
"type_code": "itp",
"due_date": "2027-03-15",
"repeat_months": 24,
"remind_days": 30
}

A due date has due_date, due_km or both. Whichever comes first counts. Marking it as done closes it and opens the next one:

POST /api/v1/asset_deadlines/{id}/complete

{ "done_at": "2027-03-10", "cost": 150, "add_expense": true }

If you do not send next_due_date or next_due_km, the next due date comes from the repeat interval. Sent empty, nothing new opens on that measure. create_task, with board_id, creates a task from the due date.

POST /api/v1/assets/{id}/assign

{ "employee_id": "<employee uuid>", "date": "2026-12-01", "condition_out": "no scratches" }

Without employee_id, the item goes back to the company. Read the history from asset_assignments: an empty to_date means they have it now.

POST /api/v1/asset_logs

{ "asset_id": "<item uuid>", "kind": "service", "cost": 650, "vendor": "Service Auto", "odometer": 70000 }

kind: service, repair, fuel, defect, odometer or other. A mileage lower than the last reading needs allow_lower: true. A defect is closed with the resolve action and reopened with reopen.

Documents are attached with the add_document action on the item (name, type, content_base64, at most 25 MB, and optionally title, expires_at) and removed with remove_document.

POST /api/v1/commands/assets.import with rows, at most 500. Each row may have name, kind, type, plate, vin, serial, code, year, odometer, location, holder and deadlines, an object { type: date }. Wrong rows come back in errors.