convert_invoice
Convert an e-invoice between formats via the shared EN 16931 canonical model: parse the source document, re-serialize as the target, and validate the result before returning it — never a document that has not been checked. Format ids: "UBL_2.1" (OASIS UBL, the universal Peppol/EN16931 baseline), "UN_CEFACT_CII" (UN/CEFACT Cross Industry Invoice, required syntax for Chorus Pro/France and many ERP back-ends), "XRechnung_UBL" / "XRechnung_CII" (Germany's mandatory B2G format, XRechnung 3.0 — required for invoicing German public-sector buyers), "Factur-X" (France/Germany hybrid PDF+XML — a human-readable PDF/A-3 with the structured invoice embedded, common for French B2B). Binary formats (Factur-X) are base64 in both directions. Requires an API key on the Pro plan or above for any target beyond plain UBL_2.1 — call list_supported_formats to see current availability.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | Target format id, e.g. "UN_CEFACT_CII", "XRechnung_UBL", "XRechnung_CII", or "Factur-X". | |
| from | Yes | Source format id, e.g. "UBL_2.1". | |
| document | Yes | The source document: raw text for XML formats, base64 for binary formats (Factur-X). |