Audit Settings
Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.
Update
Section titled “Update”Example request:
{ "data": { "type": "audit_settings", "attributes": { "audit_relevant_field_ids": [ "c825720c-fe84-481f-8530-954ac92ae8cf", "67ac4d91-1883-47f8-a9a1-f379bbd29cce", "payroll_information" ], "audit_relevant_document_label_ids": [ "a1b2c3d4-e5f6-7890-abcd-ef1234567890" ] } }}This endpoint updates the account’s audit-relevant user fields and/or document
labels. Send audit_relevant_field_ids, audit_relevant_document_label_ids, or
both. At least one of these attributes is required.
When an ID array is present, it replaces that selection completely: included IDs become audit-relevant, while omitted IDs no longer are. An empty array clears that selection. When an attribute is omitted, the corresponding selection is left unchanged.
The request requires the audit_settings.update right. Every field ID must
belong to an active user field in the current account, and every document label
ID must belong to an account label in the current account; otherwise, the
endpoint returns 404 Not Found without changing the existing selection.
audit_relevant_field_ids may also include payroll_information. That value
marks the whole payroll information block audit-relevant. It is not a field ID.
Omitting it while sending audit_relevant_field_ids clears that selection. The
same audit_relevant_fields audit entry stores it as
{ "id": "payroll_information", "name": "<translated block name>" }.
A successful update returns 200 OK with an empty JSON object.
A successful request may create one or two account_audit_log entries. The
acting user is stored as actor_id. Failed requests and saves that leave a
selection unchanged do not create audit entries.
When a selection actually changes, the endpoint writes one entry for that
selection, regardless of how many objects were added or removed. If both
audit_relevant_field_ids and audit_relevant_document_label_ids are sent and
both selections change, two entries are created.
| Selection changed | resource_type |
action_type |
resource_id |
|---|---|---|---|
| User fields | audit_relevant_fields |
updated |
null |
| Document labels | audit_relevant_document_labels |
updated |
null |
Each entry stores the delta in value.added and value.removed. Both sides are
arrays of { id, name } snapshots. Object names are captured at the time of the
save.
| Key | Contains |
|---|---|
added |
Objects that were not audit-relevant before the save and are after |
removed |
Objects that were audit-relevant before the save and are no longer after |
Objects that stay audit-relevant are omitted. An empty array means no objects changed on that side.
Example
valuewhen one field is removed from the selection and two are added:
{ "added": [ { "id": "67ac4d91-1883-47f8-a9a1-f379bbd29cce", "name": "Postal Code" }, { "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "name": "City" } ], "removed": [ { "id": "c825720c-fe84-481f-8530-954ac92ae8cf", "name": "Street and Number" } ]}HTTP Request
Section titled “HTTP Request”PUT /api/v1/audit_settings