oneapi
Sign in
Anaf v1 / e-Factura

Invoice skeleton

The minimal skeleton of an invoice: the body for build, with the required fields empty.

GET
https://oneapi.ro/api/anaf/v1/efactura/schelet

Query parameters

NameTypeDescriptionAccepted values
typeoptional string Optional: invoice (the default), credit_note, corrective, prepayment, self_billed. invoice
furnizoroptional text Optional: the supplier tax ID, with or without RO, filled from the company register. e.g. 14399840
clientoptional text Optional: the customer tax ID, filled the same way. e.g. 6719278

How it behaves

  • Returns the minimal JSON body for POST /efactura/build: exactly the required keys of the requested type, empty, ready to fill in. It is the starting point for anyone without an ERP who does not want to read the EN 16931 schema to find out what is required.
  • The skeleton is not a valid invoice. The empty fields (number, issue_date, the party names, the line) must be filled in; sent as is, build answers 422 camp_obligatoriu. obligatorii lists the paths to fill, and the line comes with starting values (1 piece H87, 21% VAT).
  • With furnizor (supplier) and client (customer) — a tax ID, with or without RO — the parties are filled from the company register: the name, the VAT number (or tax_id for non-VAT-registered companies), the registration number and the registered office address — in Bucharest the city as SECTOR1…SECTOR6, as CIUS-RO requires. Anything that could not be filled reliably appears in de_verificat; an unknown tax ID leaves the party empty, flagged there as well.
  • credit_note and corrective add preceding_invoices, which they require.

What it is for

  • Starting an invoice in a small app with no ERP, generating the form from corp and obligatorii.
  • Preparing a credit note for a known customer, with the identification data already filled from the register.
  • Documenting internally the minimal shape build accepts, per document type.

Response structure

FieldTypeDescription
data.type string The requested document type.
data.denumire string The type name, spelled out.
data.corp object The body for POST /efactura/build, with the required fields empty.
data.corp.type string
data.corp.number string
data.corp.issue_date string
data.corp.due_date string
data.corp.currency string
data.corp.supplier.name string
data.corp.supplier.vat_id string
data.corp.supplier.legal_id string
data.corp.supplier.address.street string
data.corp.supplier.address.city string
data.corp.supplier.address.county string
data.corp.supplier.address.postal_code string
data.corp.supplier.address.country string
data.corp.customer.name string
data.corp.customer.vat_id string
data.corp.customer.legal_id string
data.corp.customer.address.street string
data.corp.customer.address.city string
data.corp.customer.address.county string
data.corp.customer.address.postal_code string
data.corp.customer.address.country string
data.corp.lines[].name string
data.corp.lines[].quantity integer
data.corp.lines[].unit string
data.corp.lines[].unit_price integer
data.corp.lines[].vat.rate integer
data.obligatorii array The paths of the fields that must be filled in before build.
data.completate_din_registru array The parties filled from the register: supplier, customer.
data.de_verificat array What could not be filled reliably or must be checked by hand.
data.observatie string How to use the skeleton.
meta.generat_la string When the response was built (ISO 8601).

Response examples

GEThttps://oneapi.ro/api/anaf/v1/efactura/schelet?type=invoice
{
    "data": {
        "type": "invoice",
        "denumire": "Factură",
        "corp": {
            "type": "invoice",
            "number": "",
            "issue_date": "",
            "due_date": "",
            "currency": "RON",
            "supplier": {
                "name": "",
                "vat_id": "",
                "legal_id": "",
                "address": {
                    "street": "",
                    "city": "",
                    "county": "",
                    "postal_code": "",
                    "country": "RO"
                }
            },
            "customer": {
                "name": "",
                "vat_id": "",
                "legal_id": "",
                "address": {
                    "street": "",
                    "city": "",
                    "county": "",
                    "postal_code": "",
                    "country": "RO"
                }
            },
            "lines": [
                {
                    "name": "",
                    "quantity": 1,
                    "unit": "H87",
                    "unit_price": 0,
                    "vat": {
                        "rate": 21
                    }
                }
            ]
        },
        "obligatorii": [
            "number",
            "issue_date",
            "supplier.name",
            "supplier.address.street",
            "supplier.address.city",
            "supplier.address.country",
            "customer.name",
            "customer.address.city",
            "customer.address.country",
            "lines[].name",
            "lines[].quantity",
            "lines[].unit",
            "lines[].unit_price",
            "lines[].vat.rate"
        ],
        "completate_din_registru": [],
        "de_verificat": [],
        "observatie": "Scheletul nu e o factură validă: completează câmpurile goale şi trimite `corp` la POST /anaf/v1/efactura/build. `due_date` nu e obligatoriu, dar ANAF cere fie `due_date`, fie `payment_terms` când suma de plată e pozitivă (BR-CO-25). Linia are valori de pornire (1 bucată `H87`, TVA 21%) — înlocuieşte-le. Unităţile şi categoriile de TVA sunt la /anaf/v1/efactura/codes/units şi /codes/vat_categories."
    },
    "meta": {
        "generat_la": "2026-10-06T23: 59: 42+03: 00"
    }
}

Error codes

CodeSlugWhen it occurs
401neautentificatToken missing, invalid, expired or revoked.
403feature_indisponibilThe current plan does not include the feature the route depends on.
422xml_invalidtip_necunoscut: type is not one of the accepted types; cui_invalid: furnizor or client is not a tax ID; parametru_necunoscut: another query parameter.
429cota_depasitaThe 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": "tip_necunoscut: type is not one of the accepted types; cui_invalid: furnizor or client is not a tax ID; parametru_necunoscut: another query parameter.",
        "camp": "type",
        "request_id": "0199c1f0-6e1a-7c3d-9b2f-4a8e5d1c7b04"
    }
}