Skip to content

Check one invoice document's compliance without adding it to the workspace (ANALYST+)

POST
/compliance-checks
curl --request POST \
--url https://api.invogi.com/v1/compliance-checks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/xml' \
--data binary

Send 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.

string format: binary

Check result

Media typeapplication/json
object
id
required

Identifies this check in the audit log

string format: uuid
sha256
required

SHA-256 of the checked bytes

string
media_type
required
string
format
required

Detected format, e.g. KSEF, XRECHNUNG, PEPPOL_BIS, FACTUR_X, UBL, CII

string | null
outcome
required

FAILED when there is any finding. PASSED covers only what validation.tier ran. NOT_CHECKED when no net and tax amounts could be read.

string
Allowed values: PASSED FAILED NOT_CHECKED
validation
required
object
tier
required

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.

string
Allowed values: REFERENCE KSEF_SCHEMA BUILT_IN NOT_CHECKED
profile
required

Profile checked, e.g. XRECHNUNG, PEPPOL_BIS, EN16931, FACTUR_X, KSEF

string | null
compliance_version
required

Validator and pinned rule-set version

string | null
full_validation_unavailable
required

Why the official rules did not run; null when they did.

string | null
Allowed values: UNSUPPORTED_FORMAT NOT_CONFIGURED
invoice
required

Fields read from the document, as written in it. All null (and line_count 0) when the check was not counted.

object
invoice_number
required
string | null
issue_date
required
string | null
currency
required
string | null
net_amount
required
string | null
tax_amount
required
string | null
gross_amount
required
string | null
supplier_name
required
string | null
line_count
required
integer
findings
required
Array<object>
object
type
required

STRUCTURED_INVOICE_INVALID, EXTRACTION_LOW_CONFIDENCE or CURRENCY_UNKNOWN

string
severity
required
string
Allowed values: INFO LOW MEDIUM HIGH CRITICAL
summary
required
string
recommended_action
required
string | null
violations
required
Array<object>
object
rule_code
required

Rule identifier such as BR-CO-13; null for schema diagnostics

string | null
severity
required
string | null
message
required
string
location
required

Where in the document the rule failed

string | null
fields
required
Array<string>
usage
required
object
invoice_units
required

Invoice units this check counted

integer

Example

{
"outcome": "PASSED",
"validation": {
"tier": "REFERENCE",
"full_validation_unavailable": "UNSUPPORTED_FORMAT"
},
"findings": [
{
"severity": "INFO"
}
]
}

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

Example

{
"error": {
"code": "NOT_FOUND"
}
}

Missing or invalid API key

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

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

Example

{
"error": {
"code": "NOT_FOUND"
}
}

RATE_LIMITED, or USAGE_LIMIT_EXCEEDED when the plan’s invoice allowance or overage limit is used up