Convert an e-invoice between UBL and CII
convert_invoiceConvert an e-invoice to UBL or CII. The result is checked before it is returned.
Input: invoice_base64 is the base64 of an XML invoice or a ZUGFeRD /
Factur-X PDF, at most 4 MB decoded; or pass the file as a download link in
file. target_syntax is "ubl" or "cii". target_flavor is optional,
"en16931" or "xrechnung"; without it the flavor of the source is kept.
Returns xml, syntax, flavor and self_validation (valid,
finding_count). invowerk checks the converted XML before answering and never
returns an invalid document. Input that cannot be read or converted fails with
an error message.
Credits: 3 per call.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | No | The file as a download link, instead of `invoice_base64`. In ChatGPT, pass the user's uploaded file here. Other clients can set `download_url` to a public https URL. | |
| target_flavor | No | Optional: "en16931" or "xrechnung". Without it the flavor of the source is kept. | |
| target_syntax | Yes | Syntax to convert to: "ubl" or "cii". | |
| invoice_base64 | No | The invoice file, base64-encoded. At most 4 MB decoded. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||