Assets
Set an asset make
/a/Asset_setMake
Replace the make text on one asset.
When to use this endpoint
Use Asset_setMake for a focused edit of a known asset’s make.
The value is free text; no manufacturer list or normalization is applied.
Authentication and permissions
The handler requires an authenticated tenant context, established by signed API-key fields or a CRM session. It checks the tenant table prefix but does not separately require a logged-in user ID.
No page, role, or asset permission is checked.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | Integer string | Yes | Server-side asset ID after integer conversion. The existence check includes soft-deleted assets. |
val | String | Yes | Replacement make, stored without trimming. Blank and surrounding whitespace are accepted. The endpoint does not enforce the schema’s 45-character limit. |
Example request
$result = FM_api('Asset_setMake', [
'id' => '4821',
'val' => 'ExampleCo',
]);
Example response
{
"ok": 1
}
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":"no ID provided"} | id is omitted. |
{"error":"no val provided"} | val is omitted. |
{"error":"asset does not exist"} | No asset row has the converted ID. |
Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.
Behaviour and edge cases
- There is no no-change shortcut or normalization.
- The endpoint can update archived or soft-deleted assets.
- This is a single-record mutation; it provides no list filtering or pagination.
Side effects
- Attempts to update
makeandlast_edited, setsedited_uuidtoAsset_setMake, invalidates the asset cache, and writes an asset audit entry.
See it in Fieldmotion
CRM1
Open an asset edit page or the editor in a customer’s Assets tab, change Make, and filter Network requests for Asset_setMake.
CRM2
No direct production CRM2 call to Asset_setMake was found; CRM2 uses its broader update contract.
Related endpoints
Asset_setModelchanges the companion model field.Asset_getreturns make when requested.Asset_newaccepts make during creation.