When to use this endpoint

Use Notices_getDataTable for a server-paged notice history with mapped fields, platform labels, and the CRM bell unread count. Use Notice_checkNew for the compact five-row header feed.

Authentication and permissions

The request must authenticate with signed API-key fields or a logged-in CRM session. The handler requires login and performs no additional page or role-permission check.

The read or write is limited to the authenticated tenant. Notice endpoints that say “current user” use the authenticated session user ID within that tenant.

Parameters

ParameterTypeRequiredDescription
fieldsNative arrayYesMapped fields selected from id, subject, body, status, userID, cDate, cDateUnix, dueDate, meta, originalID, sDate, and metaCreatedBy. Unknown names are ignored, id is always added, and derived platform is always returned.
isTableInteger-compatibleNoDefaults to table mode. Exact integer 0 returns only data plus notifCount and enables optional limit.
draw, start, lengthInteger-compatibleNoTable counter, offset, and page size; defaults are 0, 0, and 10.
limitInteger-compatibleNoPositive limit used only outside table mode. Zero means unbounded.
orderBy / orderDescMapped field / directionNoExplicit mapped ordering. CRM2 sends cDate and desc. Unknown order fields fall back to a requested mapped field.
order[0][column] / order[0][dir]Integer / stringNoDataTables ordering fallback when explicit ordering is absent.
searchValue / searchFieldString / mapped field or arrayNoCase-insensitive substring search over the selected mapped fields; default search field is All.
id, status, cDate, cDateUnix, dueDate, originalID, sDateScalar or native arrayNoExact numeric mapped filters. The endpoint always adds userID for the current user and ignores a caller-supplied different user.
subject, body, metaScalar or native arrayNoText/JSON filters. A scalar uses case-insensitive substring matching; an array uses exact IN matching.
metaCreatedByString or native arrayNoCreator metadata filter. Exact lowercase fieldmotion is a special token matching null, blank, or zero creator metadata; other scalar values use substring matching.
referenceDate, dateFrom, dateToMapped field and integer day offsetsNoTenant-timezone relative-day range. Both offsets are required; CRM2 uses referenceDate=cDate. These are offsets from today, not date strings.
timeRangeFrom, timeRangeTo, offsetFrom, offsetToHour integers / native objectsNoOptional shared time-of-day range and hour/minute offsets applied when a valid referenceDate is present.
advanceSearch, groupByNative arraysNoShared mapped-table advanced filters and grouping controls.

Example request

$table = FM_api('Notices_getDataTable', [
	'fields' => ['id', 'subject', 'status', 'cDate', 'cDateUnix', 'meta'],
	'draw' => '2',
	'start' => '0',
	'length' => '10',
	'orderBy' => 'cDate',
	'orderDesc' => 'desc',
]);

Example response

{
  "data": [{
    "id": "49018",
    "subject": "Mentioned you in Job 1842",
    "status": "0",
    "cDate": "2026-10-01 09:30:00",
    "cDateUnix": "1790847000",
    "meta": "{\"createdBy\":19,\"link\":\"#pageJob&id=1842\"}",
    "platform": "CRM"
  }],
  "draw": 2,
  "recordsTotal": "240",
  "recordsFiltered": "18",
  "notifCount": "3"
}

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: fields"}fields is absent.
{"error":"error in database query"}A generated selection, filter, grouping, or ordering query fails.

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

Behaviour and edge cases

  • Unlike the header bell, table data includes rows whose metadata has source="push". Derived platform is App for those rows and CRM otherwise; the unread notifCount still excludes app-push rows.
  • cDate formats the Unix timestamp as a database datetime string while cDateUnix returns the raw timestamp. Request both when the UI needs display and relative-time calculations.
  • Table mode returns data, integer draw, and database scalar counts. Non-table mode omits draw and record counts but still appends notifCount.
  • There is no deleted-state filter because notices are hard-deleted rather than soft-deleted.

See it in Fieldmotion

CRM1

No direct CRM1 caller was found; CRM1 uses the unpaged Notices_list widget feed.

CRM2

Open Notifications, scroll, sort, or apply date/creator/status filters. The page requests 10 rows at a time and collects returned IDs for bulk deletion.

Related endpoints