When to use this endpoint

Obtain the log row ID from History first. The result is metadata association, not a saved before/after snapshot or complete audit of every affected row.

Authentication and permissions

Use signed API-key authentication or a logged-in CRM session. API keys act as their owner; session requests use dispatcher CSRF protection when configured.

Requires a valid tenant account and View on pageImportsHistory. Reads and writes use this account’s tenant tables.

Also requires View on the selected business-object page. TeamAccess filters matching object IDs to the caller’s visible scope.

Parameters

ParameterTypeRequiredDescription
idPositive integer or decimal integer stringYesUse the source or tenant row ID returned by its list/table. Fractions, negative numbers, arrays and out-of-range integers are rejected. This is not the import run token.
typeExact text enumYescreated or edited only; selects created_by_import_id or edited_by_import_id metadata association.

Example request

$result = FM_api('ImportHistory_listItems', ['id'=>'312','type'=>'created']);

Example response

{
  "type": "created",
  "ids": [
    1042,
    1043
  ]
}

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": "permission denied"}The user lacks the required Imports page action.
{"error": "missing or invalid parameter: id"}A required row ID is missing or invalid.
{"error": "invalid import_id provided"}The requested owned source or tenant row does not exist.

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

Behaviour and edge cases

  • Uses the log-row ID to load its run token and type. Supports Jobs 0, Customers 1, Contracts 5, Assets 6, Stock 7 and Suppliers 10; unsupported types return an error.
  • Returns active matching IDs ordered numerically. Both JSON string and numeric created_by_import_id/edited_by_import_id representations match the same exact token. Tokens are preserved as 1–32 digit strings without integer truncation.
  • created additionally requires cdate on or after the log day’s midnight, inclusive, with no upper date bound. edited does not use this date filter. The marker, active-state and TeamAccess conditions apply together, preventing either representation from bypassing scope.
  • Association metadata is the current record marker, not an immutable import snapshot. Later imports can replace it. This selection does not promise a complete historical count or undo edited fields.

Side effects

  • Reads data without modifying import settings, imported records, history, queues or notifications.

See it in Fieldmotion

CRM1

In CRM1 History, choose a run’s created/edited records or its deletion options; inspect ImportHistory_listItems. Subsequent UI detail calls build the preview/selection.

CRM2

In CRM2 Imports > History, inspect created/edited records or the removal dialog; listItems supplies candidate IDs to later per-object calls.

Related endpoints