Asset types
Retrieve asset-type names
/a/AssetTypes_getNames
Resolve asset-type IDs to names, or return every tenant asset-type name.
When to use this endpoint
Use AssetTypes_getNames for lightweight labels in Asset screens, import tools, and export translations.
When richer fields are required, use AssetTypes_getById.
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 |
|---|---|---|---|
ids | Array | No | Native request array of IDs. Values are integer-converted. Omission returns all names; JSON text is not decoded by this endpoint. |
Example request
$names = FM_api('AssetTypes_getNames', [
'ids' => ['47', '58'],
]);
Example response
[
{"id": "47", "name": "Compressor"},
{"id": "58", "name": "Mobile Compressor"}
]
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. |
Runtime warning or type error | A present ids value is not an array, or an empty array produces an invalid empty IN list. |
Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.
Behaviour and edge cases
- Missing IDs are omitted. Duplicate input IDs can still yield only one database row.
- No
ORDER BYis applied, so neither all-types mode nor filtered mode promises a stable order. - There is no search, pagination, or result limit.
See it in Fieldmotion
CRM1
Open an Asset view that fills type-name placeholders, an export that translates asset types, or the administrator Clik importer and filter Network requests for AssetTypes_getNames.
CRM2
CRM2 uses the endpoint for export translations, common asset-type label helpers, and the Clik importer’s type selector.
Related endpoints
AssetTypes_listsupports a small selectable field set and edit-time filter.AssetTypes_getByIdcan also return metadata, timestamps, and attribute masks.