Generate a Romanian e-Factura XML
generate_efacturaBuilds a valid RO e-Factura (CIUS-RO 1.0.1, UBL 2.1) invoice XML from simple JSON: seller/buyer (just the CUI is enough: name, address, county code and VAT status are auto-filled from ANAF), lines with quantity, unit price and VAT rate (default 21%; categories S, Z, E, AE reverse charge, K, G, O not subject). Computes line, VAT and grand totals and returns the XML plus ANAF's official validation verdict. Does NOT submit to SPV. Costs 2 credits; not billed on errors.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | ||
| buyer | Yes | ||
| lines | Yes | ||
| number | Yes | Invoice number, e.g. HTR-0001 | |
| seller | Yes | ||
| dueDate | No | ||
| autofill | No | Fill parties from ANAF by CUI (default true) | |
| currency | No | Default RON | |
| issueDate | No | YYYY-MM-DD, default today | |
| paymentTerms | No | ||
| vatToRonRate | No | Required if currency != RON (RON per unit, e.g. BNR rate) |