Conformo e-invoicing
v0.2.5Create and check EU e-invoices (XRechnung, ZUGFeRD, Factur-X, Peppol) locally.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
create_invoice Create an e-invoice (XML)
Builds e-invoice XML from structured invoice data: EN 16931 CII or UBL, XRechnung (CII or UBL) or Peppol BIS Billing 3.0, chosen by `format`. Use it for a new invoice that software will read. For a printable PDF with the XML inside, use create_invoice_pdf; to change the syntax of an invoice you already have, use convert_invoice. Pass `invoice` as a JSON object, not a string. Every money field ends in "Minor" and is an integer in minor units (EUR 12.34 = 1234); totals and the VAT breakdown are computed, so do not send them. If fields are missing or wrong it returns an error listing every proble…
create_invoice_pdf Create a Factur-X / ZUGFeRD PDF
Builds a Factur-X / ZUGFeRD invoice: a PDF/A-3b page a person can read, with the EN 16931 XML embedded for software. Use it when the invoice goes to a person or by e-mail. For XML only, such as an XRechnung uploaded to a German public-sector portal, use create_invoice. Takes the same `invoice` object as create_invoice, money in integer minor units. `language` changes only the printed labels; the embedded XML is identical in every language. By default the PDF comes back as base64, which can be large; pass `outputPath` to write the file instead. Writing stays inside the server's working director…
validate_invoice Validate an e-invoice
Checks an e-invoice against the official rule sets on this machine: the XSD, the EN 16931 Schematron from CEN, and the KoSIT XRechnung or Peppol BIS rules when the document declares them. Use it before sending an invoice you created and when you receive one. To read the invoice's data use parse_invoice; to explain one failed rule in depth use explain_validation_rule. Accepts XML or a Factur-X / ZUGFeRD PDF, whose embedded XML is checked; syntax and profile are detected from the document. A `valid` result means the listed `ruleSets` passed, not that a tax authority or buyer will accept the invo…
| Parameter | Type | Description |
|---|---|---|
country | string | Add a country layer: "FR" runs the French CTC rules (CII only); "DE" reports whether the profile is acceptable for German B2B (MINIMUM and BASIC WL are not). |
pdfBase64 | string | A Factur-X / ZUGFeRD PDF/A-3 as base64; the embedded XML is used. Provide this OR xml. |
profile | string | Force the rule set instead of reading it from BT-24. |
xml | string | The invoice as XML text (CII, UBL Invoice/CreditNote, XRechnung, Peppol BIS). Provide this OR pdfBase64. |
xsd | boolean | Run XSD validation too. Default true. |
convert_invoice Convert an e-invoice between syntaxes
Rewrites an existing e-invoice in another syntax, for example CII to UBL, or plain EN 16931 to XRechnung or Peppol BIS. Use it when you already hold an invoice document. To build one from data use create_invoice; to get a PDF from XML use parse_invoice, then create_invoice_pdf. Accepts XML or a Factur-X / ZUGFeRD PDF. Nothing is invented: a target such as XRechnung may need data the source lacks, so read `warnings` and run validate_invoice on the result. A document it cannot read comes back as an error result with the reason. Runs locally; nothing is sent anywhere.
| Parameter | Type | Description |
|---|---|---|
to * | string | Output syntax. "cii" = UN/CEFACT CII, EN 16931 (Factur-X / ZUGFeRD EN 16931 profile, a.k.a. COMFORT); "cii-extended" = UN/CEFACT CII declared as Factur-X / ZUGFeRD EXTENDED (EN 16931 content only; no… |
pdfBase64 | string | A Factur-X / ZUGFeRD PDF/A-3 as base64; the embedded XML is used. Provide this OR xml. |
xml | string | The invoice as XML text (CII, UBL Invoice/CreditNote, XRechnung, Peppol BIS). Provide this OR pdfBase64. |
parse_invoice Parse an e-invoice into JSON
Reads an e-invoice (CII, UBL, XRechnung or Peppol XML, or a Factur-X / ZUGFeRD PDF) into the structured invoice object that create_invoice accepts, with money in integer minor units. Use it to answer questions about a received invoice, to edit one, or to re-issue it with create_invoice. It does not check any rules, so use validate_invoice for that, and convert_invoice to change syntax directly. For a PDF, `visibleTotals` shows whether the totals printed on the page match the embedded XML, which exposes a tampered or mismatched PDF. A document it cannot read comes back as an error result with t…
| Parameter | Type | Description |
|---|---|---|
pdfBase64 | string | A Factur-X / ZUGFeRD PDF/A-3 as base64; the embedded XML is used. Provide this OR xml. |
xml | string | The invoice as XML text (CII, UBL Invoice/CreditNote, XRechnung, Peppol BIS). Provide this OR pdfBase64. |
get_country_requirements E-invoicing requirements for a country
Looks up the e-invoicing rules for one country in a sourced dataset: B2G and B2B mandates for issuing and receiving, start dates, turnover thresholds, required formats and official sources. Use it before create_invoice to decide which format a buyer in that country needs, or to answer when a mandate applies. It says nothing about a specific invoice; use validate_invoice to check one. Covers BE, DE, ES, FR, IT, NL, PL. `conformoSupport` says per format whether this server can create, read and validate it. Entries marked unverified are not confirmed from an official source; say so. Information,…
| Parameter | Type | Description |
|---|---|---|
country * | string | ISO 3166-1 alpha-2 country code, e.g. DE, FR. |
explain_validation_rule Explain a validation rule
Explains one validation rule id, such as BR-CO-15, BR-DE-15, PEPPOL-EN16931-R003 or BR-FR-05: the publisher's official wording from the compiled rule sets and, where available, a plain-language summary, the reason for the rule and how to fix it. Use it after validate_invoice reports a rule you need to explain or fix, or when a user asks what a rule means. It does not check an invoice; call validate_invoice for that. An unknown id is not an error: the result has `found` false and an empty `official` list; say so and do not guess. Reads the bundled rule sets; no network.
| Parameter | Type | Description |
|---|---|---|
ruleId * | string | The rule id, e.g. BR-CO-15. |