Assets
List selected assets
/a/Assets_listSome
List selected asset fields with optional owner, whereabouts, type, name, status, and availability filters.
When to use this endpoint
Use Assets_listSome for the CRM1 asset selector when results may be restricted to assets owned by or located with one customer.
Authentication and permissions
The request must authenticate with signed API-key fields or a logged-in CRM session. The handler requires login or an established tenant database context and performs no additional Asset-page or role-permission check unless the page says otherwise.
Every query and write uses the authenticated tenant’s tables. CRM1 and CRM2 may hide actions through client-side permissions that these collection routes do not repeat.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
all | Presence flag | No | Presence includes archived rows; absence excludes them. |
type_id / name / active | Native ID array / string / integer-compatible | No | Type, name-substring, and exact active-state filters. Type filtering is used only when the first ID is positive. |
belong_id / belong_type / vis | Integers | No | When belong_id>0 and belong_type=0, vis=1 means owned by or located at that customer, while vis=3 means owned by only. Other values add no relationship filter. |
date_from / date_to | Unix timestamps | No | A valid increasing pair excludes assets with movement intervals overlapping the local datetime window. |
always_include | Integer-compatible | No | Positive ID appended outside all normal predicates. It can return a deleted, archived, inactive, wrong-type, or otherwise excluded asset. |
fields | JSON array string or native array | No | Allowlisted id, name, code, owner_id, type_id, and last_edited; defaults to id,name. |
Example request
$assets = FM_api('Assets_listSome', [
'belong_id' => '1042',
'belong_type' => '0',
'vis' => '1',
'fields' => json_encode(['id', 'name', 'code']),
]);
Example response
[
{"id": "4821", "name": "Compressor 4", "code": "CMP-004"}
]
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. |
Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.
Behaviour and edge cases
- Normal rows exclude deleted and, unless
allis present, archived assets. There is no ordering, pagination, or limit. - The availability window excludes overlapping movement records. Open-ended movements overlap only through the first comparison when their start lies inside the window.
- Availability ignores bookings linked to deleted/missing jobs, while job-independent movement records still participate. Historical movement rows remain retained after job deletion.
See it in Fieldmotion
CRM1
The reusable asset selector calls this route and supplies relationship visibility, type, name, current selection, and availability parameters.
CRM2
No direct current CRM2 caller was found; mapped list pickers use Assets_getDataTable.
Related endpoints
Assets_listhas similar filters while keepingalways_includeinside the non-deleted boundary.Assets_listSimpleincludes display names for type, owner, and customer whereabouts.