Assets
Retrieve requested asset fields
/a/Asset_getRequestedDetails
Read selected named asset fields with optional location, owner, and future-job enrichment.
When to use this endpoint
Use Asset_getRequestedDetails for CRM2 pickers, reports, dashboards, job screens, and modules that need named Asset map fields.
Always request only the fields needed and normally filter by id/ids; this route is unpaginated.
Authentication and permissions
The request must authenticate with signed API-key fields or a logged-in CRM session. The handler performs no additional page or role-permission check.
The lookup and any write use the authenticated tenant; an ID from another tenant cannot be addressed through this call.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
fields | Array of strings | No | Requested Asset map keys. If absent, every mapped key is requested. Unknown names are omitted. Special names are locationName and allocatedToJob; owner and location receive extra names. |
id / ids | Integer string or array | No | Restrict to asset IDs. id wins when both are supplied; values are converted to integers. |
linkFrom | Tenant/customer ID | No | Legacy cross-tenant override that switches the generic data helper to user<linkFrom>_assets. The endpoint does not validate this value against an allowed relationship; reserve it for trusted internal linked-account workflows. |
<mapped field> | Scalar or array | No | Any recognized Asset map field becomes an exact filter. Text comparisons are trimmed and case-insensitive; numeric values are integer-converted; arrays become IN filters. |
order | String/object or array | No | Mapped sort fields, ascending by default; object entries accept id and exact dir: "desc". |
advanceSearch | Array | No | Legacy mapped advanced filters. Do not expose its raw where capability to untrusted input. |
Example request
$rows = FM_api('Asset_getRequestedDetails', [
'id' => ['4821'],
'fields' => ['id', 'name', 'code', 'owner', 'location', 'locationName', 'allocatedToJob'],
]);
Example response
[
{
"id": 4821,
"name": "Compressor 4",
"code": "CMP-004",
"owner": {"id": "1042", "name": "Northwind Service Centre"},
"location": {"id": "1042", "type": "1", "name": "Northwind Service Centre"},
"locationName": "Northwind Service Centre",
"allocatedToJob": [{"id": "7791", "meeting_time_e": "1790251200"}]
}
]
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. |
[] | No non-deleted asset satisfies the supplied filters. Unknown requested fields do not themselves produce an error. |
Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.
Behaviour and edge cases
- Soft-deleted assets are excluded; archived and inactive rows remain unless filtered.
idis always included. There is no pagination or limit. - Requesting
locationNameimplicitly loadslocation. Iflocationwas not explicitly requested, it is removed after the name is added. Current names are resolved for sites, customers, assets, and users without deleted filters. - Requesting
owneradds the current customer name with a separate lookup that does not exclude deleted customers. allocatedToJobreturns ID and epoch time for incomplete jobs from today onward whosemeta.asset_usedJSON contains the asset ID as a string. The query does not exclude deleted jobs and does not return job reference or user.- The endpoint is read-only and does not enforce CRM2 page, department, or owner visibility.
See it in Fieldmotion
CRM1
No primary production CRM1 caller was found.
CRM2
CRM2 uses this route broadly: Asset details, list pickers, stock/job dialogs, reports, timelines, departments, contracts, recurring invoices, and job-customer displays all request focused field sets.
Related endpoints
Asset_getLayoutDetailssupplies synthetic widgets for the configurable Asset layout.Asset_updateDatawrites the same named field map.