Vehicles
List lightweight vehicle records
/a/Vehicles_list
List numeric vehicle IDs and registrations, with a limited raw-field and changed-since option.
When to use this endpoint
Use Vehicles_list for a lightweight unpaged vehicle catalogue. Prefer Vehicles_getReges when last_edited must always be returned or an ID batch is required.
Authentication and permissions
The request must authenticate with signed API-key fields or a logged-in CRM session. The handler requires login but performs no additional Vehicles-page, create, edit, delete, or role-permission check.
All reads and writes use the authenticated tenant’s tables. CRM1 and CRM2 may hide controls through client-side permissions; these routes do not repeat those UI checks.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
fields | JSON array or native array | No | Optional raw additions: uuid, description, cost_per_distance, location, last_edited, edited_uuid, meta, and cdate. id and reg are always selected. |
last_edited | Datetime string | No | When the key is present, selects last_edited strictly after this value and strictly before the current server datetime. Even a blank value activates the filter. |
Example request
$vehicles = FM_api('Vehicles_list', [
'fields' => json_encode(['uuid', 'description', 'last_edited']),
]);
Example response
[{"id":"30124","reg":"241-D-12001","uuid":"4ec721a4aa8f4ec393b6c66fd31bf611","description":"Service van","last_edited":"2026-10-01 11:20:00"}]
Errors and unusual responses
| Response | Condition |
|---|---|
{"error":"not logged in"} | No authenticated tenant context is available. Invalid signed credentials can be rejected by the dispatcher before the handler runs. |
false or a database-query error | Requesting the apparent price_per_distance: allowlist value generates an invalid column query. |
Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.
Behaviour and edge cases
- Unknown field names and a malformed non-array
fieldsvalue are silently ignored. - The changed-since lower bound is exclusive, unlike
Vehicles_getReges. The server-time upper bound is also exclusive. - The result is unpaginated and has no explicit ordering.
See it in Fieldmotion
CRM1
No direct CRM1 production caller was found.
CRM2
No direct CRM2 production caller was found. API tests use it as the lightweight source before selected-ID retrieval.
Related endpoints
Vehicles_getRegesreturns registration timestamps and selected ID batches.Vehicles_getByIdsafely allowsprice_per_distanceamong its raw fields.