Approve a dataLayer diff into the journey baseline
approve_datalayer_diffApprove a dataLayer diff into the journey baseline (permission: edit)
Fold a single unresolved diff into the frozen expected schema and resolve its open regression. The STORED scan_diffs value is used (the body carries no value). When the diff contradicts scan history and confirmed is not set, responds 409 confirmation_required (error.meta { supporting, total }) instead of approving; retry with confirmed:true to override. Approving a missing event or param removes it from the expected schema; while an element it covers is marked as an error (an open regression at that step) it responds 409 with error code open_regression instead. mode: required (default) makes an added event/param required and removes a missing one from the expected state; optional records it as may-or-may-not-occur.
id is the scan's journeyId; take scanId, stepIndex, elementKey and diffType from a diff of get_scan with include diffs. To approve every diff of a scan use approve_all_datalayer_diffs; to stop reporting an element on every step use ignore_datalayer_element.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"id": "<id>",
"scanId": "<scanId>",
"stepIndex": "<stepIndex>",
"elementKey": "<elementKey>",
"diffType": "<diffType>"
},
"name": "approve_datalayer_diff"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Journey id: from GET /journeys or the POST /journeys answer. | |
| mode | No | Presence diffs only (missing/extra event or param): required (default) or optional. | required |
| scanId | Yes | The scan whose diff is approved. | |
| diffType | Yes | The diff's diffType; only these types can be approved: missing_event, extra_event, missing_param, extra_param, param_type_changed, event_drifted, consent_value_changed. | |
| confirmed | No | Approve even when the diff contradicts scan history (after 409 confirmation_required). | |
| stepIndex | Yes | Zero-based journey step of the diff. | |
| elementKey | Yes | The diff's elementKey, from GET /scans/{id}?include=diffs. |