Vehicles
Retrieve one raw vehicle
/a/Vehicle_get
Fetch one raw vehicle database row for legacy edit and costing workflows.
When to use this endpoint
Use Vehicle_get when a numeric vehicle ID or UUID must resolve to the complete legacy row. For controlled field selection or custom-value extraction, use Vehicle_getRequestedDetails.
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 |
|---|---|---|---|
id | Integer-compatible or 32-character string | Yes | Numeric ID or UUID. Exact string length, rather than UUID format validation, chooses the UUID branch. A supplied blank value is queried as numeric ID 0. |
Example request
$vehicle = FM_api('Vehicle_get', [
'id' => '30124',
]);
Example response
{
"id": "30124",
"uuid": "4ec721a4aa8f4ec393b6c66fd31bf611",
"reg": "241-D-12001",
"description": "Service van",
"cost_per_distance": "0.4200",
"location": null,
"last_edited": "2026-10-01 11:20:00",
"edited_uuid": "Vehicle_update",
"price_per_distance": "0.7500",
"meta": null,
"cdate": "1790850000"
}
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. |
{"error":"missing or invalid parameter: id"} | The parameter is absent. |
false | No row matches. Missing rows are not represented by an object with null fields. |
Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.
Behaviour and edge cases
- The response uses raw snake_case column names and database scalar types. Decimal values and IDs normally arrive as JSON strings.
metaremains an encoded JSON string when populated; this route does not expandcustom_values.- There is no active/deleted filter because vehicle rows have no such columns.
See it in Fieldmotion
CRM1
CRM1 calls this route from Settings → Vehicles before opening the edit dialog, from a job’s mileage controls, and from asset financials.
CRM2
No direct CRM2 production caller was found. CRM2 uses mapped detail endpoints for vehicle forms; its history widgets know the route name only as related entity metadata.
Related endpoints
Vehicles_getByIdretrieves a selected batch of raw rows.Vehicle_updateis the matching CRM1 save route.