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

ParameterTypeRequiredDescription
allPresence flagNoPresence includes archived rows; absence excludes them.
type_id / name / activeNative ID array / string / integer-compatibleNoType, name-substring, and exact active-state filters. Type filtering is used only when the first ID is positive.
belong_id / belong_type / visIntegersNoWhen 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_toUnix timestampsNoA valid increasing pair excludes assets with movement intervals overlapping the local datetime window.
always_includeInteger-compatibleNoPositive ID appended outside all normal predicates. It can return a deleted, archived, inactive, wrong-type, or otherwise excluded asset.
fieldsJSON array string or native arrayNoAllowlisted 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

ResponseCondition
{"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 all is 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_list has similar filters while keeping always_include inside the non-deleted boundary.
  • Assets_listSimple includes display names for type, owner, and customer whereabouts.