Communications
Update mapped notice data
/a/Notice_updateData
Partially update mapped notice fields by tenant-local notice ID.
When to use this endpoint
Use Notice_updateData only for trusted internal notice administration, such as CRM2’s “Mark as unread” action. Use Notice_markSeen for the ownership-scoped read action.
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
| Parameter | Type | Required | Description |
|---|---|---|---|
id | Integer-compatible or native array | Yes | Target notice ID or IDs. Values are integer-converted; arrays apply the same supplied values to every ID. |
subject, body, status, cDate, cDateUnix, dueDate, meta, originalID, sDate, metaCreatedBy | Mapped value | No | Any subset of the mapped fields other than userID. The generic map applies type conversion but no field-specific notice validation. |
userID | Integer-compatible | No | Ignored. This current-user route does not permit reassigning a notice to another recipient. |
Example request
$result = FM_api('Notice_updateData', [
'id' => '49018',
'status' => '0',
]);
Example response
{"ok":1}
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. |
{"error":"missing or invalid parameter: id"} | id is absent. |
{"warning":"no updated fields."} | No recognized mapped field remains after removing the ID. |
{"warning":"No data."} | No tenant notice matches the scalar numeric ID. |
{"warning":"No Change."} | All supplied mapped values compare equal to stored values. |
Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.
Behaviour and edge cases
- Only IDs owned by the authenticated user are passed to the generic updater. A scalar ID belonging to another user produces
{"warning":"No data."}; unauthorized members of an ID array are silently omitted. - Only recognized supplied fields change.
metaCreatedBychanges the nestedmeta.createdBykey while preserving other metadata; rawmetacan replace the object. - A native ID array discards individual row errors and warnings and returns
{"ok":1}after the loop. - The notice map has no last-edited field, so this route does not maintain a change timestamp.
- Changing status to unread does not update the recipient’s
notices_latestcheckpoint, so it may not trigger the header poll as a newly created notice would.
Side effects
- Invalidates the notices cache and writes generic Core history for changed mapped fields. It does not send email or update user notice checkpoints.
See it in Fieldmotion
CRM1
No direct CRM1 production caller was found.
CRM2
On Notifications, choose Mark as unread. CRM2 sends status=0 through this route; marking read uses Notice_markSeen.
Related endpoints
Notice_markSeenperforms an ownership-scoped status change to read.Notices_getDataTablesupplies the current user’s rows to CRM2.