When to use this endpoint

Use Vehicle_setDescription only when reproducing CRM1’s inline table edit. Mapped clients should prefer Vehicle_updateData.

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

ParameterTypeRequiredDescription
idInteger-compatible or 32-character stringEffectively yesNumeric vehicle ID or a string of exactly 32 characters treated as a UUID. Invalid or missing values can still return success.
valStringNo validationReplacement description. Blank and missing values are accepted as an empty string; no length limit is enforced here.

Example request

$result = FM_api('Vehicle_setDescription', [
	'id' => '30124',
	'val' => 'Service van',
]);

Example response

{"ok":1}

Errors and unusual responses

ResponseCondition
{"error":"not logged in"}No authenticated tenant context is available. Invalid signed credentials can be rejected by the dispatcher before the handler runs.

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 route always returns success after issuing the update, including for unknown IDs.
  • HTML or other text is stored verbatim after SQL escaping; rendering clients are responsible for output escaping.

Side effects

  • Updates description, advances last_edited, sets edited_uuid to Vehicle_setDescription, and invalidates the vehicle cache.
  • It does not write Core field history.

See it in Fieldmotion

CRM1

Open Settings → Vehicles in CRM1 and filter browser developer tools for the exact function name. Edit the Description table cell.

CRM2

No direct CRM2 caller was found; mapped vehicle forms use Vehicle_updateData.

Related endpoints