Build a batch
Several months of the same form in a single call, each with its own XML and verdict. For catch-ups and for rebuilding a whole history.
Path parameters
D112, D300…).
Request body
Sent as JSON in the request body (Content-Type: application/json) — not in the query string.
{form}/build accepts.
{
"declaratii": [
{
"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": 10,
"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": 2,
"baza": 1700,
"tva": 357
}
],
"reprezentant": {
"den": "Exemplu Reprezentant",
"functie": "Administrator",
"adresa": "Cluj-Napoca, Str. Memorandumului 28"
},
"intocmit": {
"den": "Exemplu Contabil",
"cif": "990000005"
}
}
]
}
{
"declaratii": [
{
"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": 10,
"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-11-25",
"nr_evid": "2",
"suma_dat": 1500,
"suma_plata": 1500
}
]
}
]
}
{
"declaratii": [
{
"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": 10,
"an": 2026,
"declarant": {
"cui": "990000005",
"den": "Exemplu Furnizor SRL",
"nume": "Exemplu",
"prenume": "Ion",
"functie": "Administrator",
"adresa": "Cluj-Napoca, Str. Memorandumului 28"
},
"operatiuni": [
{
"tip": "A",
"tara": "HU",
"cod": "12345676",
"denumire": "Exemplu Furnizor Kft",
"baza": 8000
}
]
}
]
}
Query parameters
xml (default) or base64.
e.g. base64
true omits the XML on invalid items (you get only the errors); by default the XML is returned anyway.
e.g. false
How it behaves
- Builds several declarations of the SAME form ({form}, e.g.
D390) in a single call. The body is JSON:{declaratii:[{...}, ...]}, each item in the shape{form}/buildaccepts. Each is generated (JSON→XML) and validated against the official XSD. - A broken declaration does not break the batch: invalid input or a build error is isolated per item and reported, the rest build normally.
- A cap of 200 declarations per call.
format=base64returns the XML base64-encoded;strict=trueomits the XML on invalid items (you get only their errors). - Zero retention and no SPV filing — we deliver ready-to-file XMLs; filing is done by the taxpayer.
What it is for
- Bulk-generating XMLs (e.g. one D390 per company in a group), in a single request.
Response structure
true/false, or null when validation could not run.
strict=true.
{cod,mesaj,camp}.
{cod,mesaj,camp}.
total, valide, invalide.
Response examples
body: {"declaratii": [{"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": 10, "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": 2, "baza": 1700, "tva": 357}], "reprezentant": {"den": "Exemplu Reprezentant", "functie": "Administrator", "adresa": "Cluj-Napoca, Str. Memorandumului 28"}, "intocmit": {"den": "Exemplu Contabil", "cif": "990000005"}}]}
{
"data": {
"formular": "D394",
"rezultate": [
{
"index": 0,
"valid": true,
"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",
"errors": [],
"warnings": []
}
],
"sumar": {
"total": 2,
"valide": 2,
"invalide": 0
}
},
"meta": {
"generat_la": "2026-10-06T23: 59: 42+03: 00"
}
}
body: {"declaratii": [{"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": 10, "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-11-25", "nr_evid": "2", "suma_dat": 1500, "suma_plata": 1500}]}]}
{
"data": {
"formular": "D100",
"rezultate": [
{
"index": 0,
"valid": true,
"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",
"errors": [],
"warnings": []
}
],
"sumar": {
"total": 2,
"valide": 2,
"invalide": 0
}
},
"meta": {
"generat_la": "2026-10-06T23: 59: 42+03: 00"
}
}
body: {"declaratii": [{"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": 10, "an": 2026, "declarant": {"cui": "990000005", "den": "Exemplu Furnizor SRL", "nume": "Exemplu", "prenume": "Ion", "functie": "Administrator", "adresa": "Cluj-Napoca, Str. Memorandumului 28"}, "operatiuni": [{"tip": "A", "tara": "HU", "cod": "12345676", "denumire": "Exemplu Furnizor Kft", "baza": 8000}]}]}
{
"data": {
"formular": "D390",
"rezultate": [
{
"index": 0,
"valid": true,
"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",
"errors": [],
"warnings": []
}
],
"sumar": {
"total": 2,
"valide": 2,
"invalide": 0
}
},
"meta": {
"generat_la": "2026-10-06T23: 59: 42+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 | Body without declaratii (or empty), or over 200 declarations. |
| 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": "Body without declaratii (or empty), or over 200 declarations.",
"camp": "form",
"request_id": "0199c1f0-6e1a-7c3d-9b2f-4a8e5d1c7b04"
}
}