Convert an e-invoice between syntaxes
convert_invoiceConvert an existing e-invoice between CII, UBL, XRechnung and Peppol BIS syntaxes, or from Factur-X/ZUGFeRD PDF, when you need the same invoice in another format.
Instructions
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.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | 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 EXTENDED-only fields); "ubl" = UBL 2.1 Invoice or CreditNote, EN 16931; "xrechnung-cii" = XRechnung 3.x in CII syntax (German CIUS); "xrechnung-ubl" = XRechnung 3.x in UBL syntax (German CIUS); "peppol-ubl" = Peppol BIS Billing 3.0 (UBL); "ksef-fa3" = Polish KSeF FA(3), PLN domestic invoices only; written and schema-checked, never submitted. | |
| xml | No | The invoice as XML text (CII, UBL Invoice/CreditNote, XRechnung, Peppol BIS). Provide this OR pdfBase64. | |
| pdfBase64 | No | A Factur-X / ZUGFeRD PDF/A-3 as base64; the embedded XML is used. Provide this OR xml. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| xml | Yes | The invoice in the target syntax. | |
| from | Yes | Syntax of the source: cii, ubl-invoice or ubl-credit-note. | |
| format | Yes | The syntax that was written. | |
| warnings | Yes | Non-fatal findings, e.g. data the target requires that the source does not have. |