Valinvo

API reference

Every endpoint, request and response of the API, generated from the OpenAPI description. New to the API? Start with the quickstart. How the API changes: change policy.

Valinvo turns one JSON invoice (based on the EN 16931 semantic model) into an XRechnung 3.0.2 (UBL or CII), Peppol BIS Billing 3.0.22 or ZUGFeRD 2.5.2 / Factur-X 1.09.2 (EN 16931 profile; also with the French rules for the French reform) e-invoice, and validates existing e-invoices against the official rule sets.

Terms. The API is for businesses only and is subject to the Terms of Use and the Data Processing Agreement. Without an API key, accept them by sending X-Accept-Terms: 1.0 (the current version) with each request; requests without it get 428 terms_not_accepted. Every /v1/ response links the terms in a Link: <…/terms>; rel="terms-of-service" header. The trial without a key is for testing: use sample data, not real invoices with other people's personal data.

Limits. Without a key: 2 created invoices per day per IP address (validating your own file needs no key), one request at a time, 60 /v1/invoices and 20 /v1/validate requests per minute. Invoice JSON up to 2 MB and 2,000 lines; your own PDF up to 15 MB; documents to validate up to 20 MB and 75,000 XML elements. With an API key: 100 documents per calendar month (UTC) unless agreed otherwise; created and validated documents both count, and X-Quota-Remaining tells you what is left.

Money. Amounts, quantities and VAT rates are JSON strings ("19.99"), never numbers.

Errors. Every error is a JSON ApiError with a stable code; invoice problems list the JSON path, the official rule and the EN 16931 business term. Unknown paths get 404 with not_found.

Endpoints

GET /v1/formats

List supported formats

Every format with its pinned version and status. beta formats can be created; planned ones not yet. Needs no API key and no terms header.

Access: no key and no terms header needed.

GET /v1/status

Service status

The result of the self-test the server runs at start-up: the documented examples go through the whole pipeline once per format. It shows no request counts, no history and no uptime figure. Needs no API key and no terms header.

Access: no key and no terms header needed.

POST /v1/invoices

Create an e-invoice from JSON

Checks the invoice against the EN 16931 rules and the rules of the chosen format, calculates line totals, VAT and totals, generates the document and validates it against the official rule set before returning it. An invoice that fails official validation is never returned (422).

The response is the XML file. Send Accept: application/json to get the document and the full validation report in one JSON object instead.

Your own PDF (ZUGFeRD / Factur-X). For zugferd-en16931 and factur-x-fr you can send the PDF your software already makes and get it back with the invoice XML embedded, so the layout stays yours. Send multipart/form-data with two parts: invoice (the same JSON as above) and pdf (the file, with a file name). The PDF must be a PDF/A without an invoice attachment (PDF/A-3 stays as it is, a PDF/A-1 is upgraded to PDF/A-3, a PDF/A-2 is refused); the result passes the same checks as a PDF we draw ourselves (XML rules, PDF/A-3, metadata). Other formats answer pdf_not_supported. A PDF problem is a 400 that names it: invalid_pdf, pdf_not_pdfa, pdf_has_invoice_attachment, pdf_not_usable, pdf_not_pdfa3.

Access: send an API key (Authorization: Bearer <key>, or X-API-Key: <key>) or the header X-Accept-Terms: 1.0 (or X-Org: 1.0).

Request body: application/json, multipart/form-data

Schema: CreateInvoiceRequest

Example (application/json):

