Check one invoice document's compliance without adding it to the workspace (ANALYST+)
const url = 'https://api.invogi.com/v1/compliance-checks';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/xml'}, body: 'binary'};
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/compliance-checks \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/xml' \ --data binarySend the raw file as the request body with its media type as Content-Type. The document is extracted and validated, and the result is returned; no invoice, analysis run or decision is created, the file is not stored, and the same document can be checked again. Requires an active subscription and the ANALYST role or higher (403 otherwise). KSeF invoices are validated against the official FA(3) schema, and XRechnung, Factur-X/ZUGFeRD, Peppol BIS and plain UBL/CII against the official rules. Other documents get the built-in checks only, with validation.full_validation_unavailable saying why. A built-in pass is not a statement of conformance. Each check counts as one invoice unit (plus its pages for PDFs and images), exactly like an uploaded invoice. A refused document is not counted, and neither is one nothing could be checked on (validation.tier NOT_CHECKED) unless reading it used external document processing; usage.invoice_units is then 0.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Responses
Section titled “Responses”Check result
object
Identifies this check in the audit log
SHA-256 of the checked bytes
Detected format, e.g. KSEF, XRECHNUNG, PEPPOL_BIS, FACTUR_X, UBL, CII
FAILED when there is any finding. PASSED covers only what validation.tier ran. NOT_CHECKED when no net and tax amounts could be read.
object
REFERENCE and KSEF_SCHEMA ran the official rules or schema. BUILT_IN is a subset of required-field and total checks, not a conformance check.
Profile checked, e.g. XRECHNUNG, PEPPOL_BIS, EN16931, FACTUR_X, KSEF
Validator and pinned rule-set version
Why the official rules did not run; null when they did.
Fields read from the document, as written in it. All null (and line_count 0) when the check was not counted.
object
object
STRUCTURED_INVOICE_INVALID, EXTRACTION_LOW_CONFIDENCE or CURRENCY_UNKNOWN
object
Rule identifier such as BR-CO-13; null for schema diagnostics
Where in the document the rule failed
object
Invoice units this check counted
Example
{ "outcome": "PASSED", "validation": { "tier": "REFERENCE", "full_validation_unavailable": "UNSUPPORTED_FORMAT" }, "findings": [ { "severity": "INFO" } ]}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" }}RATE_LIMITED, or USAGE_LIMIT_EXCEEDED when the plan’s invoice allowance or overage limit is used up