UBL → CII
Converts a CIUS-RO invoice (UBL 2.1) into UN/CEFACT CII, the format partners in other countries ask for. The conversion keeps the reference to the preceding invoice, so a credit note can also make the trip back.
Request body
The request body is the whole document, sent raw (Content-Type: application/xml) — not an object with fields.
Query parameters
xml (default) or base64.
e.g. base64
How it behaves
- The document can also be sent as a file:
multipart/form-datawith thefisierfield (curl -F fisier=@document.xml), instead of the raw body. The file content becomes the request body, so the result is identical; options stay in the query string, and any other form field next tofisierreturns422 camp_necunoscut. - Takes a CIUS-RO invoice in UBL 2.1 (root
InvoiceorCreditNote) and converts it to UN/CEFACT CII (Cross Industry Invoice), on the EN16931 core — the e-invoice format used in France (Factur-X), Germany (ZUGFeRD) and across many EU B2B exchanges. - The core fields are mapped: number, dates, parties (seller/buyer with address, company id, VAT id), lines (product, price, quantity, VAT) and the per-category VAT totals. Amounts are taken from the source UBL (authoritative), with no recomputation.
- Zero retention. The XML received is not written to disk, not logged, and never enters cache keys.
What it is for
- Sending a Romanian invoice to a European partner that expects CII / Factur-X.
- Feeding a system that only consumes UN/CEFACT CII, starting from e-Factura.
Response structure
CII.
format.
Response examples
body: @efactura.xml
{
"data": {
"standard": "CII",
"schema": "urn:un:unece:uncefact:data:standard:CrossIndustryInvoice: 100",
"guideline": "urn:cen.eu:en16931: 2017",
"xml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<rsm:CrossIndustryInvoice xmlns:rsm=\"urn:un:unece:uncefact:data:standard:CrossIndustryInvoice: 100\" xmlns:ram=\"urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity: 100\" xmlns:udt=\"urn:un:unece:uncefact:data:standard:UnqualifiedDataType: 100\" xmlns:qdt=\"urn:un:unece:uncefact:data:standard:QualifiedDataType: 100\">\n <rsm:ExchangedDocumentContext>\n <ram:GuidelineSpecifiedDocumentContextParameter>\n <ram:ID>urn:cen.eu:en16931: 2017</ram:ID>\n </ram:GuidelineSpecifiedDocumentContextParameter>\n </rsm:ExchangedDocumentContext>\n <rsm:ExchangedDocument>\n <ram:ID>FCT-2026-0142</ram:ID>\n <ram:TypeCode>380</ram:TypeCode>\n <ram:IssueDateTime>\n <udt:DateTimeString format=\"102\">20260910</udt:DateTimeString>\n </ram:IssueDateTime>\n </rsm:ExchangedDocument>\n <rsm:SupplyChainTradeTransaction>\n <ram:IncludedSupplyChainTradeLineItem>\n <ram:AssociatedDocumentLineDocument>\n <ram:LineID>1</ram:LineID>\n </ram:AssociatedDocumentLineDocument>\n <ram:SpecifiedTradeProduct>\n <ram:Name>Servicii de consultanţă</ram:Name>\n </ram:SpecifiedTradeProduct>\n <ram:SpecifiedLineTradeAgreement>\n <ram:NetPriceProductTradePrice>\n <ram:ChargeAmount>100.00</ram:ChargeAmount>\n </ram:NetPriceProductTradePrice>\n </ram:SpecifiedLineTradeAgreement>\n <ram:SpecifiedLineTradeDelivery>\n <ram:BilledQuantity unitCode=\"H87\">2</ram:BilledQuantity>\n </ram:SpecifiedLineTradeDelivery>\n <ram:SpecifiedLineTradeSettlement>\n <ram:ApplicableTradeTax>\n <ram:TypeCode>VAT</ram:TypeCode>\n <ram:CategoryCode>S</ram:CategoryCode>\n <ram:RateApplicablePercent>21</ram:RateApplicablePercent>\n </ram:ApplicableTradeTax>\n <ram:SpecifiedTradeSettlementLineMonetarySummation>\n <ram:LineTotalAmount>200.00</ram:LineTotalAmount>\n </ram:SpecifiedTradeSettlementLineMonetarySummation>\n </ram:SpecifiedLineTradeSettlement>\n </ram:IncludedSupplyChainTradeLineItem>\n <ram:IncludedSupplyChainTradeLineItem>\n <ram:AssociatedDocumentLineDocument>\n <ram:LineID>2</ram:LineID>\n </ram:AssociatedDocumentLineDocument>\n <ram:SpecifiedTradeProduct>\n <ram:Name>Licenţă software anuală</ram:Name>\n </ram:SpecifiedTradeProduct>\n <ram:SpecifiedLineTradeAgreement>\n <ram:NetPriceProductTradePrice>\n <ram:ChargeAmount>500.00</ram:ChargeAmount>\n </ram:NetPriceProductTradePrice>\n </ram:SpecifiedLineTradeAgreement>\n <ram:SpecifiedLineTradeDelivery>\n <ram:BilledQuantity unitCode=\"H87\">1</ram:BilledQuantity>\n </ram:SpecifiedLineTradeDelivery>\n <ram:SpecifiedLineTradeSettlement>\n <ram:ApplicableTradeTax>\n <ram:TypeCode>VAT</ram:TypeCode>\n <ram:CategoryCode>S</ram:CategoryCode>\n <ram:RateApplicablePercent>21</ram:RateApplicablePercent>\n </ram:ApplicableTradeTax>\n <ram:SpecifiedTradeSettlementLineMonetarySummation>\n <ram:LineTotalAmount>500.00</ram:LineTotalAmount>\n </ram:SpecifiedTradeSettlementLineMonetarySummation>\n </ram:SpecifiedLineTradeSettlement>\n </ram:IncludedSupplyChainTradeLineItem>\n <ram:ApplicableHeaderTradeAgreement>\n <ram:SellerTradeParty>\n <ram:Name>Exemplu Furnizor SRL</ram:Name>\n <ram:PostalTradeAddress>\n <ram:LineOne>Str. Memorandumului 28</ram:LineOne>\n <ram:CityName>Cluj-Napoca</ram:CityName>\n <ram:CountryID>RO</ram:CountryID>\n <ram:CountrySubDivisionName>RO-CJ</ram:CountrySubDivisionName>\n </ram:PostalTradeAddress>\n <ram:SpecifiedTaxRegistration>\n <ram:ID schemeID=\"VA\">RO990000005</ram:ID>\n </ram:SpecifiedTaxRegistration>\n </ram:SellerTradeParty>\n <ram:BuyerTradeParty>\n <ram:Name>Exemplu Client SRL</ram:Name>\n <ram:PostalTradeAddress>\n <ram:LineOne>Calea Victoriei 1</ram:LineOne>\n <ram:CityName>SECTOR1</ram:CityName>\n <ram:CountryID>RO</ram:CountryID>\n <ram:CountrySubDivisionName>RO-B</ram:CountrySubDivisionName>\n </ram:PostalTradeAddress>\n <ram:SpecifiedTaxRegistration>\n <ram:ID schemeID=\"VA\">RO990000072</ram:ID>\n </ram:SpecifiedTaxRegistration>\n </ram:BuyerTradeParty>\n </ram:ApplicableHeaderTradeAgreement>\n <ram:ApplicableHeaderTradeDelivery/>\n <ram:ApplicableHeaderTradeSettlement>\n <ram:InvoiceCurrencyCode>RON</ram:InvoiceCurrencyCode>\n <ram:ApplicableTradeTax>\n <ram:CalculatedAmount>147.00</ram:CalculatedAmount>\n <ram:TypeCode>VAT</ram:TypeCode>\n <ram:BasisAmount>700.00</ram:BasisAmount>\n <ram:CategoryCode>S</ram:CategoryCode>\n <ram:RateApplicablePercent>21</ram:RateApplicablePercent>\n </ram:ApplicableTradeTax>\n <ram:SpecifiedTradePaymentTerms>\n <ram:DueDateDateTime>\n <udt:DateTimeString format=\"102\">20261010</udt:DateTimeString>\n </ram:DueDateDateTime>\n </ram:SpecifiedTradePaymentTerms>\n <ram:SpecifiedTradeSettlementHeaderMonetarySummation>\n <ram:LineTotalAmount>700.00</ram:LineTotalAmount>\n <ram:TaxBasisTotalAmount>700.00</ram:TaxBasisTotalAmount>\n <ram:TaxTotalAmount currencyID=\"RON\">147.00</ram:TaxTotalAmount>\n <ram:GrandTotalAmount>847.00</ram:GrandTotalAmount>\n <ram:DuePayableAmount>847.00</ram:DuePayableAmount>\n </ram:SpecifiedTradeSettlementHeaderMonetarySummation>\n </ram:ApplicableHeaderTradeSettlement>\n </rsm:SupplyChainTradeTransaction>\n</rsm:CrossIndustryInvoice>\n"
},
"meta": {
"generat_la": "2026-10-06T23: 59: 44+03: 00"
}
}
body: @efactura-stornare.xml
{
"data": {
"standard": "CII",
"schema": "urn:un:unece:uncefact:data:standard:CrossIndustryInvoice: 100",
"guideline": "urn:cen.eu:en16931: 2017",
"xml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<rsm:CrossIndustryInvoice xmlns:rsm=\"urn:un:unece:uncefact:data:standard:CrossIndustryInvoice: 100\" xmlns:ram=\"urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity: 100\" xmlns:udt=\"urn:un:unece:uncefact:data:standard:UnqualifiedDataType: 100\" xmlns:qdt=\"urn:un:unece:uncefact:data:standard:QualifiedDataType: 100\">\n <rsm:ExchangedDocumentContext>\n <ram:GuidelineSpecifiedDocumentContextParameter>\n <ram:ID>urn:cen.eu:en16931: 2017</ram:ID>\n </ram:GuidelineSpecifiedDocumentContextParameter>\n </rsm:ExchangedDocumentContext>\n <rsm:ExchangedDocument>\n <ram:ID>STN-2026-0007</ram:ID>\n <ram:TypeCode>381</ram:TypeCode>\n <ram:IssueDateTime>\n <udt:DateTimeString format=\"102\">20260920</udt:DateTimeString>\n </ram:IssueDateTime>\n </rsm:ExchangedDocument>\n <rsm:SupplyChainTradeTransaction>\n <ram:IncludedSupplyChainTradeLineItem>\n <ram:AssociatedDocumentLineDocument>\n <ram:LineID>1</ram:LineID>\n </ram:AssociatedDocumentLineDocument>\n <ram:SpecifiedTradeProduct>\n <ram:Name>Stornare servicii de consultanta</ram:Name>\n </ram:SpecifiedTradeProduct>\n <ram:SpecifiedLineTradeAgreement>\n <ram:NetPriceProductTradePrice>\n <ram:ChargeAmount>200.00</ram:ChargeAmount>\n </ram:NetPriceProductTradePrice>\n </ram:SpecifiedLineTradeAgreement>\n <ram:SpecifiedLineTradeDelivery>\n <ram:BilledQuantity unitCode=\"H87\">1</ram:BilledQuantity>\n </ram:SpecifiedLineTradeDelivery>\n <ram:SpecifiedLineTradeSettlement>\n <ram:ApplicableTradeTax>\n <ram:TypeCode>VAT</ram:TypeCode>\n <ram:CategoryCode>S</ram:CategoryCode>\n <ram:RateApplicablePercent>21</ram:RateApplicablePercent>\n </ram:ApplicableTradeTax>\n <ram:SpecifiedTradeSettlementLineMonetarySummation>\n <ram:LineTotalAmount>200.00</ram:LineTotalAmount>\n </ram:SpecifiedTradeSettlementLineMonetarySummation>\n </ram:SpecifiedLineTradeSettlement>\n </ram:IncludedSupplyChainTradeLineItem>\n <ram:ApplicableHeaderTradeAgreement>\n <ram:SellerTradeParty>\n <ram:Name>Exemplu Furnizor SRL</ram:Name>\n <ram:PostalTradeAddress>\n <ram:LineOne>Str. Memorandumului 28</ram:LineOne>\n <ram:CityName>Cluj-Napoca</ram:CityName>\n <ram:CountryID>RO</ram:CountryID>\n <ram:CountrySubDivisionName>RO-CJ</ram:CountrySubDivisionName>\n </ram:PostalTradeAddress>\n <ram:SpecifiedTaxRegistration>\n <ram:ID schemeID=\"VA\">RO990000005</ram:ID>\n </ram:SpecifiedTaxRegistration>\n </ram:SellerTradeParty>\n <ram:BuyerTradeParty>\n <ram:Name>Exemplu Client SRL</ram:Name>\n <ram:PostalTradeAddress>\n <ram:LineOne>Calea Victoriei 1</ram:LineOne>\n <ram:CityName>SECTOR1</ram:CityName>\n <ram:CountryID>RO</ram:CountryID>\n <ram:CountrySubDivisionName>RO-B</ram:CountrySubDivisionName>\n </ram:PostalTradeAddress>\n <ram:SpecifiedTaxRegistration>\n <ram:ID schemeID=\"VA\">RO990000072</ram:ID>\n </ram:SpecifiedTaxRegistration>\n </ram:BuyerTradeParty>\n </ram:ApplicableHeaderTradeAgreement>\n <ram:ApplicableHeaderTradeDelivery/>\n <ram:ApplicableHeaderTradeSettlement>\n <ram:InvoiceCurrencyCode>RON</ram:InvoiceCurrencyCode>\n <ram:ApplicableTradeTax>\n <ram:CalculatedAmount>42.00</ram:CalculatedAmount>\n <ram:TypeCode>VAT</ram:TypeCode>\n <ram:BasisAmount>200.00</ram:BasisAmount>\n <ram:CategoryCode>S</ram:CategoryCode>\n <ram:RateApplicablePercent>21</ram:RateApplicablePercent>\n </ram:ApplicableTradeTax>\n <ram:SpecifiedTradeSettlementHeaderMonetarySummation>\n <ram:LineTotalAmount>200.00</ram:LineTotalAmount>\n <ram:TaxBasisTotalAmount>200.00</ram:TaxBasisTotalAmount>\n <ram:TaxTotalAmount currencyID=\"RON\">42.00</ram:TaxTotalAmount>\n <ram:GrandTotalAmount>242.00</ram:GrandTotalAmount>\n <ram:DuePayableAmount>242.00</ram:DuePayableAmount>\n </ram:SpecifiedTradeSettlementHeaderMonetarySummation>\n <ram:InvoiceReferencedDocument>\n <ram:IssuerAssignedID>FCT-2026-0142</ram:IssuerAssignedID>\n <ram:FormattedIssueDateTime>\n <qdt:DateTimeString format=\"102\">20260910</qdt:DateTimeString>\n </ram:FormattedIssueDateTime>\n </ram:InvoiceReferencedDocument>\n </ram:ApplicableHeaderTradeSettlement>\n </rsm:SupplyChainTradeTransaction>\n</rsm:CrossIndustryInvoice>\n"
},
"meta": {
"generat_la": "2026-10-06T23: 59: 44+03: 00"
}
}
body: @efactura-intracomunitara.xml
{
"data": {
"standard": "CII",
"schema": "urn:un:unece:uncefact:data:standard:CrossIndustryInvoice: 100",
"guideline": "urn:cen.eu:en16931: 2017",
"xml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<rsm:CrossIndustryInvoice xmlns:rsm=\"urn:un:unece:uncefact:data:standard:CrossIndustryInvoice: 100\" xmlns:ram=\"urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity: 100\" xmlns:udt=\"urn:un:unece:uncefact:data:standard:UnqualifiedDataType: 100\" xmlns:qdt=\"urn:un:unece:uncefact:data:standard:QualifiedDataType: 100\">\n <rsm:ExchangedDocumentContext>\n <ram:GuidelineSpecifiedDocumentContextParameter>\n <ram:ID>urn:cen.eu:en16931: 2017</ram:ID>\n </ram:GuidelineSpecifiedDocumentContextParameter>\n </rsm:ExchangedDocumentContext>\n <rsm:ExchangedDocument>\n <ram:ID>FCT-2026-0150</ram:ID>\n <ram:TypeCode>380</ram:TypeCode>\n <ram:IssueDateTime>\n <udt:DateTimeString format=\"102\">20260925</udt:DateTimeString>\n </ram:IssueDateTime>\n </rsm:ExchangedDocument>\n <rsm:SupplyChainTradeTransaction>\n <ram:IncludedSupplyChainTradeLineItem>\n <ram:AssociatedDocumentLineDocument>\n <ram:LineID>1</ram:LineID>\n </ram:AssociatedDocumentLineDocument>\n <ram:SpecifiedTradeProduct>\n <ram:Name>Licenta software anuala</ram:Name>\n </ram:SpecifiedTradeProduct>\n <ram:SpecifiedLineTradeAgreement>\n <ram:NetPriceProductTradePrice>\n <ram:ChargeAmount>1200.00</ram:ChargeAmount>\n </ram:NetPriceProductTradePrice>\n </ram:SpecifiedLineTradeAgreement>\n <ram:SpecifiedLineTradeDelivery>\n <ram:BilledQuantity unitCode=\"H87\">1</ram:BilledQuantity>\n </ram:SpecifiedLineTradeDelivery>\n <ram:SpecifiedLineTradeSettlement>\n <ram:ApplicableTradeTax>\n <ram:TypeCode>VAT</ram:TypeCode>\n <ram:CategoryCode>K</ram:CategoryCode>\n <ram:RateApplicablePercent>0</ram:RateApplicablePercent>\n </ram:ApplicableTradeTax>\n <ram:SpecifiedTradeSettlementLineMonetarySummation>\n <ram:LineTotalAmount>1200.00</ram:LineTotalAmount>\n </ram:SpecifiedTradeSettlementLineMonetarySummation>\n </ram:SpecifiedLineTradeSettlement>\n </ram:IncludedSupplyChainTradeLineItem>\n <ram:ApplicableHeaderTradeAgreement>\n <ram:SellerTradeParty>\n <ram:Name>Exemplu Furnizor SRL</ram:Name>\n <ram:PostalTradeAddress>\n <ram:LineOne>Str. Memorandumului 28</ram:LineOne>\n <ram:CityName>Cluj-Napoca</ram:CityName>\n <ram:CountryID>RO</ram:CountryID>\n <ram:CountrySubDivisionName>RO-CJ</ram:CountrySubDivisionName>\n </ram:PostalTradeAddress>\n <ram:SpecifiedTaxRegistration>\n <ram:ID schemeID=\"VA\">RO990000005</ram:ID>\n </ram:SpecifiedTaxRegistration>\n </ram:SellerTradeParty>\n <ram:BuyerTradeParty>\n <ram:Name>Exemplu Client GmbH</ram:Name>\n <ram:PostalTradeAddress>\n <ram:LineOne>Leopoldstrasse 1</ram:LineOne>\n <ram:CityName>Muenchen</ram:CityName>\n <ram:CountryID>DE</ram:CountryID>\n <ram:CountrySubDivisionName>DE-BY</ram:CountrySubDivisionName>\n </ram:PostalTradeAddress>\n <ram:SpecifiedTaxRegistration>\n <ram:ID schemeID=\"VA\">DE999000009</ram:ID>\n </ram:SpecifiedTaxRegistration>\n </ram:BuyerTradeParty>\n </ram:ApplicableHeaderTradeAgreement>\n <ram:ApplicableHeaderTradeDelivery>\n <ram:ActualDeliverySupplyChainEvent>\n <ram:OccurrenceDateTime>\n <udt:DateTimeString format=\"102\">20260924</udt:DateTimeString>\n </ram:OccurrenceDateTime>\n </ram:ActualDeliverySupplyChainEvent>\n </ram:ApplicableHeaderTradeDelivery>\n <ram:ApplicableHeaderTradeSettlement>\n <ram:InvoiceCurrencyCode>EUR</ram:InvoiceCurrencyCode>\n <ram:ApplicableTradeTax>\n <ram:CalculatedAmount>0.00</ram:CalculatedAmount>\n <ram:TypeCode>VAT</ram:TypeCode>\n <ram:BasisAmount>1200.00</ram:BasisAmount>\n <ram:CategoryCode>K</ram:CategoryCode>\n <ram:RateApplicablePercent>0</ram:RateApplicablePercent>\n </ram:ApplicableTradeTax>\n <ram:SpecifiedTradePaymentTerms>\n <ram:DueDateDateTime>\n <udt:DateTimeString format=\"102\">20261025</udt:DateTimeString>\n </ram:DueDateDateTime>\n </ram:SpecifiedTradePaymentTerms>\n <ram:SpecifiedTradeSettlementHeaderMonetarySummation>\n <ram:LineTotalAmount>1200.00</ram:LineTotalAmount>\n <ram:TaxBasisTotalAmount>1200.00</ram:TaxBasisTotalAmount>\n <ram:TaxTotalAmount currencyID=\"EUR\">0.00</ram:TaxTotalAmount>\n <ram:GrandTotalAmount>1200.00</ram:GrandTotalAmount>\n <ram:DuePayableAmount>1200.00</ram:DuePayableAmount>\n </ram:SpecifiedTradeSettlementHeaderMonetarySummation>\n </ram:ApplicableHeaderTradeSettlement>\n </rsm:SupplyChainTradeTransaction>\n</rsm:CrossIndustryInvoice>\n"
},
"meta": {
"generat_la": "2026-10-06T23: 59: 44+03: 00"
}
}
Error codes
| Code | Slug | When it occurs |
|---|---|---|
| 401 | neautentificat | Token missing, invalid, expired or revoked. |
| 403 | feature_indisponibil | The current plan does not include the feature the route depends on. |
| 422 | xml_invalid | The body is not a valid UBL invoice (neither Invoice nor CreditNote), or invalid XML. |
| 429 | cota_depasita | The plan's monthly quota has been exceeded (see Retry-After). |
Errors in the Anaf module use the same envelope as the rest of the platform, with two extra fields: {eroare: {cod, mesaj, camp, request_id}}. eroare.cod is stable and is what you branch on; on validation (422) the code is case-specific: xml_invalid, xml_nu_e_factura, unitate_necunoscuta, luna_invalida and so on. camp points at the offending field when one can be identified.
{
"eroare": {
"cod": "xml_invalid",
"mesaj": "The body is not a valid UBL invoice (neither Invoice nor CreditNote), or invalid XML.",
"camp": "format",
"request_id": "0199c1f0-6e1a-7c3d-9b2f-4a8e5d1c7b04"
}
}