Build the declaration
You send the business data as JSON and get the form's XML back, validated against the official schema before it is handed to you. If it does not pass, you get the schema errors instead of a file ANAF would reject.
Path parameters
D100, D112, D300, D394…). The full list is at /anaf/v1/declaratii/forms.
Request body
Sent as JSON in the request body (Content-Type: application/json) — not in the query string.
{
"luna": 9,
"an": 2026,
"tip_D394": "L",
"declarant": {
"cui": "990000005",
"caen": "6201",
"telefon": "0264000000",
"adresa": "Cluj-Napoca, Str. Memorandumului 28",
"den": "Exemplu Furnizor SRL"
},
"parteneri": [
{
"tip": "L",
"tip_partener": 1,
"cota": 21,
"cui": "990000072",
"den": "Exemplu Client SRL",
"nr_facturi": 1,
"baza": 700,
"tva": 147
}
],
"reprezentant": {
"den": "Exemplu Reprezentant",
"functie": "Administrator",
"adresa": "Cluj-Napoca, Str. Memorandumului 28"
},
"intocmit": {
"den": "Exemplu Contabil",
"cif": "990000005"
}
}
{
"luna": 9,
"an": 2026,
"tip_decont": "L",
"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"
},
"randuri": {
"R9_1": 1700,
"R9_2": 357,
"R64_1": 357
}
}
{
"luna": 9,
"an": 2026,
"declarant": {
"cui": "990000005",
"den": "Exemplu Furnizor SRL",
"nume": "Exemplu",
"prenume": "Ion",
"functie": "Administrator",
"adresa": "Cluj-Napoca, Str. Memorandumului 28"
},
"obligatii": [
{
"cod_oblig": "102",
"cod_bugetar": "20100101",
"scadenta": "2026-10-25",
"nr_evid": "1",
"suma_dat": 1200,
"suma_plata": 1200
}
]
}
{
"luna": 9,
"an": 2026,
"declarant": {
"cui": "990000005",
"den": "Exemplu Furnizor SRL",
"nume": "Exemplu",
"prenume": "Ion",
"functie": "Administrator",
"adresa": "Cluj-Napoca, Str. Memorandumului 28"
},
"operatiuni": [
{
"tip": "L",
"tara": "DE",
"cod": "999000009",
"denumire": "Exemplu Client GmbH",
"baza": 15000
}
]
}
{
"luna": 9,
"an": 2026,
"temei": "1",
"total_plata": 850,
"declarant": {
"cui": "990000005",
"den": "Exemplu Furnizor SRL",
"nume": "Exemplu",
"prenume": "Ion",
"functie": "Administrator",
"adresa": "Cluj-Napoca, Str. Memorandumului 28"
}
}
Query parameters
local (default, official XSD) or none.
e.g. locale.g. anafe.g. none
true (default) returns 422 without XML if validation fails; false returns the XML anyway.
e.g. false
xml (default) or base64.
e.g. base64
How it behaves
- Takes a business JSON and returns the fiscal declaration as XML in the official ANAF format of the form in the path ({form}, e.g.
D390). Totals are computed automatically from the lines. - The supported forms are listed at
GET /anaf/v1/declaratii/forms— there are 13: D100, D101, D112, D205, D212, D230, D300, D301, D311, D390, D394, D700, D710. Each form's fields (from the official XSD) are listed atGET /anaf/v1/declaratii/{form}/campuri. - An unknown body field is rejected, not ignored. Send
emaillinstead ofmailand you get422 camp_necunoscutwith the list accepted at that level — otherwise you would have got a valid but incomplete declaration, with no way to tell why. validateselects the validation:local(default) runs the official XSD of the form;noneonly generates.- Zero retention and no SPV submission — we deliver the XML ready to file; the filing is done by the taxpayer.
What it is for
- Generating the D390 XML from the record of intra-community operations, before filing.
Response structure
null when validate=none.
strict=false (with strict=true they come in the error envelope).
Response examples
body: {"luna": 9, "an": 2026, "tip_D394": "L", "declarant": {"cui": "990000005", "caen": "6201", "telefon": "0264000000", "adresa": "Cluj-Napoca, Str. Memorandumului 28", "den": "Exemplu Furnizor SRL"}, "parteneri": [{"tip": "L", "tip_partener": 1, "cota": 21, "cui": "990000072", "den": "Exemplu Client SRL", "nr_facturi": 1, "baza": 700, "tva": 147}], "reprezentant": {"den": "Exemplu Reprezentant", "functie": "Administrator", "adresa": "Cluj-Napoca, Str. Memorandumului 28"}, "intocmit": {"den": "Exemplu Contabil", "cif": "990000005"}}
{
"data": {
"valid": true,
"formular": "D394",
"schema": "d394_v5.xsd",
"xml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<declaratie394 xmlns=\"mfp:anaf:dgti:d394:declaratie:v5\" luna=\"9\" an=\"2026\" tip_D394=\"L\" sistemTVA=\"0\" op_efectuate=\"1\" cui=\"990000005\" caen=\"6201\" den=\"Exemplu Furnizor SRL\" adresa=\"Cluj-Napoca, Str. Memorandumului 28\" telefon=\"0264000000\" totalPlata_A=\"701\" denR=\"Exemplu Reprezentant\" functie_reprez=\"Administrator\" adresaR=\"Cluj-Napoca, Str. Memorandumului 28\" tip_intocmit=\"0\" den_intocmit=\"Exemplu Contabil\" cif_intocmit=\"990000005\" calitate_intocmit=\"administrator\" optiune=\"0\" prsAfiliat=\"0\">\n <informatii nrCui1=\"1\" nrCui2=\"0\" nrCui3=\"0\" nrCui4=\"0\" nr_BF_i1=\"0\" incasari_i1=\"0\" incasari_i2=\"0\" nrFacturi_terti=\"0\" nrFacturi_benef=\"0\" nrFacturi=\"1\" nrFacturiL_PF=\"0\" nrFacturiLS_PF=\"0\" val_LS_PF=\"0\" tvaDedAI24=\"0\" tvaDedAI21=\"0\" tvaDedAI11=\"0\" tvaDedAI20=\"0\" tvaDedAI19=\"0\" tvaDedAI9=\"0\" tvaDedAI5=\"0\" solicit=\"0\"/>\n <rezumat1 tip_partener=\"1\" cota=\"21\" facturiL=\"1\" bazaL=\"700\" tvaL=\"147\"/>\n <rezumat2 cota=\"21\" bazaFSLcod=\"0\" TVAFSLcod=\"0\" bazaFSL=\"0\" TVAFSL=\"0\" bazaFSA=\"0\" TVAFSA=\"0\" bazaFSAI=\"0\" TVAFSAI=\"0\" bazaBFAI=\"0\" TVABFAI=\"0\" nrFacturiL=\"1\" bazaL=\"700\" tvaL=\"147\" nrFacturiA=\"0\" bazaA=\"0\" tvaA=\"0\" nrFacturiAI=\"0\" bazaAI=\"0\" tvaAI=\"0\" bazaL_PF=\"0\" tvaL_PF=\"0\"/>\n <op1 tip=\"L\" tip_partener=\"1\" cota=\"21\" cuiP=\"990000072\" denP=\"Exemplu Client SRL\" nrFact=\"1\" baza=\"700\" tva=\"147\"/>\n</declaratie394>\n",
"meta": {
"namespace": "mfp:anaf:dgti:d394:declaratie:v5",
"op_efectuate": 1,
"nr_parteneri": 1,
"nr_rezumat1": 1,
"nr_rezumat2": 1,
"total_plata_A": 701
},
"errors": [],
"warnings": []
},
"meta": {
"generat_la": "2026-10-06T23: 59: 41+03: 00"
}
}
body: {"luna": 9, "an": 2026, "tip_decont": "L", "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"}, "randuri": {"R9_1": 1700, "R9_2": 357, "R64_1": 357}}
{
"data": {
"valid": true,
"formular": "D300",
"schema": "d300_v12.xsd",
"xml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<declaratie300 xmlns=\"mfp:anaf:dgti:d300:declaratie:v12\" luna=\"9\" an=\"2026\" depusReprezentant=\"0\" bifa_interne=\"0\" temei=\"0\" nume_declar=\"Exemplu\" prenume_declar=\"Ion\" functie_declar=\"Administrator\" cui=\"990000005\" den=\"Exemplu Furnizor SRL\" adresa=\"Cluj-Napoca, Str. Memorandumului 28\" banca=\"Banca Exemplu\" cont=\"RO49AAAA1B31007593840000\" caen=\"6201\" tip_decont=\"L\" pro_rata=\"0\" bifa_cereale=\"N\" bifa_mob=\"N\" bifa_disp=\"N\" bifa_cons=\"N\" solicit_ramb=\"N\" nr_evid=\"0\" totalPlata_A=\"357\" R9_1=\"1700\" R9_2=\"357\" R64_1=\"357\"/>\n",
"meta": {
"namespace": "mfp:anaf:dgti:d300:declaratie:v12",
"nr_randuri": 3,
"total_plata": 357
},
"errors": [],
"warnings": []
},
"meta": {
"generat_la": "2026-10-06T23: 59: 41+03: 00"
}
}
body: {"luna": 9, "an": 2026, "declarant": {"cui": "990000005", "den": "Exemplu Furnizor SRL", "nume": "Exemplu", "prenume": "Ion", "functie": "Administrator", "adresa": "Cluj-Napoca, Str. Memorandumului 28"}, "obligatii": [{"cod_oblig": "102", "cod_bugetar": "20100101", "scadenta": "2026-10-25", "nr_evid": "1", "suma_dat": 1200, "suma_plata": 1200}]}
{
"data": {
"valid": true,
"formular": "D100",
"schema": "d100_v2.xsd",
"xml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<declaratie100 xmlns=\"mfp:anaf:dgti:d100:declaratie:v2\" luna=\"9\" an=\"2026\" d_anulare=\"0\" nume_declar=\"Exemplu\" prenume_declar=\"Ion\" functie_declar=\"Administrator\" cui=\"990000005\" den=\"Exemplu Furnizor SRL\" adresa=\"Cluj-Napoca, Str. Memorandumului 28\" totalPlata_A=\"2400\">\n <obligatie cod_oblig=\"102\" cod_bugetar=\"20100101\" scadenta=\"25.10.2026\" nr_evid=\"1\" suma_dat=\"1200\" suma_plata=\"1200\"/>\n</declaratie100>\n",
"meta": {
"namespace": "mfp:anaf:dgti:d100:declaratie:v2",
"nr_obligatii": 1,
"total_plata": 2400
},
"errors": [],
"warnings": []
},
"meta": {
"generat_la": "2026-10-06T23: 59: 41+03: 00"
}
}
body: {"luna": 9, "an": 2026, "declarant": {"cui": "990000005", "den": "Exemplu Furnizor SRL", "nume": "Exemplu", "prenume": "Ion", "functie": "Administrator", "adresa": "Cluj-Napoca, Str. Memorandumului 28"}, "operatiuni": [{"tip": "L", "tara": "DE", "cod": "999000009", "denumire": "Exemplu Client GmbH", "baza": 15000}]}
{
"data": {
"valid": true,
"formular": "D390",
"schema": "d390_v3.xsd",
"xml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<declaratie390 xmlns=\"mfp:anaf:dgti:d390:declaratie:v3\" luna=\"9\" an=\"2026\" d_rec=\"0\" nume_declar=\"Exemplu\" prenume_declar=\"Ion\" functie_declar=\"Administrator\" cui=\"990000005\" den=\"Exemplu Furnizor SRL\" adresa=\"Cluj-Napoca, Str. Memorandumului 28\" totalPlata_A=\"0\">\n <rezumat nr_pag=\"1\" nrOPI=\"1\" bazaL=\"15000\" bazaT=\"0\" bazaA=\"0\" bazaP=\"0\" bazaS=\"0\" bazaR=\"0\" total_baza=\"15000\"/>\n <operatie tip=\"L\" tara=\"DE\" codO=\"999000009\" denO=\"Exemplu Client GmbH\" baza=\"15000\"/>\n</declaratie390>\n",
"meta": {
"namespace": "mfp:anaf:dgti:d390:declaratie:v3",
"total_baza": 15000,
"nr_operatiuni": 1,
"baze": {
"bazaL": 15000,
"bazaT": 0,
"bazaA": 0,
"bazaP": 0,
"bazaS": 0,
"bazaR": 0
}
},
"errors": [],
"warnings": []
},
"meta": {
"generat_la": "2026-10-06T23: 59: 41+03: 00"
}
}
body: {"luna": 9, "an": 2026, "temei": "1", "total_plata": 850, "declarant": {"cui": "990000005", "den": "Exemplu Furnizor SRL", "nume": "Exemplu", "prenume": "Ion", "functie": "Administrator", "adresa": "Cluj-Napoca, Str. Memorandumului 28"}}
{
"data": {
"valid": true,
"formular": "D311",
"schema": "d311_v1.xsd",
"xml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<declaratie311 xmlns=\"mfp:anaf:dgti:d311:declaratie:v1\" luna=\"9\" an=\"2026\" d_rec=\"0\" d_anulare=\"0\" temei=\"1\" nume_declar=\"Exemplu\" prenume_declar=\"Ion\" functie_declar=\"Administrator\" cui=\"990000005\" den=\"Exemplu Furnizor SRL\" adresa=\"Cluj-Napoca, Str. Memorandumului 28\" Data_A=\"06.10.2026\" d_anul1=\"0\" d_anul2=\"0\" totalPlata_A=\"850\"/>\n",
"meta": {
"namespace": "mfp:anaf:dgti:d311:declaratie:v1",
"nr_obligatii": 0,
"total_plata": 850
},
"errors": [],
"warnings": []
},
"meta": {
"generat_la": "2026-10-06T23: 59: 41+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. |
| 404 | negasit | Unsupported form. |
| 422 | xml_invalid | Invalid JSON or — when strict=true — a declaration that fails validation. |
| 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": "Invalid JSON or — when strict=true — a declaration that fails validation.",
"camp": "form",
"request_id": "0199c1f0-6e1a-7c3d-9b2f-4a8e5d1c7b04"
}
}