oneapi
Sign in
Anaf v1 / e-TVA

Reconcile e-TVA

Compares the return ANAF pre-filled with your own return and shows the rows that do not match, with the difference on each. Use prag to hide small differences.

POST
https://oneapi.ro/api/anaf/v1/etva/reconciliere

Request body

Sent as JSON in the request body (Content-Type: application/json) — not in the query string.

NameTypeDescriptionAccepted values
precompletatrequired string The return pre-filled by ANAF (D300 format), raw XML or base64.
propriurequired string Your own return (D300 format), raw XML or base64.
Return with an omitted invoice Request body
{
    "precompletat": "@etva-precompletat.xml",
    "propriu": "@etva-propriu.xml"
}

In this example, @etva-precompletat.xml, @etva-propriu.xml stand in for whole documents: send the file content — XML as text or base64, a PDF as base64 — not its name.

Only differences above 500 lei Request body
{
    "precompletat": "@etva-precompletat.xml",
    "propriu": "@etva-propriu.xml"
}

In this example, @etva-precompletat.xml, @etva-propriu.xml stand in for whole documents: send the file content — XML as text or base64, a PDF as base64 — not its name.

Every difference, no threshold Request body
{
    "precompletat": "@etva-precompletat.xml",
    "propriu": "@etva-propriu.xml"
}

In this example, @etva-precompletat.xml, @etva-propriu.xml stand in for whole documents: send the file content — XML as text or base64, a PDF as base64 — not its name.

Query parameters

NameTypeDescriptionAccepted values
pragoptional integer Threshold (lei) above which a difference is reported; default 0 (all differences). e.g. 500e.g. 0

How it behaves

  • Takes two VAT returns (D300 format) — the one pre-filled by ANAF (RO e-TVA) and the taxpayer's own one — and returns the differences per line. It is exactly what the "RO e-TVA compliance notice" (OPANAF 6234/2024) flags, but run locally, preemptively, before ANAF sends it.
  • JSON body: {"precompletat": "<xml>", "propriu": "<xml>"} (XML directly or base64). ?prag (lei) filters out small differences — default 0 (all).
  • The comparison is on the numeric lines of the return (R*) + the total payable; the textual header is ignored.
  • No filing to SPV. The pre-filled return and the notice are generated by ANAF; the reply to the notice is filed by the taxpayer through SPV, with their own credentials — outside this stateless toolkit.
  • Zero retention: the returns received are not written and not logged.

What it is for

  • Checking, before filing the D300, whether your return deviates from the one pre-filled by ANAF — so you avoid the compliance notice.
  • Prioritizing the manual review on the lines with the largest differences.

Response structure

FieldTypeDescription
data.are_diferente boolean true if there is at least one difference above the threshold.
data.nr_diferente integer The number of lines with differences.
data.total_precompletat integer The total payable from the pre-filled return.
data.total_propriu integer The total payable from the own return.
data.diferente[] array The list {camp, precompletat, propriu, diferenta} per line.
data.diferente[].camp string
data.diferente[].precompletat integer
data.diferente[].propriu integer
data.diferente[].diferenta integer
meta.generat_la string When the response was built (ISO 8601).

Response examples

body: {"precompletat": "@etva-precompletat.xml", "propriu": "@etva-propriu.xml"}

POSThttps://oneapi.ro/api/anaf/v1/etva/reconciliere
{
    "data": {
        "are_diferente": true,
        "nr_diferente": 4,
        "total_precompletat": 357,
        "total_propriu": 147,
        "diferente": [
            {
                "camp": "R9_1",
                "precompletat": 1700,
                "propriu": 700,
                "diferenta": -1000
            }
        ]
    },
    "meta": {
        "generat_la": "2026-10-06T23: 59: 44+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_invalidThe two returns are missing, or a return is not valid D300 XML.
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": "The two returns are missing, or a return is not valid D300 XML.",
        "camp": "prag",
        "request_id": "0199c1f0-6e1a-7c3d-9b2f-4a8e5d1c7b04"
    }
}