Anaf v1 / e-TVA
Read the pre-filled return
Reads the VAT return (D300) — either pre-filled by ANAF or your own — and returns the rows as JSON, each with its code and amount.
POST
https://oneapi.ro/api/anaf/v1/etva/parse
Request body
The request body is the whole document, sent raw (Content-Type: application/xml) — not an object with fields.
Pre-filled by the tax authority
Your own return
A return with VAT to be refunded
Query parameters
This route accepts no query parameters.
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 RO e-TVA pre-filled return (D300 format) and returns the business JSON — header + lines. Uses the same parser as D300.
- Zero retention: parsing is stateless, in-memory.
What it is for
- The structured reading of the pre-filled return received from ANAF, without parsing XML by hand.
Response structure
FieldTypeDescription
data
object
The return JSON (header +
randuri), as with D300.
data.luna
integer
The month the data refers to.
data.an
integer
The year the data refers to.
data.tip_decont
string
data.pro_rata
string
data.declarant.cui
string
Tax identification number, without the
RO prefix.
data.declarant.den
string
data.declarant.nume
string
The name, exactly as the source publishes it.
data.declarant.prenume
string
data.declarant.functie
string
data.declarant.adresa
string
The address, in the form published by the source.
data.declarant.banca
string
data.declarant.cont
string
data.declarant.caen
string
The CAEN (NACE) code of the activity, in the series revision.
data.optiuni.temei
string
data.optiuni.nr_evid
string
data.optiuni.depusReprezentant
integer
data.optiuni.bifa_interne
integer
data.optiuni.bifa_cereale
string
data.optiuni.bifa_mob
string
data.optiuni.bifa_disp
string
data.optiuni.bifa_cons
string
data.optiuni.solicit_ramb
string
data.total_plata
integer
data.randuri.R9_1
integer
data.randuri.R9_2
integer
data.randuri.R64_1
integer
meta.generat_la
string
When the response was built (ISO 8601).
Response examples
body: @etva-precompletat.xml
POSThttps://oneapi.ro/api/anaf/v1/etva/parse
{
"data": {
"luna": 9,
"an": 2026,
"tip_decont": "L",
"pro_rata": "0",
"declarant": {
"cui": "990000005",
"den": "Exemplu Furnizor SRL",
"nume": "Exemplu",
"prenume": "Ion",
"functie": "Administrator",
"adresa": "Cluj-Napoca, Str. Memorandumului 28",
"banca": "Banca Exemplu",
"cont": "RO49AAAA1B31007593840000",
"caen": "6201"
},
"optiuni": {
"temei": "0",
"nr_evid": "0",
"depusReprezentant": 0,
"bifa_interne": 0,
"bifa_cereale": "N",
"bifa_mob": "N",
"bifa_disp": "N",
"bifa_cons": "N",
"solicit_ramb": "N"
},
"total_plata": 357,
"randuri": {
"R9_1": 1700,
"R9_2": 357,
"R64_1": 357
}
},
"meta": {
"generat_la": "2026-10-06T23: 59: 44+03: 00"
}
}
body: @etva-propriu.xml
POSThttps://oneapi.ro/api/anaf/v1/etva/parse
{
"data": {
"luna": 9,
"an": 2026,
"tip_decont": "L",
"pro_rata": "0",
"declarant": {
"cui": "990000005",
"den": "Exemplu Furnizor SRL",
"nume": "Exemplu",
"prenume": "Ion",
"functie": "Administrator",
"adresa": "Cluj-Napoca, Str. Memorandumului 28",
"banca": "Banca Exemplu",
"cont": "RO49AAAA1B31007593840000",
"caen": "6201"
},
"optiuni": {
"temei": "0",
"nr_evid": "0",
"depusReprezentant": 0,
"bifa_interne": 0,
"bifa_cereale": "N",
"bifa_mob": "N",
"bifa_disp": "N",
"bifa_cons": "N",
"solicit_ramb": "N"
},
"total_plata": 147,
"randuri": {
"R9_1": 700,
"R9_2": 147,
"R64_1": 147
}
},
"meta": {
"generat_la": "2026-10-06T23: 59: 44+03: 00"
}
}
body: @etva-rambursare.xml
POSThttps://oneapi.ro/api/anaf/v1/etva/parse
{
"data": {
"luna": 9,
"an": 2026,
"tip_decont": "L",
"pro_rata": "0",
"declarant": {
"cui": "990000005",
"den": "Exemplu Furnizor SRL",
"nume": "Exemplu",
"prenume": "Ion",
"functie": "Administrator",
"adresa": "Cluj-Napoca, Str. Memorandumului 28",
"banca": "Banca Exemplu",
"cont": "RO49AAAA1B31007593840000",
"caen": "6201"
},
"optiuni": {
"temei": "0",
"nr_evid": "0",
"depusReprezentant": 0,
"bifa_interne": 0,
"bifa_cereale": "N",
"bifa_mob": "N",
"bifa_disp": "N",
"bifa_cons": "N",
"solicit_ramb": "D"
},
"total_plata": 0,
"randuri": {
"R9_1": 700,
"R9_2": 147,
"R22_1": 2000,
"R22_2": 420,
"R65_1": 273
}
},
"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 | XML that cannot be parsed or is not a D300 return. |
| 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": "XML that cannot be parsed or is not a D300 return.",
"camp": null,
"request_id": "0199c1f0-6e1a-7c3d-9b2f-4a8e5d1c7b04"
}
}