Documents behind the figures
The documents behind the pre-filled figure and the postings behind yours: where they come from, what they carry, their match states and how a link ties them.
On this page
Every figure of a row is a sum, and every sum is a list you can read. On the pre-filled side the list holds documents. On your side it holds postings. listDocuments returns both lists, side=prefilled or side=ledger, and each entry says whether it found its counterpart.
Documents of the pre-filled return
e‑TVA Check takes the documents of the pre-filled return as you import them. What the law says about the return:
Where the data of the return comes from:
Each document records its source, one of seven values.
| Source | System |
|---|---|
e-factura | RO e‑Factura |
e-transport | RO e‑Transport |
e-saf-t | RO e-SAF-T |
cash-register | RO e-Case de marcat electronice |
customs | The integrated customs system |
d390 | The recapitulative statement D390 |
d394 | The informative statement D394 |
A document also carries its number, the partnerCif and partnerName of the other party, its date, the authorityId of the authority’s record and its parts: the rate, base and vat for each rate. rowIds names the rows the parts fall in.
importPrefilled takes the four rows and the documents. Each row must equal the sum of its documents, or the import is refused with rows_do_not_add_up and nothing is imported. A document the authority lists twice is sent twice; that is how a duplicate is found. An import without a document is refused with empty_import.
Postings of your ledger
importPostings takes the postings of the month from ledger, or from saf-t. The period keeps the source in postingsSource. A posting has the same fields as a document, with authorityId null. What the law says about the invoice level of SAF-T:
A new import replaces the postings of the month. Two postings with the same number and partner are refused with duplicate_posting. Imports replace, so a link or an explanation that names something no longer there is dropped. listImports shows what each period holds: the September period has an import of 15 documents and an import of 13 postings.
Match states
Every document and posting has a match with a state, the differenceId that concerns it and the counterpartId of the entry it was matched to.
| State | Meaning |
|---|---|
matched | A counterpart with the same figures exists. No difference. |
differs | A counterpart exists with other figures: a rate or an amount difference. |
unmatched | No counterpart: a not-posted or a missing-at-authority difference. |
duplicate | The pre-filled return lists the document twice. |
other_period | The counterpart is posted in another month. |
The invoice AC-004563 of 2026-09-23 from Ambalaje Carpatin SRL (RO51603619) is a document of source e-factura with authorityId 5012300123. It has base 9184.50 and VAT 1928.75 in purchases-standard. Its state is unmatched: the ledger does not hold it.
curl
curl "$RDC_BASE_URL/etva/v1/periods/79509f60-565a-40eb-a4c3-709e5d49e517/documents/bb9c565d-6248-4964-8f91-c7dbf7838777" \
-H "Authorization: Bearer $RDC_TOKEN" JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/etva/v1/periods/79509f60-565a-40eb-a4c3-709e5d49e517/documents/bb9c565d-6248-4964-8f91-c7dbf7838777`, {
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/documents/bb9c565d-6248-4964-8f91-c7dbf7838777',
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/documents/bb9c565d-6248-4964-8f91-c7dbf7838777');
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/documents/bb9c565d-6248-4964-8f91-c7dbf7838777");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); {
"id": "bb9c565d-6248-4964-8f91-c7dbf7838777",
"periodId": "79509f60-565a-40eb-a4c3-709e5d49e517",
"side": "prefilled",
"source": "e-factura",
"direction": "purchases",
"number": "AC-004563",
"partnerCif": "RO51603619",
"partnerName": "Ambalaje Carpatin SRL",
"date": "2026-09-23",
"authorityId": "5012300123",
"parts": [
{
"rate": "21",
"base": "9184.50",
"vat": "1928.75"
}
],
"base": "9184.50",
"vat": "1928.75",
"currency": "RON",
"rowIds": [
"purchases-standard"
],
"match": {
"state": "unmatched",
"differenceId": "46735209-a528-4647-ba66-da4a8e7373ee",
"counterpartId": null
}
} Links
When the ledger holds the invoice under a number the key does not recognise, tie them with linkDocument. The document becomes matched and the posting is taken. unlinkDocument undoes it. Both need the file to be a draft. See Differences for the refusals.
curl
curl "$RDC_BASE_URL/etva/v1/periods/79509f60-565a-40eb-a4c3-709e5d49e517/documents?limit=3" \
-H "Authorization: Bearer $RDC_TOKEN" JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/etva/v1/periods/79509f60-565a-40eb-a4c3-709e5d49e517/documents?limit=3`, {
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/documents?limit=3',
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/documents?limit=3');
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/documents?limit=3");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); {
"items": [
{
"id": "efda75b0-39fe-4f76-9d0c-f5e95d39555f",
"periodId": "79509f60-565a-40eb-a4c3-709e5d49e517",
"side": "prefilled",
"source": "e-factura",
"direction": "sales",
"number": "BRD-2026-00352",
"partnerCif": "RO39172541",
"partnerName": "Hanul Ozana SRL",
"date": "2026-09-02",
"authorityId": "5012300110",
"parts": [
{
"rate": "21",
"base": "825.88",
"vat": "173.43"
},
{
"rate": "11",
"base": "5410.30",
"vat": "595.13"
}
],
"base": "6236.18",
"vat": "768.56",
"currency": "RON",
"rowIds": [
"sales-standard",
"sales-reduced"
],
"match": {
"state": "matched",
"differenceId": null,
"counterpartId": "3ca8db6c-d5d3-4192-9007-42b54dd2f803"
}
},
{
"id": "3ca8db6c-d5d3-4192-9007-42b54dd2f803",
"periodId": "79509f60-565a-40eb-a4c3-709e5d49e517",
"side": "ledger",
"source": "ledger",
"direction": "sales",
"number": "BRD-2026-00352",
"partnerCif": "RO39172541",
"partnerName": "Hanul Ozana SRL",
"date": "2026-09-02",
"authorityId": null,
"parts": [
{
"rate": "21",
"base": "825.88",
"vat": "173.43"
},
{
"rate": "11",
"base": "5410.30",
"vat": "595.13"
}
],
"base": "6236.18",
"vat": "768.56",
"currency": "RON",
"rowIds": [
"sales-standard",
"sales-reduced"
],
"match": {
"state": "matched",
"differenceId": null,
"counterpartId": "efda75b0-39fe-4f76-9d0c-f5e95d39555f"
}
},
{
"id": "e47a0042-4b13-40d8-a1d0-f5d7c3d1d339",
"periodId": "79509f60-565a-40eb-a4c3-709e5d49e517",
"side": "prefilled",
"source": "e-factura",
"direction": "purchases",
"number": "MV-000412",
"partnerCif": "RO51603473",
"partnerName": "Moara Vadului SRL",
"date": "2026-09-03",
"authorityId": "5012300117",
"parts": [
{
"rate": "11",
"base": "24860.00",
"vat": "2734.60"
}
],
"base": "24860.00",
"vat": "2734.60",
"currency": "RON",
"rowIds": [
"purchases-reduced"
],
"match": {
"state": "matched",
"differenceId": null,
"counterpartId": "9c689d71-fb03-43ba-859b-bb9d8fbae22b"
}
}
],
"nextCursor": "2026-09-03~MV-000412"
} The call asks for limit=3, so the response is the first page: the first three entries of the September period, in the fixed order of the list. The order is oldest date first, then number, the pre-filled side before the ledger. Here they are BRD-2026-00352 of the pre-filled return, then the posting BRD-2026-00352 of the ledger (both of 2026-09-02), then MV-000412 of the pre-filled return (2026-09-03). A posting has authorityId null. nextCursor is 2026-09-03~MV-000412: send it as cursor to read the next page, and a nextCursor of null ends the list.