Correct invoice data and re-analyse it (signed-in ANALYST+, not API keys)
const url = 'https://api.invogi.com/v1/invoices/example';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"reason":"OCR read 1190.00 instead of 1190.50","expected_revision":1,"fields":{"gross_amount":"1190.50","invoice_number":"INV-2026-0042"}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://api.invogi.com/v1/invoices/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "reason": "OCR read 1190.00 instead of 1190.50", "expected_revision": 1, "fields": { "gross_amount": "1190.50", "invoice_number": "INV-2026-0042" } }'For data the extraction got wrong. The invoice is re-analysed in full as
a new revision; earlier revisions, runs, decisions and findings are kept.
Findings of earlier analyses become SUPERSEDED and can no longer be
reviewed. Only the keys present in fields change; a nullable field is
cleared with null, and lines replaces the whole list.
Made by a signed-in user: API keys are refused with FORBIDDEN.
Analysts can correct the invoice’s own values; changing supplier
(including its bank account) needs an Admin or Owner. A correction that
would clear a finding is an override and needs an Admin or Owner,
except that an analyst may clear data-quality findings
(EXTRACTION_LOW_CONFIDENCE, INVALID_TOTALS, CURRENCY_UNKNOWN,
STRUCTURED_INVOICE_INVALID) on an invoice that has its source
document, with verified_against_document set.
Rejected with CONFLICT when a payment references the invoice, it was
submitted to KSeF, a financial outcome is recorded for it, one of its
findings is CONFIRMED, expected_revision is not the current
revision, or the invoice has reached its revision limit (19 corrections
for analysts, more for Admins and Owners). Duplicate and anomaly checks
also look at every supplier the invoice has been matched to, and an
account the invoice was flagged for stays flagged on it until it is
verified with the supplier, however the data is edited.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”object
The revision the caller was looking at; a different current revision is a CONFLICT
The person compared the corrected values with the invoice’s source document. Required for an analyst to clear data-quality findings; recorded on the revision
object
ISO 4217
Decimal string
Decimal string
Decimal string
object
object
UK Companies House number. Setting it re-checks the corrected number against the register.
object
Replaces the whole line list
object
Example
{ "reason": "OCR read 1190.00 instead of 1190.50", "expected_revision": 1, "fields": { "gross_amount": "1190.50", "invoice_number": "INV-2026-0042" }}Responses
Section titled “Responses”Corrected and re-analysed
object
Findings of earlier analyses that this correction replaced
Findings the correction clears, as TYPE or TYPE (of N invoices) for findings that point at other invoices
Findings the corrected data raises that the invoice did not have
What stops the caller from saving this correction. Only a preview returns blockers (saving refuses with the first one instead). Empty when saving would succeed.
object
object
object
Example
{ "decision": "PASS", "previous_decision": "PASS", "blockers": [ { "kind": "ADMIN_REQUIRED" } ]}Invalid request
object
object
Example
{ "error": { "code": "NOT_FOUND" }}Missing or invalid API key
object
object
Example
{ "error": { "code": "NOT_FOUND" }}API key lacks required scope/role
object
object
Example
{ "error": { "code": "NOT_FOUND" }}Resource not found
object
object
Example
{ "error": { "code": "NOT_FOUND" }}Conflicting idempotency key or resource processing state
object
object
Example
{ "error": { "code": "NOT_FOUND" }}