Preview a correction without saving it (signed-in ANALYST+, not API keys)
const url = 'https://api.invogi.com/v1/invoices/example/correction-preview';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"reason":"example","expected_revision":1,"verified_against_document":true,"fields":{"invoice_number":"example","issue_date":"2026-04-15","due_date":"2026-04-15","currency":"example","net_amount":"example","tax_amount":"example","gross_amount":"example","purchase_order_ref":"example","buyer":{"name":"example","tax_id":"example"},"supplier":{"name":"example","tax_id":"example","company_number":"example","bank_account":{"iban":"example","sort_code":"example","account_number":"example"}},"lines":[{"description":"example","quantity":"example","unit_price":"example","tax_rate":"example","line_net_amount":"example"}]}}'};
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/invoices/example/correction-preview \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "reason": "example", "expected_revision": 1, "verified_against_document": true, "fields": { "invoice_number": "example", "issue_date": "2026-04-15", "due_date": "2026-04-15", "currency": "example", "net_amount": "example", "tax_amount": "example", "gross_amount": "example", "purchase_order_ref": "example", "buyer": { "name": "example", "tax_id": "example" }, "supplier": { "name": "example", "tax_id": "example", "company_number": "example", "bank_account": { "iban": "example", "sort_code": "example", "account_number": "example" } }, "lines": [ { "description": "example", "quantity": "example", "unit_price": "example", "tax_rate": "example", "line_net_amount": "example" } ] } }'Runs the correction in a transaction that is rolled back. Same body and result as PATCH, with preview true; nothing is stored. Where saving would be refused because the caller needs an Admin or Owner, or has not set verified_against_document, the preview still succeeds and lists the reasons in blockers.
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 generated
{ "reason": "example", "expected_revision": 1, "verified_against_document": true, "fields": { "invoice_number": "example", "issue_date": "2026-04-15", "due_date": "2026-04-15", "currency": "example", "net_amount": "example", "tax_amount": "example", "gross_amount": "example", "purchase_order_ref": "example", "buyer": { "name": "example", "tax_id": "example" }, "supplier": { "name": "example", "tax_id": "example", "company_number": "example", "bank_account": { "iban": "example", "sort_code": "example", "account_number": "example" } }, "lines": [ { "description": "example", "quantity": "example", "unit_price": "example", "tax_rate": "example", "line_net_amount": "example" } ] }}Responses
Section titled “Responses”The decision and findings the correction would produce
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" }}