Skip to navigation

Validate invoice data

Validate invoice data against country-specific rules and e-invoice format requirements. Generates every e-invoice format the country supports and checks the resulting XML against its official XSD + Schematron (ebInterface 6.1: rules derived from the official documentation, there is no official Schematron). validation carries the format verdict: status: not_run with reason: missing when we have no pinned rulebook for a format (valid: null, never true). Billed like generation: 1 unit per checked format, charged on that format’s create entitlement. Formats the key holds no entitlement for are not checked and appear in results[] with skipped: "not entitled". If the remaining quota does not cover all checked formats the call is rejected with 429 and nothing is checked.

Authentication

AuthorizationBearer

API Key authentication. Use sk_live_* for production or sk_test_* for testing.

Path parameters

countryCodeenumRequired

ISO 3166-1 alpha-2 country code (lowercase). Determines country-specific validation and available e-invoice formats. Supported countries (37): ae, at, au, be, bg, ch, cy, cz, de, dk, ee, es, fi, fr, gb, gr, hr, hu, ie, is, it, jp, li, lt, lu, lv, mt, nl, no, nz, om, pl, pt, ro, se, si, sk.

Request

This endpoint expects an object.
invoiceobjectRequired
Invoice data to validate
enforcePendingbooleanOptional

Reject findings that are still in their warning phase, as /generate does. A new check of the input data (for example BUYER_COUNTRY_REQUIRED on a small invoice whose recipient exemption does not apply) first comes for at least 28 days as a warning plus SPEC_RULE_PENDING with enforceFrom, and valid stays true. true switches that phase off for this call: the finding is an error right away. Omitted or false: warning phase on.

Response

Validation result
validboolean

Input-data verdict: the country rules applied to the invoice object (required fields, totals, VAT IDs). This is NOT format conformance — an invoice can be valid here while a format in results[] fails XSD or Schematron (e.g. BR-DE-2 seller contact). Gate a send on valid AND every results[].valid. false also when the invoice issue date (BT-2, issueDate) is missing or blank (SPEC_RULE_FAILED, rule BR-03, field issueDate) or is not a readable calendar date (INVOICE_DATE_NOT_XS_DATE at field issueDate, the sent value quoted in message); the response status stays 200.

errorslist of objectsOptional
Validation errors
warningslist of objectsOptional

Validation warnings. FIELD_TOO_LONG: a seller or buyer address field, a state, projectNumber or the attachments exceed their limit (field, maximum). INVOICE_LINES_ABOVE_MODE_LIMIT: more lines including sub-items (count) than this server accepts (limit). Both are in their warning phase; a later release rejects them with 400. CURRENCY_CODE_UNKNOWN (/api/v1; field: currency): currency is not an ISO 4217 code; /api/v2 rejects it with 400 INVALID_CURRENCY.

resultslist of objectsOptional

Per-format validation results — the generated XML validated against its XSD + Schematron. For ZUGFeRD/Factur-X this includes every profile. Each checked format is billed as one unit on that format’s create entitlement; formats the key is not entitled for carry skipped: "not entitled" and were not checked.

validationobjectOptional

Format verdict over the checked formats in results[] (not the skipped ones): status passed, failed or not_run. not_run with reason: missing means we have no pinned rulebook for a format, so it was not checked against its business rules; valid is then null, never true. Absent when no format was checked.

Errors

400
Bad Request Error
401
Unauthorized Error
413
Content Too Large Error
429
Too Many Requests Error
500
Internal Server Error
503
Service Unavailable Error