Skip to content

Preview a change to per-finding actions on recent invoices (OWNER only)

POST
/organizations/current/control-settings/preview
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.

X-Invogi-Organization
string format: uuid

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.

Media typeapplication/json
object
actions
required

The actions to change, merged onto the current ones. null returns a finding type to its built-in behaviour.

object
key
additional properties
string | null
Allowed values: OFF INFORM REVIEW BLOCK

Example

{
"actions": {
"FUZZY_DUPLICATE": "INFORM",
"AMOUNT_ANOMALY": null
}
}

The effect on recent invoices

Media typeapplication/json
object
invoicesChecked
required
integer
<= 500
changes
required
Array<object>
object
from
required
string
Allowed values: PASS REVIEW BLOCK
to
required
string
Allowed values: PASS REVIEW BLOCK
count
required
integer
>= 1
notMeasured
required

Changed finding types that were OFF when some of these invoices were decided, so there is nothing recorded to count.

Array<string>

Example

{
"invoicesChecked": 500,
"changes": [
{
"from": "REVIEW",
"to": "PASS",
"count": 40
}
],
"notMeasured": []
}

Invalid request

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: NOT_FOUND UNAUTHORIZED FORBIDDEN INVALID_REQUEST CONFLICT RATE_LIMITED USAGE_LIMIT_EXCEEDED PROCESSING_FAILED
message
required
string
request_id
required
string
details

Optional stable, content-free context, e.g. {reason, resets_at, preparation_id}.

object
key
additional properties
One of:
string

Example

{
"error": {
"code": "NOT_FOUND"
}
}

Missing or invalid API key

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: NOT_FOUND UNAUTHORIZED FORBIDDEN INVALID_REQUEST CONFLICT RATE_LIMITED USAGE_LIMIT_EXCEEDED PROCESSING_FAILED
message
required
string
request_id
required
string
details

Optional stable, content-free context, e.g. {reason, resets_at, preparation_id}.

object
key
additional properties
One of:
string

Example

{
"error": {
"code": "NOT_FOUND"
}
}

API key lacks required scope/role

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: NOT_FOUND UNAUTHORIZED FORBIDDEN INVALID_REQUEST CONFLICT RATE_LIMITED USAGE_LIMIT_EXCEEDED PROCESSING_FAILED
message
required
string
request_id
required
string
details

Optional stable, content-free context, e.g. {reason, resets_at, preparation_id}.

object
key
additional properties
One of:
string

Example

{
"error": {
"code": "NOT_FOUND"
}
}