{
    "format": "peppol-bis-ubl",
    "invoice": {
        "number": "F-2026-0815",
        "type": "invoice",
        "issueDate": "2026-10-19",
        "dueDate": "2026-11-18",
        "currency": "EUR",
        "buyerReference": "PO-BE-2231",
        "notes": [
            "Thank you for your business."
        ],
        "seller": {
            "name": "Voorbeeld Software BV",
            "vatId": "BE0456789034",
            "legalRegistrationId": {
                "id": "0456789034",
                "scheme": "0208"
            },
            "electronicAddress": {
                "scheme": "0208",
                "value": "0456789034"
            },
            "address": {
                "line1": "Kunstlaan 10",
                "city": "Brussel",
                "postalCode": "1000",
                "countryCode": "BE"
            },
            "contact": {
                "name": "Sofie Peeters",
                "email": "billing@voorbeeld-software.be"
            }
        },
        "buyer": {
            "name": "Exemple Services SRL",
            "vatId": "BE0765432146",
            "electronicAddress": {
                "scheme": "0208",
                "value": "0765432146"
            },
            "address": {
                "line1": "Rue de la Loi 200",
                "city": "Bruxelles",
                "postalCode": "1040",
                "countryCode": "BE"
            }
        },
        "payment": {
            "meansCode": "30",
            "iban": "BE68539007547034",
            "remittanceInformation": "+++081/2026/08155+++",
            "terms": "Payable within 30 days."
        },
        "lines": [
            {
                "id": "1",
                "name": "Invoicing software subscription, October 2026",
                "quantity": "1",
                "unitCode": "C62",
                "unitPrice": "49.00",
                "vat": {
                    "category": "S",
                    "rate": "21"
                }
            },
            {
                "id": "2",
                "name": "Implementation consulting",
                "quantity": "3",
                "unitCode": "HUR",
                "unitPrice": "95.00",
                "vat": {
                    "category": "S",
                    "rate": "21"
                }
            }
        ],
        "totals": {
            "lineTotal": "334.00",
            "vatTotal": "70.14",
            "amountDue": "404.14"
        }
    }
}

Schema: object

POST /v1/validate

Validate an e-invoice

Validates an e-invoice against the official rules (XML schema and Schematron). Send the XML, or a ZUGFeRD / Factur-X PDF: then the invoice XML embedded in the PDF (factur-x.xml, zugferd-invoice.xml or xrechnung.xml) is checked, plus the PDF itself against PDF/A-3 (veraPDF; rule IDs like PDF/A-3 6.2.11.4.1-1) and its XMP metadata against the XML (profile and attachment name; rule IDs ZF-XMP-…). The ruleSet then names both, e.g. zugferd-2.5.2-en16931+pdf-a-3b. The rule set is detected from the document: XRechnung 3.0 (UBL Invoice, UBL CreditNote, CII), Peppol BIS Billing 3.0 (UBL Invoice, UBL CreditNote), Dutch NLCIUS (SI-UBL 2.0.3.14 Invoice and CreditNote, NLCIUS-CII 1.0.3.14), Romanian CIUS-RO 1.0.9 (UBL Invoice, CreditNote) and ZUGFeRD 2.x / Factur-X in CII with the profiles MINIMUM, BASIC WL, BASIC, EN 16931 and EXTENDED (checked against the ZUGFeRD 2.5.2 rules). French invoices, including EXTENDED-CTC-FR in CII and UBL, also get the French BR-FR rules. An invalid invoice is a normal 200 result with valid: false and the list of errors.

Access: send an API key (Authorization: Bearer <key>, or X-API-Key: <key>) or the header X-Accept-Terms: 1.0 (or X-Org: 1.0).

Request body: application/xml, application/pdf

GET /mcp

Not supported: no event stream

The server opens no streams, so a GET is refused with method_not_allowed and Allow: POST. MCP clients accept this.

Access: no key and no terms header needed.

POST /mcp

Model Context Protocol endpoint (validate_invoice tool)

A Model Context Protocol server over Streamable HTTP, for AI assistants such as Claude Code, Claude Desktop, Cursor or VS Code. It is stateless: send one JSON-RPC 2.0 message (or a batch) per POST and read the JSON answer; there are no sessions and no streams. In tool results, messages that quote text from the document are shortened (values to 80 characters, messages to 400) and the result starts with a notice field saying that this text is data, not instructions. It supports initialize, ping, tools/list and tools/call; every method except tools/call also works without an API key or terms header (so directories and health checks can see the server), while tools/call, which processes a document, answers 428 without one. It offers one read-only tool, validate_invoice, whose xml argument is the invoice XML text. The tool runs the same validation as POST /v1/validate and returns the report as JSON text. No AI model is called and nothing is stored. Callers are handled as on /v1/validate: send a key, or X-Accept-Terms: 1.0. A key's monthly documents count here too; when they are used up, the tool answers with an error result monthly_limit_reached.

