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

ParameterTypeRequiredDescription
fieldsArray of stringsNoRequested 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 / idsInteger string or arrayNoRestrict to asset IDs. id wins when both are supplied; values are converted to integers.
linkFromTenant/customer IDNoLegacy 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.
&lt;mapped field&gt;Scalar or arrayNoAny recognized Asset map field becomes an exact filter. Text comparisons are trimmed and case-insensitive; numeric values are integer-converted; arrays become IN filters.
orderString/object or arrayNoMapped sort fields, ascending by default; object entries accept id and exact dir: "desc".
advanceSearchArrayNoLegacy 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

ResponseCondition
{"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. id is always included. There is no pagination or limit.
  • Requesting locationName implicitly loads location. If location was 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 owner adds the current customer name with a separate lookup that does not exclude deleted customers.
  • allocatedToJob returns ID and epoch time for incomplete jobs from today onward whose meta.asset_used JSON 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