Preview a change to per-finding actions on recent invoices (OWNER only)
const url = 'https://api.invogi.com/v1/organizations/current/control-settings/preview';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"actions":{"FUZZY_DUPLICATE":"INFORM","AMOUNT_ANOMALY":null}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.invogi.com/v1/organizations/current/control-settings/preview \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "actions": { "FUZZY_DUPLICATE": "INFORM", "AMOUNT_ANOMALY": null } }'Decides up to 500 of the most recently added invoices again from their stored findings, under the current actions and the proposed ones, and counts the decisions that differ. Nothing is saved and no decision changes. Thresholds and country settings are not covered.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”For a Clerk session, selects a workspace in which the user has an active membership. If omitted, the remembered accessible workspace is used. API keys remain bound to their own workspace and cannot select another tenant.
Request Bodyrequired
Section titled “Request Bodyrequired”object
The actions to change, merged onto the current ones. null returns a finding type to its built-in behaviour.
object
Example
{ "actions": { "FUZZY_DUPLICATE": "INFORM", "AMOUNT_ANOMALY": null }}Responses
Section titled “Responses”The effect on recent invoices
object
object
Changed finding types that were OFF when some of these invoices were decided, so there is nothing recorded to count.
Example
{ "invoicesChecked": 500, "changes": [ { "from": "REVIEW", "to": "PASS", "count": 40 } ], "notMeasured": []}Invalid request
Missing or invalid API key
API key lacks required scope/role