Skip to content

Start an audit run (ANALYST+, dashboard user)

POST
/overcharge-audits
curl --request POST \
--url https://api.invogi.com/v1/overcharge-audits \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "companyId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "supplierId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "from": "2026-04-15", "to": "2026-04-15", "invoiceIds": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ] }'

Freezes the scope, invoice facts, current line revisions, active schedule revisions, approved conversions and review threshold. At most 1,000 lines per run, processed in 100-line queued chunks; without a queue, at most 100 lines, checked synchronously. Larger scopes are refused before starting. Exceptions become AGREED_PRICE_VARIANCE findings (REVIEW by default) through the normal re-decision of each invoice; nothing is metered beyond the existing invoice units. A run clears an earlier finding only when its starter and every author of the invoice’s lines may release holds and every line was checked. Missing or conflicting evidence never clears an existing finding. Stale runs retain their historical comparison without changing current review work. Queued runs using an older rule version fail with rerun guidance. Invoices with unknown currency must be corrected before a run can be created; the request is rejected with INVALID_REQUEST and reason CURRENCY_UNKNOWN rather than guessing a rounding scale.

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.

Idempotency-Key
string
Media typeapplication/json
object
companyId
string format: uuid
supplierId
string format: uuid
from
string format: date
to
string format: date
invoiceIds
Array<string>
<= 1000 items

Example generated

{
"companyId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"supplierId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"from": "2026-04-15",
"to": "2026-04-15",
"invoiceIds": [
"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
]
}

The run (COMPLETED when run synchronously

Media typeapplication/json
object
id
string format: uuid
status
string
Allowed values: QUEUED RUNNING COMPLETED FAILED
lineCount
integer
invoiceCount
integer
processedLineCount
integer
manifest

Frozen rule/engine versions

object
summary

Coverage first. Every line counts in lines. Net candidate variance is per currency, before tax, and is never added to gross invoice exposure or reported as a saving.

object
lines
integer
checkedLines
integer
uncheckedLines
integer
byState
object
key
additional properties
integer
byReason
object
key
additional properties
integer
netCandidateVariance
object
key
additional properties
string
withinToleranceVariance
object
key
additional properties
string
basis
string
Allowed value: NET_BEFORE_TAX
noExceptionsClaimable

True only when every line was checked and none is an exception

boolean
changedSinceRun

Inputs changed after a completed run

boolean | null
rerunOfId
string | null format: uuid
error
string | null
createdAt
string format: date-time
completedAt
string | null format: date-time
companyId
null | string
supplierId
null | string
periodFrom
null | string
periodTo
null | string
createdByUserId
null | string
startedAt
null | string

Example

{
"status": "QUEUED",
"summary": {
"basis": "NET_BEFORE_TAX"
}
}

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"
}
}

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"
}
}