Create and analyze a canonical invoice
const url = 'https://api.invogi.com/v1/invoices';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"supplier":{"name":"example","tax_id":"example","company_number":"example","bank_account":{"iban":"example","sort_code":"60-16-13","account_number":"31926819"}},"invoice_number":"example","issue_date":"2026-04-15","due_date":"2026-04-15","currency":"GBP","net_amount":"example","tax_amount":"example","gross_amount":"example","purchase_order_ref":"example","site_reference":"example","buyer":{"name":"example","tax_id":"example"},"company_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","external_id":"example","lines":[{"description":"example","quantity":"example","unit_price":"example","tax_rate":"example","line_net_amount":"example"}],"buyer_reference":"example","compliance_profile":"EN16931"}'};
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 \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "supplier": { "name": "example", "tax_id": "example", "company_number": "example", "bank_account": { "iban": "example", "sort_code": "60-16-13", "account_number": "31926819" } }, "invoice_number": "example", "issue_date": "2026-04-15", "due_date": "2026-04-15", "currency": "GBP", "net_amount": "example", "tax_amount": "example", "gross_amount": "example", "purchase_order_ref": "example", "site_reference": "example", "buyer": { "name": "example", "tax_id": "example" }, "company_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "external_id": "example", "lines": [ { "description": "example", "quantity": "example", "unit_price": "example", "tax_rate": "example", "line_net_amount": "example" } ], "buyer_reference": "example", "compliance_profile": "EN16931" }'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
object
UK Companies House number (8 characters, or fewer digits that are zero-padded). Anything that is not a company number is refused with 400; a well-formed number beside a VAT number from another country is ignored. When the organization has a Companies House key it is checked against the register: unknown numbers and dissolved or insolvent companies raise findings. Never inferred from the supplier name.
IBAN, or a UK domestic account as sort_code plus account_number (both required together). A GB IBAN and its sort code + account number are treated as the same account.
object
Six-digit UK sort code; “-” and spaces are ignored
Example
60-16-13Six- to eight-digit UK account number
Example
31926819ISO 4217 alphabetic currency code, case-insensitive and stored upper-case. A code that is not a currency suppliers invoice in (including XXX, funds and precious-metal codes) is rejected with INVALID_REQUEST. Invoices whose currency cannot be read from an uploaded document are stored with the ISO placeholder XXX and raise a CURRENCY_UNKNOWN finding.
Example
GBPThe site, store, property, or location the invoice is for, as the customer names it.
Invoice recipient (EN 16931 BG-7). tax_id routes the invoice to the company with that VAT ID when company_id is omitted.
object
One of the organization’s companies (GET /companies); defaults to the default company
Caller-owned external reference; does not replace the Idempotency-Key header.
object
Optional Invogi compliance profile used for this analysis.
Responses
Section titled “Responses”Accepted
object
object
object
object
Example
{ "status": "ANALYZING", "decision": "PASS", "findings": [ { "severity": "INFO", "policyAction": "REVIEW" } ]}Invalid request
Missing or invalid API key
Conflicting idempotency key or resource processing state