Skip to content
Docs
API 1.0.0 · 22 Nov 2026

Search the docs

    Română

    Differences

    What sets the two returns apart: the six kinds, the effect of each on the rows, how documents and postings are matched and what makes a difference disappear.

    On this page

    A difference is derived. e‑TVA Check sets the documents of the pre-filled return beside the postings of your ledger and reports every document or posting that has no exact counterpart. You never create a difference; you explain it. Its only state of its own is its explanation: open without one, explained with one.

    The six kinds

    KindWhat it isEffect on the rows
    not-postedA document of the pre-filled return that your ledger lacks.Negative: your side lacks the document.
    other-periodYour ledger posted the document in another month.Negative in the month of the period.
    missing-at-authorityA posting that the pre-filled return does not list.Positive: only your side has it.
    duplicateThe pre-filled return lists the same document twice.Negative: the second listing has no counterpart.
    rateThe same document with other rates. It moves amounts between rows.Positive in one row, negative in another.
    amountThe same document with the same rates and other figures.In the rows of its rates, positive or negative.

    Effects per row

    Every difference lists its effects: for each row it touches, the base and the VAT that your side adds, yours minus pre-filled. vat is the sum of the effects. Over a period, the effects of all differences add up to the difference of each row, so nothing in the gap between the two returns is left without a difference.

    The September period has five differences. The invoice BRD-2026-00372 is a duplicate: the pre-filled return lists it twice, and the second listing takes 1142.90 of VAT out of sales-standard. A rate difference such as MV-000431 has two effects: 6716.64 in purchases-standard and -3518.24 in purchases-reduced, so vat is 3198.40.

    curl

    curl "$RDC_BASE_URL/etva/v1/periods/79509f60-565a-40eb-a4c3-709e5d49e517/differences?limit=20" \
      -H "Authorization: Bearer $RDC_TOKEN"

    JavaScript

    const response = await fetch(`${process.env.RDC_BASE_URL}/etva/v1/periods/79509f60-565a-40eb-a4c3-709e5d49e517/differences?limit=20`, {
      method: 'GET',
      headers: {
        Authorization: `Bearer ${process.env.RDC_TOKEN}`,
      },
    });
    const result = await response.json();

    Python

    import os
    import requests
    
    response = requests.request(
        'GET',
        f'{os.environ["RDC_BASE_URL"]}/etva/v1/periods/79509f60-565a-40eb-a4c3-709e5d49e517/differences?limit=20',
        headers={
            'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
        },
    )
    result = response.json()

    PHP

    <?php
    
    $curl = curl_init(getenv('RDC_BASE_URL') . '/etva/v1/periods/79509f60-565a-40eb-a4c3-709e5d49e517/differences?limit=20');
    curl_setopt_array($curl, [
        CURLOPT_CUSTOMREQUEST => 'GET',
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_HTTPHEADER => [
            'Authorization: Bearer ' . getenv('RDC_TOKEN'),
        ],
    ]);
    $result = json_decode(curl_exec($curl), true);
    curl_close($curl);

    C#

    using System.Net.Http.Headers;
    
    var client = new HttpClient();
    var request = new HttpRequestMessage(HttpMethod.Get, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/etva/v1/periods/79509f60-565a-40eb-a4c3-709e5d49e517/differences?limit=20");
    request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
    var response = await client.SendAsync(request);
    var result = await response.Content.ReadAsStringAsync();

    Response 200

    {
      "items": [
        {
          "id": "351aa9b7-3fd2-4e48-b723-6babb3e16fae",
          "periodId": "79509f60-565a-40eb-a4c3-709e5d49e517",
          "kind": "duplicate",
          "rowIds": [
            "sales-standard"
          ],
          "effects": [
            {
              "rowId": "sales-standard",
              "base": "-5442.40",
              "vat": "-1142.90"
            }
          ],
          "vat": "-1142.90",
          "documentId": "b205d17f-01f7-4ccc-9a90-37cf7c1709f2",
          "postingId": null,
          "state": "open",
          "reasons": [
            "duplicate_at_authority"
          ],
          "reason": null,
          "note": null,
          "explainedBy": null,
          "explainedAt": null
        },
        {
          "id": "50ad54ee-d206-4a82-a336-193ccffdc407",
          "periodId": "79509f60-565a-40eb-a4c3-709e5d49e517",
          "kind": "rate",
          "rowIds": [
            "purchases-standard",
            "purchases-reduced"
          ],
          "effects": [
            {
              "rowId": "purchases-standard",
              "base": "31984.00",
              "vat": "6716.64"
            },
            {
              "rowId": "purchases-reduced",
              "base": "-31984.00",
              "vat": "-3518.24"
            }
          ],
          "vat": "3198.40",
          "documentId": "85cc4550-2ac5-4c3b-9bd4-ba2d9a49615b",
          "postingId": "6ff78d02-0631-4bec-9aba-31bfda7f8707",
          "state": "explained",
          "reasons": [
            "different_rate"
          ],
          "reason": "different_rate",
          "note": "The supplier invoiced the reduced rate. The posting used the standard rate and was corrected on 5 October.",
          "explainedBy": "ioana-marin",
          "explainedAt": "2026-11-20T09:18:00Z"
        },
        {
          "id": "766d779d-1961-487c-bed6-c5b78c5012df",
          "periodId": "79509f60-565a-40eb-a4c3-709e5d49e517",
          "kind": "other-period",
          "rowIds": [
            "purchases-reduced"
          ],
          "effects": [
            {
              "rowId": "purchases-reduced",
              "base": "-10587.40",
              "vat": "-1164.61"
            }
          ],
          "vat": "-1164.61",
          "documentId": "b2655523-f9ca-43d4-86de-0de02dbafab3",
          "postingId": "9de91d7a-54a0-488b-b74f-6dc378caa04c",
          "state": "explained",
          "reasons": [
            "different_period"
          ],
          "reason": "different_period",
          "note": "Dated 30 September, received on 2 October and posted in October. It is claimed in the October return.",
          "explainedBy": "ioana-marin",
          "explainedAt": "2026-11-20T09:31:00Z"
        },
        {
          "id": "46735209-a528-4647-ba66-da4a8e7373ee",
          "periodId": "79509f60-565a-40eb-a4c3-709e5d49e517",
          "kind": "not-posted",
          "rowIds": [
            "purchases-standard"
          ],
          "effects": [
            {
              "rowId": "purchases-standard",
              "base": "-9184.50",
              "vat": "-1928.75"
            }
          ],
          "vat": "-1928.75",
          "documentId": "bb9c565d-6248-4964-8f91-c7dbf7838777",
          "postingId": null,
          "state": "open",
          "reasons": [
            "not_yet_posted",
            "different_period"
          ],
          "reason": null,
          "note": null,
          "explainedBy": null,
          "explainedAt": null
        },
        {
          "id": "e59c4466-b33f-4875-9be1-0fdd35eb90f1",
          "periodId": "79509f60-565a-40eb-a4c3-709e5d49e517",
          "kind": "missing-at-authority",
          "rowIds": [
            "sales-standard"
          ],
          "effects": [
            {
              "rowId": "sales-standard",
              "base": "1985.92",
              "vat": "417.04"
            }
          ],
          "vat": "417.04",
          "documentId": null,
          "postingId": "6861594d-27de-4565-a1fe-72c97fa04d2d",
          "state": "explained",
          "reasons": [
            "missing_in_efactura",
            "different_period"
          ],
          "reason": "missing_in_efactura",
          "note": "The upload was answered nok. The corrected invoice BRD-2026-00402 went out on 3 October and belongs to the October return.",
          "explainedBy": "ioana-marin",
          "explainedAt": "2026-11-20T09:05:00Z"
        }
      ],
      "nextCursor": null
    }

    The call has no filter, so the response is the full list of the five differences of the period, open and explained.

    How matching works

    A document and a posting match when they have the same side, the same number and the same partner tax id. For each document, in order, the comparison asks:

    1. Seen before?

      The same key was already met in the pre-filled return and the document was not linked by hand: duplicate.

    2. A posting this month?

      If the ledger holds the key in the month of the period, the figures are compared. Equal parts: no difference. Same rates, other bases: amount. Other rates: rate.

    3. A posting in another month?

      If the company holds the key in another month: other-period.

    4. No posting?

      not-posted. Every posting no document claimed is missing-at-authority.

    A link made by hand matches what the key does not, for example an invoice posted under a mistyped number. linkDocument ties a document whose match state is unmatched to a posting; unlinkDocument removes the link.

    Refused withCodeWhy
    409already_matchedThe document is already matched, or it is a duplicate.
    409posting_takenThe posting is matched to another document.
    422direction_mismatchThe document is a sale and the posting a purchase, or the reverse.
    422partner_mismatchThe posting names another partner.
    409not_linkedThe document has no link to remove.

    What makes a difference disappear

    The id of a difference stays the same while the data it comes from does not change. A new import of the pre-filled return or of the postings, a link and an unlink all change the data, and the differences are found again. A difference that no longer exists is gone, and its explanation is dropped with it. Asking for its id then returns difference_not_found. Reopening an explanation does not remove the difference; it only returns it to open.

    The invoice AC-004563 from Ambalaje Carpatin is not-posted. Once it is linked to the posting that stands for it, its document is matched and the difference is no longer listed. Read the list again after every import and every link.

    curl

    curl -X POST "$RDC_BASE_URL/etva/v1/periods/79509f60-565a-40eb-a4c3-709e5d49e517/documents/bb9c565d-6248-4964-8f91-c7dbf7838777/link" \
      -H "Authorization: Bearer $RDC_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{
      "operationId": "338bc15e-e5de-43ad-b6d1-eea5ad72c57b",
      "expectedRevision": 1,
      "postingId": "8b1597b2-635e-42d1-aef6-0b8654d64720"
    }'

    JavaScript

    const response = await fetch(`${process.env.RDC_BASE_URL}/etva/v1/periods/79509f60-565a-40eb-a4c3-709e5d49e517/documents/bb9c565d-6248-4964-8f91-c7dbf7838777/link`, {
      method: 'POST',
      headers: {
        Authorization: `Bearer ${process.env.RDC_TOKEN}`,
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({
        "operationId": "338bc15e-e5de-43ad-b6d1-eea5ad72c57b",
        "expectedRevision": 1,
        "postingId": "8b1597b2-635e-42d1-aef6-0b8654d64720"
      }),
    });
    const result = await response.json();

    Python

    import os
    import requests
    
    response = requests.request(
        'POST',
        f'{os.environ["RDC_BASE_URL"]}/etva/v1/periods/79509f60-565a-40eb-a4c3-709e5d49e517/documents/bb9c565d-6248-4964-8f91-c7dbf7838777/link',
        headers={
            'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
        },
        json={
            'operationId': '338bc15e-e5de-43ad-b6d1-eea5ad72c57b',
            'expectedRevision': 1,
            'postingId': '8b1597b2-635e-42d1-aef6-0b8654d64720',
        },
    )
    result = response.json()

    PHP

    <?php
    
    $body = <<<'JSON'
    {
      "operationId": "338bc15e-e5de-43ad-b6d1-eea5ad72c57b",
      "expectedRevision": 1,
      "postingId": "8b1597b2-635e-42d1-aef6-0b8654d64720"
    }
    JSON;
    
    $curl = curl_init(getenv('RDC_BASE_URL') . '/etva/v1/periods/79509f60-565a-40eb-a4c3-709e5d49e517/documents/bb9c565d-6248-4964-8f91-c7dbf7838777/link');
    curl_setopt_array($curl, [
        CURLOPT_CUSTOMREQUEST => 'POST',
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_HTTPHEADER => [
            'Authorization: Bearer ' . getenv('RDC_TOKEN'),
            'Content-Type: application/json',
        ],
        CURLOPT_POSTFIELDS => $body,
    ]);
    $result = json_decode(curl_exec($curl), true);
    curl_close($curl);

    C#

    using System.Net.Http.Headers;
    
    var client = new HttpClient();
    var request = new HttpRequestMessage(HttpMethod.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/etva/v1/periods/79509f60-565a-40eb-a4c3-709e5d49e517/documents/bb9c565d-6248-4964-8f91-c7dbf7838777/link");
    request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
    request.Content = new StringContent("""
    {
      "operationId": "338bc15e-e5de-43ad-b6d1-eea5ad72c57b",
      "expectedRevision": 1,
      "postingId": "8b1597b2-635e-42d1-aef6-0b8654d64720"
    }
    """, System.Text.Encoding.UTF8, "application/json");
    var response = await client.SendAsync(request);
    var result = await response.Content.ReadAsStringAsync();

    Response 202

    {
      "operationId": "338bc15e-e5de-43ad-b6d1-eea5ad72c57b",
      "status": "accepted",
      "aggregateId": "79509f60-565a-40eb-a4c3-709e5d49e517",
      "aggregateRevision": 2
    }

    The next step is a reason and a note for each difference that stays. See Reasons and explanations.