Documents
The documents behind the pre-filled figure and the postings of your ledger, and the link that ties a document to the posting it stands for.
On this page
List documents
GET /etva/v1/periods/{periodId}/documents
Returns the documents behind the pre-filled figure (side=prefilled) or the postings of your ledger (side=ledger), each with its match state. Without side, both. The order is fixed: oldest date first, then number, the pre-filled side before the ledger.
Parameters
| Name | In | Type | Required | Meaning |
|---|---|---|---|---|
periodId | path | string (uuid) | Yesrequired | The period. |
side | query | string | Nooptional | Only the documents of one side. One of prefilled, ledger |
rowId | query | string | Nooptional | Only the documents that fall in this row. One of sales-standard, sales-reduced, purchases-standard, purchases-reduced |
match | query | string | Nooptional | Only the documents in this match state. One of matched, differs, unmatched, duplicate, other_period |
limit | query | integer | Nooptional | Records per page, from 1 to 500. Default 100 Range 1 – 500 |
cursor | query | string | Nooptional | The nextCursor of the previous page. |
Responses
| Status | Meaning | Body |
|---|---|---|
200 | A page of documents. | DocumentPage |
401 | The token is missing, not valid or has ended. | Error |
403 | The token does not give access to this data. | Error |
404 | The period does not exist in your account. | Error |
429 | The request was refused and not processed: the code is rate_limited. Wait the seconds in the header Retry-After, then send it again with the same operationId. | Error |
503 | The service cannot answer now: the code is unavailable. Send the request again with the same operationId. | Error |
Request
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(); Response 200
{
"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"
} Get a document
GET /etva/v1/periods/{periodId}/documents/{documentId}
Parameters
| Name | In | Type | Required | Meaning |
|---|---|---|---|---|
periodId | path | string (uuid) | Yesrequired | The period. |
documentId | path | string (uuid) | Yesrequired | The document of the pre-filled return. |
Responses
| Status | Meaning | Body |
|---|---|---|
200 | The document or the posting. | Document |
401 | The token is missing, not valid or has ended. | Error |
403 | The token does not give access to this data. | Error |
404 | period_not_found: The period does not exist in your account. document_not_found: The period has no document with this id. | Error |
429 | The request was refused and not processed: the code is rate_limited. Wait the seconds in the header Retry-After, then send it again with the same operationId. | Error |
503 | The service cannot answer now: the code is unavailable. Send the request again with the same operationId. | Error |
Request
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(); Response 200
{
"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
}
} Link a document to a posting
POST /etva/v1/periods/{periodId}/documents/{documentId}/link
Ties a document that the ledger does not hold to the posting that stands for it, for example the same invoice posted under another number. The document must be unmatched, the posting must be free, and both must have the same side and partner. The differences are found again.
Parameters
| Name | In | Type | Required | Meaning |
|---|---|---|---|---|
periodId | path | string (uuid) | Yesrequired | The period. |
documentId | path | string (uuid) | Yesrequired | The document of the pre-filled return. |
Request body
| Field | Type | Required | Meaning |
|---|---|---|---|
operationId | string (uuid) | Yesrequired | A UUID you choose for this change. Send it again to repeat the request. |
expectedRevision | integer | Yesrequired | The revision of the period you read. |
postingId | string (uuid) | Yesrequired | The posting that stands for the document. |
Responses
| Status | Meaning | Body |
|---|---|---|
202 | The change was accepted. The body is the operation result: aggregateId is the period that was created or changed. | OperationResult |
400 | The request is not valid JSON or a field is missing or has the wrong type. | Error |
401 | The token is missing, not valid or has ended. | Error |
403 | The token does not give access to this data. | Error |
404 | period_not_found: The period does not exist in your account. document_not_found: The period has no document with this id. posting_not_found: The company has no posting with this id. | Error |
409 | operation_reused: The operationId was already used with a different request. revision_conflict: The period changed since the revision you sent. Nothing was applied. file_locked: The explanation file of the period is approved or filed, so the period no longer takes changes. already_matched: The document is not waiting for a posting: it is already matched to one, or it is a duplicate. posting_taken: The posting is already matched to another document. | Error |
422 | direction_mismatch: The document is a sale and the posting a purchase, or the other way round. partner_mismatch: The posting names another partner than the document. | Error |
429 | The request was refused and not processed: the code is rate_limited. Wait the seconds in the header Retry-After, then send it again with the same operationId. | Error |
503 | The service cannot answer now: the code is unavailable. Send the request again with the same operationId. | Error |
Request
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
} Remove the link of a document
POST /etva/v1/periods/{periodId}/documents/{documentId}/unlink
Removes the link that ties a document to a posting. The differences are found again.
Parameters
| Name | In | Type | Required | Meaning |
|---|---|---|---|---|
periodId | path | string (uuid) | Yesrequired | The period. |
documentId | path | string (uuid) | Yesrequired | The document of the pre-filled return. |
Request body
| Field | Type | Required | Meaning |
|---|---|---|---|
operationId | string (uuid) | Yesrequired | A UUID you choose for this change. Send it again to repeat the request. |
expectedRevision | integer | Yesrequired | The revision of the period you read. |
Responses
| Status | Meaning | Body |
|---|---|---|
202 | The change was accepted. The body is the operation result: aggregateId is the period that was created or changed. | OperationResult |
401 | The token is missing, not valid or has ended. | Error |
403 | The token does not give access to this data. | Error |
404 | period_not_found: The period does not exist in your account. document_not_found: The period has no document with this id. | Error |
409 | operation_reused: The operationId was already used with a different request. revision_conflict: The period changed since the revision you sent. Nothing was applied. file_locked: The explanation file of the period is approved or filed, so the period no longer takes changes. not_linked: The document has no link to remove. | Error |
429 | The request was refused and not processed: the code is rate_limited. Wait the seconds in the header Retry-After, then send it again with the same operationId. | Error |
503 | The service cannot answer now: the code is unavailable. Send the request again with the same operationId. | Error |
Request
curl
curl -X POST "$RDC_BASE_URL/etva/v1/periods/79509f60-565a-40eb-a4c3-709e5d49e517/documents/bb9c565d-6248-4964-8f91-c7dbf7838777/unlink" \
-H "Authorization: Bearer $RDC_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"operationId": "bbad5549-8855-4ed1-b009-ef0d384b6295",
"expectedRevision": 2
}' JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/etva/v1/periods/79509f60-565a-40eb-a4c3-709e5d49e517/documents/bb9c565d-6248-4964-8f91-c7dbf7838777/unlink`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"operationId": "bbad5549-8855-4ed1-b009-ef0d384b6295",
"expectedRevision": 2
}),
});
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/unlink',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
json={
'operationId': 'bbad5549-8855-4ed1-b009-ef0d384b6295',
'expectedRevision': 2,
},
)
result = response.json() PHP
<?php
$body = <<<'JSON'
{
"operationId": "bbad5549-8855-4ed1-b009-ef0d384b6295",
"expectedRevision": 2
}
JSON;
$curl = curl_init(getenv('RDC_BASE_URL') . '/etva/v1/periods/79509f60-565a-40eb-a4c3-709e5d49e517/documents/bb9c565d-6248-4964-8f91-c7dbf7838777/unlink');
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/unlink");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
"operationId": "bbad5549-8855-4ed1-b009-ef0d384b6295",
"expectedRevision": 2
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); Response 202
{
"operationId": "bbad5549-8855-4ed1-b009-ef0d384b6295",
"status": "accepted",
"aggregateId": "79509f60-565a-40eb-a4c3-709e5d49e517",
"aggregateRevision": 3
}