Access: send an API key (Authorization: Bearer <key>, or X-API-Key: <key>) or the header X-Accept-Terms: 1.0 (or X-Org: 1.0).

Request body: application/json

Schema: object

Example (application/json):

{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
        "name": "validate_invoice",
        "arguments": {
            "xml": "<Invoice>...</Invoice>"
        }
    }
}

DELETE /mcp

Not supported: no sessions

The server keeps no sessions, so a DELETE is refused with method_not_allowed and Allow: POST.

Access: no key and no terms header needed.

Schemas

Decimal

Money, quantity or rate as a JSON string in plain decimal notation, e.g. "19.99". No exponent, thousands separator or leading +.

Type: string

IsoDate

Calendar date YYYY-MM-DD.

Type: string (date)

CreateInvoiceRequest

Invoice

The canonical invoice. Every field maps to an EN 16931 business term (BT) or group (BG). Unknown fields are rejected.

InvoiceType

BT-3: invoice (380), credit_note (381) or prepayment_invoice (386, down payment; every format except XRechnung, which forbids it: BR-DE-17).

Type: one of invoice, credit_note, prepayment_invoice

TaxCurrency

BT-6 + BT-111: the VAT total in the VAT accounting currency, as your accounting converted it (we never choose an exchange rate). France requires EUR when the invoice currency isn't EUR.

CodedNote

BG-1 An invoice note with its subject code.

InvoiceReference

BG-3 Preceding invoice reference.

Delivery

BG-13 Delivery information.

Period

BG-14 invoicing period or BG-26 line period.

Party

Seller (BG-4) or buyer (BG-7).

Identifier

BT-30 / BT-47 Legal registration identifier.

ElectronicAddress

BT-34 / BT-49 Electronic address. XRechnung accepts email (EM); Peppol needs a Peppol scheme.

Address

BG-5 / BG-8 Postal address.

Contact

BG-6 / BG-9 Contact.

Payment

BG-16 Payment instructions and BT-20 payment terms.

InvoiceLine

BG-25 Invoice line. Line totals are calculated by us.

VatInfo

VatCategory

UNTDID 5305: S standard, Z zero rated, E exempt, AE reverse charge, K intra-community supply, G export outside the EU, O not subject to VAT, L Canary Islands IGIC, M Ceuta and Melilla IPSI.

Type: one of S, Z, E, AE, K, G, O, L, M

LineAllowanceCharge

DocumentAllowanceCharge

VatExemption

Totals

BG-22, optional. We calculate the totals; every value you send must match our calculation.

StatusResponse

FormatsResponse

FormatInfo

FormatStatus

Type: one of planned, beta, available

GeneratedInvoiceResponse

ValidationResponse

The validation report with an optional signed proof.

Proof

A signed statement about one document. Verify signature over the UTF-8 bytes of payload, exactly as sent, with the public key whose keyId is listed at /.well-known/valinvo-proof-keys.json (ProofKeysResponse); then read payload as ProofStatement. It holds a hash, counts and versions, never invoice content, and we store nothing: keep the proof with the document.

ProofStatement

What a proof states; the JSON text in Proof.payload.

ProofKeysResponse

Served at /.well-known/valinvo-proof-keys.json; 404 while the server has no signing key.

ProofKey

ValidationReport

ValidationIssue

Problem

ApiError

Quickstart · XRechnung validator · Peppol validator · ZUGFeRD / Factur-X validator · ZUGFeRD-csharp: your options · XRechnung from PHP or Node.js · XRechnung in Python · XRechnung EndpointID (BT-34, BT-49) · Validate from an AI assistant (MCP) · E-invoicing 2027 for software vendors · Changelog · Security overview · API change policy · API reference · Error codes