Validate an existing invoice XML file (UBL or CII)
validate_invoice_xmlValidate an e-invoice FILE the user already has, in either EN 16931 syntax and of either document type. Reads a UBL 2.1 Invoice, a UBL 2.1 CreditNote or a UN/CEFACT CII CrossIndustryInvoice (which carries invoices and credit notes alike) into the invoice model and runs EN 16931 plus the CIUS rules (XRechnung UBL and CII, Peppol BIS 3) over it, returning the same teaching errors as validate_invoice, plus which syntax it read, the document's BT-24/BT-23 and a list of everything in the file that did not reach the model. Use it when someone says "this invoice was rejected, why?" and hands you a file. Send the file as-is; do not work out the syntax or the document type first, because the tool decides both from the root element and reports what it found in syntax and in the invoice model's BT-3. XML ONLY, NOT A PDF: Factur-X and ZUGFeRD are CII XML inside a PDF/A-3 container, and this tool cannot open the container — extract the XML and send that. A PDF is refused with an explanation; do not retry it. A credit note is NOT refused — send it exactly like an invoice. It is a pre-flight, not an authority: a file that passes here can still be rejected by KoSIT or by a receiving platform. REQUIRES AN API KEY and costs 1 document.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| xml | Yes | The complete document, as text — the file contents, not a path. Its root element must be <Invoice> in the UBL Invoice-2 namespace, <CreditNote> in the UBL CreditNote-2 namespace, or <CrossIndustryInvoice> in the UN/CEFACT CII namespace. Not the bytes of a PDF. |