create_invoice
Issue a Romania B2B electronic invoice (factura electronica) into the national e-Factura system (ANAF/SPV). Builds UBL 2.1 XML in the CIUS-RO customization (Romania's CIUS of EN 16931) and uploads it under your own ANAF access token. Bring your own credentials as headers: x-anaf-token (Bearer access token from your one-time ANAF OAuth with a qualified digital certificate; the cert never reaches this server), x-anaf-cif (your supplier fiscal code / CIF, RO prefix optional). Header x-anaf-mode: production switches to the live rail (default = test, no fiscal effect). Upload is asynchronous: this returns index_incarcare (an upload index) — poll query_invoice with it to learn if ANAF ACCEPTED or REJECTED the invoice. Romanian VAT rates: 19 (standard), 9 and 5 (reduced), 0 (zero-rated). Amounts are in RON.
Parameters15
| customer_name | string | required | Buyer legal name (denumire) as registered. |
| customer_cif | string | required | Buyer fiscal code / CIF (cod de identificare fiscala), e.g. RO12345678 or 12345678. RO prefix optional. |
| customer_address | string | required | Buyer street address (BT-50 address line 1). |
| customer_city | string | optional | Buyer city (BT-52). Bucharest sectors use SECTOR1..SECTOR6. Default SECTOR1. |
| customer_county_code | string | optional | Buyer county subdivision ISO 3166-2 code (BT-54), e.g. RO-B (Bucharest), RO-CJ (Cluj). Default RO-B. |
| customer_country | string | optional | Buyer country code (BT-55). Default RO. |
| supplier_name | string | optional | Your (seller) legal name (BT-27). Recommended; a placeholder derived from your CIF is used if omitted. |
| supplier_address | string | optional | Your (seller) street address (BT-35). Recommended for a valid invoice. |
| supplier_city | string | optional | Your (seller) city (BT-37). Bucharest sectors use SECTOR1..SECTOR6. |
| supplier_county_code | string | optional | Your (seller) county ISO 3166-2 code (BT-39, CIUS-RO mandatory for RO sellers), e.g. RO-B. Default RO-B. |
| invoice_number | string | optional | Your invoice number / series (BT-1). Auto-generated if omitted. |
| issue_date | string | optional | Invoice issue date (BT-2), YYYY-MM-DD. Default: today (UTC). |
| due_date | string | optional | Optional payment due date (BT-9), YYYY-MM-DD. |
| currency | string | optional | Document currency (BT-5). Default RON. |
| lines | array | required | Invoice lines. Each: name, unit_price (net, VAT-exclusive, RON), vat_rate (19|9|5|0), optional quantity (default 1) and unit_code (UN/ECE Rec 20, default C62 = piece). |
Raw schema
{
"type": "object",
"properties": {
"customer_name": {
"type": "string",
"description": "Buyer legal name (denumire) as registered."
},
"customer_cif": {
"type": "string",
"description": "Buyer fiscal code / CIF (cod de identificare fiscala), e.g. RO12345678 or 12345678. RO prefix optional."
},
"customer_address": {
"type": "string",
"description": "Buyer street address (BT-50 address line 1)."
},
"customer_city": {
"type": "string",
"description": "Buyer city (BT-52). Bucharest sectors use SECTOR1..SECTOR6. Default SECTOR1."
},
"customer_county_code": {
"type": "string",
"description": "Buyer county subdivision ISO 3166-2 code (BT-54), e.g. RO-B (Bucharest), RO-CJ (Cluj). Default RO-B."
},
"customer_country": {
"type": "string",
"description": "Buyer country code (BT-55). Default RO."
},
"supplier_name": {
"type": "string",
"description": "Your (seller) legal name (BT-27). Recommended; a placeholder derived from your CIF is used if omitted."
},
"supplier_address": {
"type": "string",
"description": "Your (seller) street address (BT-35). Recommended for a valid invoice."
},
"supplier_city": {
"type": "string",
"description": "Your (seller) city (BT-37). Bucharest sectors use SECTOR1..SECTOR6."
},
"supplier_county_code": {
"type": "string",
"description": "Your (seller) county ISO 3166-2 code (BT-39, CIUS-RO mandatory for RO sellers), e.g. RO-B. Default RO-B."
},
"invoice_number": {
"type": "string",
"description": "Your invoice number / series (BT-1). Auto-generated if omitted."
},
"issue_date": {
"type": "string",
"description": "Invoice issue date (BT-2), YYYY-MM-DD. Default: today (UTC)."
},
"due_date": {
"type": "string",
"description": "Optional payment due date (BT-9), YYYY-MM-DD."
},
"currency": {
"type": "string",
"description": "Document currency (BT-5). Default RON."
},
"lines": {
"type": "array",
"minItems": 1,
"description": "Invoice lines. Each: name, unit_price (net, VAT-exclusive, RON), vat_rate (19|9|5|0), optional quantity (default 1) and unit_code (UN/ECE Rec 20, default C62 = piece).",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Item name/description (BT-153)."
},
"unit_price": {
"type": "number",
"description": "Net unit price in RON, VAT-exclusive (BT-146)."
},
"vat_rate": {
"type": "number",
"description": "VAT rate percent: 19 standard, 9 or 5 reduced, 0 zero-rated (BT-152)."
},
"quantity": {
"type": "number",
"description": "Quantity (BT-129). Default 1."
},
"unit_code": {
"type": "string",
"description": "Unit of measure UN/ECE Rec 20 code (BT-130). Default C62 (piece)."
}
},
"required": [
"name",
"unit_price",
"vat_rate"
]
}
}
},
"required": [
"customer_name",
"customer_cif",
"customer_address",
"lines"
]
}