When to use this endpoint

Use Assets_archiveMultiple for the bulk Archive action in an asset list. It changes only currently unarchived matching IDs; already archived, deleted, and missing rows are silently skipped.

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
idsJSON array stringYesAsset IDs. The decoded array is split into groups of 100. Send only positive integer IDs from a trusted lookup.

Example request

$result = FM_api('Assets_archiveMultiple', [
	'ids' => json_encode(['4821', '4822']),
]);

Example response

{
  "ok": 1
}

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: ids"}The key is absent. Malformed JSON or a decoded non-array is not handled cleanly and can produce a runtime error instead of this response.

Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.

Behaviour and edge cases

  • There is no result per ID and no all-or-nothing transaction. The endpoint returns success even when every requested row is missing, deleted, or already archived.
  • Archived rows remain stored and readable through endpoints that do not apply an archive filter.

Side effects

  • For each changed row, writes an Asset archive history entry and a tenant deletion-log row used by mobile synchronization.
  • Sets archived=1, advances last_edited, and sets edited_uuid to Assets_archiveMultiple. Batches are independent.

See it in Fieldmotion

CRM1

Open Assets, select rows, and choose the bulk archive action. CRM1 also uses this route as the first step of its live-asset delete flow.

CRM2

Open Assets, select rows, and choose Archive Assets. CRM2 exposes the control only when its client-side edit permission allows it.

Related endpoints