UBL 2.1 XML for e-invoicing: structure, RO_CIUS rules and common errors

In short: RO e-Factura invoices use UBL 2.1 XML localised by the national RO_CIUS specification. The structure is strict: every element has a cardinality, a data type and business rules verified automatically at validation time.

Key capabilities

  • UBL 2.1 structure: Header, parties, invoice lines, taxes and totals, each with clearly defined mandatory elements.
  • RO_CIUS rules: The Romanian localisation adds its own rules on top of the European EN 16931 standard.
  • Automatic validation: XSD schema and Schematron rules run before submission, not after a rejection.
  • Explained error codes: Every ANAF code is translated into an actionable message for the finance team.
  • CII support: The alternative CII syntax is supported for groups that already use it.
  • Versioning: Schema updates are applied centrally, with no change needed in the ERP.

Why local validation changes everything

The reject - fix - resubmit cycle costs time and increases the risk of missing the deadline. Local validation with the same rules ANAF applies moves the fix earlier, while the document is still being prepared.

In practice the finance team sees the error inside the ERP, with the field name and the cause, instead of a technical code inside a manually downloaded XML file.

  • XSD validation for structure
  • Schematron validation for business rules
  • Master data checks against official code lists
  • Reconciliation of totals against invoice lines

Frequently asked questions

What is RO_CIUS?

The national usage specification of the European EN 16931 standard, defining which elements are mandatory in Romania and which extra rules apply.

Can I build the XML manually?

Technically yes, practically no. There are hundreds of rules and every schema change requires updating the generator.

What are the most common errors?

Non-standard units of measure, missing VAT exemption codes, totals that do not reconcile with the lines, wrong country codes and incomplete partner identifiers.

What is the difference between UBL and CII?

Two syntaxes for the same invoice semantics. Both are accepted; UBL is more widely used in Romania.

How do I find out what was wrong in a rejection?

ANAF returns a file listing the broken rules. A good system displays them in plain language, linked to the invoice field.

Related in the e-invoicing cluster