When to use this endpoint

Use Asset_getLayoutDetails as the read route for the shared CRM2 Asset layout map.

For a smaller programmatic lookup, Asset_getRequestedDetails exposes the same base map plus asset-specific location and owner enrichment.

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 stringsYesRequested Asset map keys. Recognized base fields are listed on Asset_createData. Unknown names are omitted; supported synthetic names are locationName, widgetQRCode, widgetTableContact, and widgetAssetServiceFrequency.
id / idsInteger string or arrayNoRestrict to asset IDs. If both are supplied, id wins. Values are converted to integers.
<mapped field>Scalar or arrayNoRecognized map keys become exact filters: text is trimmed and case-insensitive, numbers are integer-converted, and arrays become IN filters. Picker objects are split into their underlying ID/type filters.
orderString/object or arrayNoMapped sort fields. Object form accepts id and exact dir: "desc"; invalid fields are ignored.
advanceSearchArrayNoLegacy mapped filter clauses. The raw where form is trusted-internal SQL and must not be built from user input.

Example request

$rows = FM_api('Asset_getLayoutDetails', [
	'id' => ['4821'],
	'fields' => ['id', 'name', 'code', 'locationName', 'widgetQRCode', 'widgetTableContact'],
]);

Example response

[
  {
    "id": 4821,
    "name": "Compressor 4",
    "code": "CMP-004",
    "locationName": "Northwind Service Centre",
    "widgetQRCode": {
      "url": "http://q.fieldmotion.com/asset/92442/4821",
      "Name": "Compressor 4",
      "Code": "CMP-004"
    },
    "widgetTableContact": []
  }
]

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.
{"error":"missing or invalid parameter: fields"}fields is absent.
[]No non-deleted asset satisfies all filters.

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 assets remain unless explicitly filtered.
  • id is always appended and appears in each row. Temporary base fields added for a synthetic widget are removed unless the caller requested them too.
  • locationName resolves types 0 site, 1 customer, 2 asset, and 3 user using current names without deleted filtering.
  • widgetQRCode always uses an http://q.fieldmotion.com/asset/<tenant>/<asset> URL. Contact rows are converted through the layout widget map; service frequency is copied from metaServiceFrequency.
  • The endpoint is read-only and performs no department- or owner-based visibility filtering beyond supplied map filters.

See it in Fieldmotion

CRM1

No direct production CRM1 caller was found.

CRM2

The shared Asset layout map registers this as its read route. Open an Asset create/edit layout and inspect its initial data load.

Related endpoints