Quickstart
Compare one month of a test company: open the period, import the pre-filled return and the postings, read the rows and find the difference.
On this page
You need the client credentials and the base address of your test company. The samples read them from the environment: $RDC_BASE_URL and $RDC_TOKEN. See Authentication for the token and Sandbox and live for the test company. The company here is the second company of the account, and the month is August 2026.
Open the period
A period is one company and one month. Choose a new operationId and send the id of the company. The answer says that the change was accepted; aggregateId is the id of the new period.
Open a period
curl
curl -X POST "$RDC_BASE_URL/etva/v1/periods" \
-H "Authorization: Bearer $RDC_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"operationId": "bce3b803-0ff6-43c7-940c-5f07eb4f6735",
"companyId": "80921810-dab0-4d2c-a1ea-ea80c89bc993",
"month": "2026-07",
"scheme": "standard"
}' JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/etva/v1/periods`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"operationId": "bce3b803-0ff6-43c7-940c-5f07eb4f6735",
"companyId": "80921810-dab0-4d2c-a1ea-ea80c89bc993",
"month": "2026-07",
"scheme": "standard"
}),
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'POST',
f'{os.environ["RDC_BASE_URL"]}/etva/v1/periods',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
json={
'operationId': 'bce3b803-0ff6-43c7-940c-5f07eb4f6735',
'companyId': '80921810-dab0-4d2c-a1ea-ea80c89bc993',
'month': '2026-07',
'scheme': 'standard',
},
)
result = response.json() PHP
<?php
$body = <<<'JSON'
{
"operationId": "bce3b803-0ff6-43c7-940c-5f07eb4f6735",
"companyId": "80921810-dab0-4d2c-a1ea-ea80c89bc993",
"month": "2026-07",
"scheme": "standard"
}
JSON;
$curl = curl_init(getenv('RDC_BASE_URL') . '/etva/v1/periods');
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");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
"operationId": "bce3b803-0ff6-43c7-940c-5f07eb4f6735",
"companyId": "80921810-dab0-4d2c-a1ea-ea80c89bc993",
"month": "2026-07",
"scheme": "standard"
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); {
"operationId": "bce3b803-0ff6-43c7-940c-5f07eb4f6735",
"status": "accepted",
"aggregateId": "06cc614a-c8f2-40fc-984c-a09bcd5cdf2c",
"aggregateRevision": 1
} Import the pre-filled return
Send the day the return arrived, its four rows and the documents behind them. Each row must equal the sum of its documents: if one does not, the answer is a 422 rows_do_not_add_up and nothing is imported. Send the revision you read, 1 for a new period.
Import the pre-filled return
curl
curl -X POST "$RDC_BASE_URL/etva/v1/periods/06cc614a-c8f2-40fc-984c-a09bcd5cdf2c/imports/prefilled" \
-H "Authorization: Bearer $RDC_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"operationId": "bafe8dd8-88ba-4fa9-ad25-f4425032312a",
"expectedRevision": 1,
"prefilledOn": "2026-09-04",
"rows": [
{
"rowId": "sales-standard",
"base": "619.40",
"vat": "130.07"
},
{
"rowId": "sales-reduced",
"base": "2988.00",
"vat": "328.68"
},
{
"rowId": "purchases-standard",
"base": "10289.50",
"vat": "2160.80"
},
{
"rowId": "purchases-reduced",
"base": "9124.00",
"vat": "1003.64"
}
],
"documents": [
{
"number": "BRT-2026-00044",
"source": "e-factura",
"direction": "sales",
"partnerCif": "RO39172614",
"partnerName": "Cofetăria Vălul Alb SRL",
"date": "2026-07-04",
"authorityId": "5011900200",
"parts": [
{
"rate": "21",
"base": "619.40"
},
{
"rate": "11",
"base": "2988.00"
}
]
},
{
"number": "LD-2026-3187",
"source": "e-factura",
"direction": "purchases",
"partnerCif": "RO51603546",
"partnerName": "Brânzeturi Obcina SRL",
"date": "2026-07-06",
"authorityId": "5011900201",
"parts": [
{
"rate": "11",
"base": "9124.00"
}
]
},
{
"number": "AC-004402",
"source": "e-factura",
"direction": "purchases",
"partnerCif": "RO51603619",
"partnerName": "Ambalaje Carpatin SRL",
"date": "2026-07-10",
"authorityId": "5011900202",
"parts": [
{
"rate": "21",
"base": "3887.00"
}
]
},
{
"number": "BT-26-0987",
"source": "e-factura",
"direction": "purchases",
"partnerCif": "RO51603783",
"partnerName": "Băuturi Trotuș SRL",
"date": "2026-07-12",
"authorityId": "5011900203",
"parts": [
{
"rate": "21",
"base": "6402.50"
}
]
}
]
}' JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/etva/v1/periods/06cc614a-c8f2-40fc-984c-a09bcd5cdf2c/imports/prefilled`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"operationId": "bafe8dd8-88ba-4fa9-ad25-f4425032312a",
"expectedRevision": 1,
"prefilledOn": "2026-09-04",
"rows": [
{
"rowId": "sales-standard",
"base": "619.40",
"vat": "130.07"
},
{
"rowId": "sales-reduced",
"base": "2988.00",
"vat": "328.68"
},
{
"rowId": "purchases-standard",
"base": "10289.50",
"vat": "2160.80"
},
{
"rowId": "purchases-reduced",
"base": "9124.00",
"vat": "1003.64"
}
],
"documents": [
{
"number": "BRT-2026-00044",
"source": "e-factura",
"direction": "sales",
"partnerCif": "RO39172614",
"partnerName": "Cofetăria Vălul Alb SRL",
"date": "2026-07-04",
"authorityId": "5011900200",
"parts": [
{
"rate": "21",
"base": "619.40"
},
{
"rate": "11",
"base": "2988.00"
}
]
},
{
"number": "LD-2026-3187",
"source": "e-factura",
"direction": "purchases",
"partnerCif": "RO51603546",
"partnerName": "Brânzeturi Obcina SRL",
"date": "2026-07-06",
"authorityId": "5011900201",
"parts": [
{
"rate": "11",
"base": "9124.00"
}
]
},
{
"number": "AC-004402",
"source": "e-factura",
"direction": "purchases",
"partnerCif": "RO51603619",
"partnerName": "Ambalaje Carpatin SRL",
"date": "2026-07-10",
"authorityId": "5011900202",
"parts": [
{
"rate": "21",
"base": "3887.00"
}
]
},
{
"number": "BT-26-0987",
"source": "e-factura",
"direction": "purchases",
"partnerCif": "RO51603783",
"partnerName": "Băuturi Trotuș SRL",
"date": "2026-07-12",
"authorityId": "5011900203",
"parts": [
{
"rate": "21",
"base": "6402.50"
}
]
}
]
}),
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'POST',
f'{os.environ["RDC_BASE_URL"]}/etva/v1/periods/06cc614a-c8f2-40fc-984c-a09bcd5cdf2c/imports/prefilled',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
json={
'operationId': 'bafe8dd8-88ba-4fa9-ad25-f4425032312a',
'expectedRevision': 1,
'prefilledOn': '2026-09-04',
'rows': [
{
'rowId': 'sales-standard',
'base': '619.40',
'vat': '130.07',
},
{
'rowId': 'sales-reduced',
'base': '2988.00',
'vat': '328.68',
},
{
'rowId': 'purchases-standard',
'base': '10289.50',
'vat': '2160.80',
},
{
'rowId': 'purchases-reduced',
'base': '9124.00',
'vat': '1003.64',
},
],
'documents': [
{
'number': 'BRT-2026-00044',
'source': 'e-factura',
'direction': 'sales',
'partnerCif': 'RO39172614',
'partnerName': 'Cofetăria Vălul Alb SRL',
'date': '2026-07-04',
'authorityId': '5011900200',
'parts': [
{
'rate': '21',
'base': '619.40',
},
{
'rate': '11',
'base': '2988.00',
},
],
},
{
'number': 'LD-2026-3187',
'source': 'e-factura',
'direction': 'purchases',
'partnerCif': 'RO51603546',
'partnerName': 'Brânzeturi Obcina SRL',
'date': '2026-07-06',
'authorityId': '5011900201',
'parts': [
{
'rate': '11',
'base': '9124.00',
},
],
},
{
'number': 'AC-004402',
'source': 'e-factura',
'direction': 'purchases',
'partnerCif': 'RO51603619',
'partnerName': 'Ambalaje Carpatin SRL',
'date': '2026-07-10',
'authorityId': '5011900202',
'parts': [
{
'rate': '21',
'base': '3887.00',
},
],
},
{
'number': 'BT-26-0987',
'source': 'e-factura',
'direction': 'purchases',
'partnerCif': 'RO51603783',
'partnerName': 'Băuturi Trotuș SRL',
'date': '2026-07-12',
'authorityId': '5011900203',
'parts': [
{
'rate': '21',
'base': '6402.50',
},
],
},
],
},
)
result = response.json() PHP
<?php
$body = <<<'JSON'
{
"operationId": "bafe8dd8-88ba-4fa9-ad25-f4425032312a",
"expectedRevision": 1,
"prefilledOn": "2026-09-04",
"rows": [
{
"rowId": "sales-standard",
"base": "619.40",
"vat": "130.07"
},
{
"rowId": "sales-reduced",
"base": "2988.00",
"vat": "328.68"
},
{
"rowId": "purchases-standard",
"base": "10289.50",
"vat": "2160.80"
},
{
"rowId": "purchases-reduced",
"base": "9124.00",
"vat": "1003.64"
}
],
"documents": [
{
"number": "BRT-2026-00044",
"source": "e-factura",
"direction": "sales",
"partnerCif": "RO39172614",
"partnerName": "Cofetăria Vălul Alb SRL",
"date": "2026-07-04",
"authorityId": "5011900200",
"parts": [
{
"rate": "21",
"base": "619.40"
},
{
"rate": "11",
"base": "2988.00"
}
]
},
{
"number": "LD-2026-3187",
"source": "e-factura",
"direction": "purchases",
"partnerCif": "RO51603546",
"partnerName": "Brânzeturi Obcina SRL",
"date": "2026-07-06",
"authorityId": "5011900201",
"parts": [
{
"rate": "11",
"base": "9124.00"
}
]
},
{
"number": "AC-004402",
"source": "e-factura",
"direction": "purchases",
"partnerCif": "RO51603619",
"partnerName": "Ambalaje Carpatin SRL",
"date": "2026-07-10",
"authorityId": "5011900202",
"parts": [
{
"rate": "21",
"base": "3887.00"
}
]
},
{
"number": "BT-26-0987",
"source": "e-factura",
"direction": "purchases",
"partnerCif": "RO51603783",
"partnerName": "Băuturi Trotuș SRL",
"date": "2026-07-12",
"authorityId": "5011900203",
"parts": [
{
"rate": "21",
"base": "6402.50"
}
]
}
]
}
JSON;
$curl = curl_init(getenv('RDC_BASE_URL') . '/etva/v1/periods/06cc614a-c8f2-40fc-984c-a09bcd5cdf2c/imports/prefilled');
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/06cc614a-c8f2-40fc-984c-a09bcd5cdf2c/imports/prefilled");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
"operationId": "bafe8dd8-88ba-4fa9-ad25-f4425032312a",
"expectedRevision": 1,
"prefilledOn": "2026-09-04",
"rows": [
{
"rowId": "sales-standard",
"base": "619.40",
"vat": "130.07"
},
{
"rowId": "sales-reduced",
"base": "2988.00",
"vat": "328.68"
},
{
"rowId": "purchases-standard",
"base": "10289.50",
"vat": "2160.80"
},
{
"rowId": "purchases-reduced",
"base": "9124.00",
"vat": "1003.64"
}
],
"documents": [
{
"number": "BRT-2026-00044",
"source": "e-factura",
"direction": "sales",
"partnerCif": "RO39172614",
"partnerName": "Cofetăria Vălul Alb SRL",
"date": "2026-07-04",
"authorityId": "5011900200",
"parts": [
{
"rate": "21",
"base": "619.40"
},
{
"rate": "11",
"base": "2988.00"
}
]
},
{
"number": "LD-2026-3187",
"source": "e-factura",
"direction": "purchases",
"partnerCif": "RO51603546",
"partnerName": "Brânzeturi Obcina SRL",
"date": "2026-07-06",
"authorityId": "5011900201",
"parts": [
{
"rate": "11",
"base": "9124.00"
}
]
},
{
"number": "AC-004402",
"source": "e-factura",
"direction": "purchases",
"partnerCif": "RO51603619",
"partnerName": "Ambalaje Carpatin SRL",
"date": "2026-07-10",
"authorityId": "5011900202",
"parts": [
{
"rate": "21",
"base": "3887.00"
}
]
},
{
"number": "BT-26-0987",
"source": "e-factura",
"direction": "purchases",
"partnerCif": "RO51603783",
"partnerName": "Băuturi Trotuș SRL",
"date": "2026-07-12",
"authorityId": "5011900203",
"parts": [
{
"rate": "21",
"base": "6402.50"
}
]
}
]
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); {
"operationId": "bafe8dd8-88ba-4fa9-ad25-f4425032312a",
"status": "accepted",
"aggregateId": "06cc614a-c8f2-40fc-984c-a09bcd5cdf2c",
"aggregateRevision": 2
} Import the postings
Send the postings of your ledger for the month. Your return is the sum of these postings. The revision is now 2, the one the previous answer returned.
Import the postings
curl
curl -X POST "$RDC_BASE_URL/etva/v1/periods/06cc614a-c8f2-40fc-984c-a09bcd5cdf2c/imports/postings" \
-H "Authorization: Bearer $RDC_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"operationId": "6209510a-497a-47d9-8cc1-961d3560ddd3",
"expectedRevision": 2,
"source": "ledger",
"postings": [
{
"number": "BRT-2026-00044",
"direction": "sales",
"partnerCif": "RO39172614",
"partnerName": "Cofetăria Vălul Alb SRL",
"date": "2026-07-04",
"parts": [
{
"rate": "21",
"base": "619.40"
},
{
"rate": "11",
"base": "2988.00"
}
]
},
{
"number": "LD-2026-3187",
"direction": "purchases",
"partnerCif": "RO51603546",
"partnerName": "Brânzeturi Obcina SRL",
"date": "2026-07-06",
"parts": [
{
"rate": "11",
"base": "9124.00"
}
]
},
{
"number": "AC-004402",
"direction": "purchases",
"partnerCif": "RO51603619",
"partnerName": "Ambalaje Carpatin SRL",
"date": "2026-07-10",
"parts": [
{
"rate": "21",
"base": "3887.00"
}
]
}
]
}' JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/etva/v1/periods/06cc614a-c8f2-40fc-984c-a09bcd5cdf2c/imports/postings`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"operationId": "6209510a-497a-47d9-8cc1-961d3560ddd3",
"expectedRevision": 2,
"source": "ledger",
"postings": [
{
"number": "BRT-2026-00044",
"direction": "sales",
"partnerCif": "RO39172614",
"partnerName": "Cofetăria Vălul Alb SRL",
"date": "2026-07-04",
"parts": [
{
"rate": "21",
"base": "619.40"
},
{
"rate": "11",
"base": "2988.00"
}
]
},
{
"number": "LD-2026-3187",
"direction": "purchases",
"partnerCif": "RO51603546",
"partnerName": "Brânzeturi Obcina SRL",
"date": "2026-07-06",
"parts": [
{
"rate": "11",
"base": "9124.00"
}
]
},
{
"number": "AC-004402",
"direction": "purchases",
"partnerCif": "RO51603619",
"partnerName": "Ambalaje Carpatin SRL",
"date": "2026-07-10",
"parts": [
{
"rate": "21",
"base": "3887.00"
}
]
}
]
}),
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'POST',
f'{os.environ["RDC_BASE_URL"]}/etva/v1/periods/06cc614a-c8f2-40fc-984c-a09bcd5cdf2c/imports/postings',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
json={
'operationId': '6209510a-497a-47d9-8cc1-961d3560ddd3',
'expectedRevision': 2,
'source': 'ledger',
'postings': [
{
'number': 'BRT-2026-00044',
'direction': 'sales',
'partnerCif': 'RO39172614',
'partnerName': 'Cofetăria Vălul Alb SRL',
'date': '2026-07-04',
'parts': [
{
'rate': '21',
'base': '619.40',
},
{
'rate': '11',
'base': '2988.00',
},
],
},
{
'number': 'LD-2026-3187',
'direction': 'purchases',
'partnerCif': 'RO51603546',
'partnerName': 'Brânzeturi Obcina SRL',
'date': '2026-07-06',
'parts': [
{
'rate': '11',
'base': '9124.00',
},
],
},
{
'number': 'AC-004402',
'direction': 'purchases',
'partnerCif': 'RO51603619',
'partnerName': 'Ambalaje Carpatin SRL',
'date': '2026-07-10',
'parts': [
{
'rate': '21',
'base': '3887.00',
},
],
},
],
},
)
result = response.json() PHP
<?php
$body = <<<'JSON'
{
"operationId": "6209510a-497a-47d9-8cc1-961d3560ddd3",
"expectedRevision": 2,
"source": "ledger",
"postings": [
{
"number": "BRT-2026-00044",
"direction": "sales",
"partnerCif": "RO39172614",
"partnerName": "Cofetăria Vălul Alb SRL",
"date": "2026-07-04",
"parts": [
{
"rate": "21",
"base": "619.40"
},
{
"rate": "11",
"base": "2988.00"
}
]
},
{
"number": "LD-2026-3187",
"direction": "purchases",
"partnerCif": "RO51603546",
"partnerName": "Brânzeturi Obcina SRL",
"date": "2026-07-06",
"parts": [
{
"rate": "11",
"base": "9124.00"
}
]
},
{
"number": "AC-004402",
"direction": "purchases",
"partnerCif": "RO51603619",
"partnerName": "Ambalaje Carpatin SRL",
"date": "2026-07-10",
"parts": [
{
"rate": "21",
"base": "3887.00"
}
]
}
]
}
JSON;
$curl = curl_init(getenv('RDC_BASE_URL') . '/etva/v1/periods/06cc614a-c8f2-40fc-984c-a09bcd5cdf2c/imports/postings');
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/06cc614a-c8f2-40fc-984c-a09bcd5cdf2c/imports/postings");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
"operationId": "6209510a-497a-47d9-8cc1-961d3560ddd3",
"expectedRevision": 2,
"source": "ledger",
"postings": [
{
"number": "BRT-2026-00044",
"direction": "sales",
"partnerCif": "RO39172614",
"partnerName": "Cofetăria Vălul Alb SRL",
"date": "2026-07-04",
"parts": [
{
"rate": "21",
"base": "619.40"
},
{
"rate": "11",
"base": "2988.00"
}
]
},
{
"number": "LD-2026-3187",
"direction": "purchases",
"partnerCif": "RO51603546",
"partnerName": "Brânzeturi Obcina SRL",
"date": "2026-07-06",
"parts": [
{
"rate": "11",
"base": "9124.00"
}
]
},
{
"number": "AC-004402",
"direction": "purchases",
"partnerCif": "RO51603619",
"partnerName": "Ambalaje Carpatin SRL",
"date": "2026-07-10",
"parts": [
{
"rate": "21",
"base": "3887.00"
}
]
}
]
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); {
"operationId": "6209510a-497a-47d9-8cc1-961d3560ddd3",
"status": "accepted",
"aggregateId": "06cc614a-c8f2-40fc-984c-a09bcd5cdf2c",
"aggregateRevision": 3
} Read the rows
The four rows come in a fixed order. In this month three rows are aligned and one, purchases at the standard rate, is to_review: the pre-filled return lists a purchase invoice that the ledger does not hold.
List the rows
curl
curl "$RDC_BASE_URL/etva/v1/periods/06cc614a-c8f2-40fc-984c-a09bcd5cdf2c/rows" \
-H "Authorization: Bearer $RDC_TOKEN" JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/etva/v1/periods/06cc614a-c8f2-40fc-984c-a09bcd5cdf2c/rows`, {
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/06cc614a-c8f2-40fc-984c-a09bcd5cdf2c/rows',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
)
result = response.json() PHP
<?php
$curl = curl_init(getenv('RDC_BASE_URL') . '/etva/v1/periods/06cc614a-c8f2-40fc-984c-a09bcd5cdf2c/rows');
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/06cc614a-c8f2-40fc-984c-a09bcd5cdf2c/rows");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); {
"items": [
{
"id": "sales-standard",
"periodId": "06cc614a-c8f2-40fc-984c-a09bcd5cdf2c",
"side": "sales",
"rate": "21",
"title": "Sales at 21%",
"yours": {
"base": "619.40",
"vat": "130.07"
},
"prefilled": {
"base": "619.40",
"vat": "130.07"
},
"difference": {
"base": "0.00",
"vat": "0.00",
"percent": "0.00"
},
"marked": false,
"status": "aligned",
"differenceIds": []
},
{
"id": "sales-reduced",
"periodId": "06cc614a-c8f2-40fc-984c-a09bcd5cdf2c",
"side": "sales",
"rate": "11",
"title": "Sales at 11%",
"yours": {
"base": "2988.00",
"vat": "328.68"
},
"prefilled": {
"base": "2988.00",
"vat": "328.68"
},
"difference": {
"base": "0.00",
"vat": "0.00",
"percent": "0.00"
},
"marked": false,
"status": "aligned",
"differenceIds": []
},
{
"id": "purchases-standard",
"periodId": "06cc614a-c8f2-40fc-984c-a09bcd5cdf2c",
"side": "purchases",
"rate": "21",
"title": "Purchases at 21%",
"yours": {
"base": "3887.00",
"vat": "816.27"
},
"prefilled": {
"base": "10289.50",
"vat": "2160.80"
},
"difference": {
"base": "-6402.50",
"vat": "-1344.53",
"percent": "-62.22"
},
"marked": true,
"status": "to_review",
"differenceIds": [
"02c267d0-b16c-40bc-8e85-40fa49f79e44"
]
},
{
"id": "purchases-reduced",
"periodId": "06cc614a-c8f2-40fc-984c-a09bcd5cdf2c",
"side": "purchases",
"rate": "11",
"title": "Purchases at 11%",
"yours": {
"base": "9124.00",
"vat": "1003.64"
},
"prefilled": {
"base": "9124.00",
"vat": "1003.64"
},
"difference": {
"base": "0.00",
"vat": "0.00",
"percent": "0.00"
},
"marked": false,
"status": "aligned",
"differenceIds": []
}
],
"nextCursor": null
} | Status | Meaning |
|---|---|
| The request was recorded and is being applied. | |
| The change was applied. | |
| The request was refused. Nothing was changed. |
Find the difference
List the open differences. This one is of kind not-posted: its effects name the row and the VAT it moves, and reasons lists the reasons that fit it. Resolve a missing invoice takes it from here.
List the open differences
curl
curl "$RDC_BASE_URL/etva/v1/periods/06cc614a-c8f2-40fc-984c-a09bcd5cdf2c/differences?state=open" \
-H "Authorization: Bearer $RDC_TOKEN" JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/etva/v1/periods/06cc614a-c8f2-40fc-984c-a09bcd5cdf2c/differences?state=open`, {
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/06cc614a-c8f2-40fc-984c-a09bcd5cdf2c/differences?state=open',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
)
result = response.json() PHP
<?php
$curl = curl_init(getenv('RDC_BASE_URL') . '/etva/v1/periods/06cc614a-c8f2-40fc-984c-a09bcd5cdf2c/differences?state=open');
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/06cc614a-c8f2-40fc-984c-a09bcd5cdf2c/differences?state=open");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); {
"items": [
{
"id": "02c267d0-b16c-40bc-8e85-40fa49f79e44",
"periodId": "06cc614a-c8f2-40fc-984c-a09bcd5cdf2c",
"kind": "not-posted",
"rowIds": [
"purchases-standard"
],
"effects": [
{
"rowId": "purchases-standard",
"base": "-6402.50",
"vat": "-1344.53"
}
],
"vat": "-1344.53",
"documentId": "03a4d17f-7990-4cac-8017-f465f934aceb",
"postingId": null,
"state": "open",
"reasons": [
"not_yet_posted",
"different_period"
],
"reason": null,
"note": null,
"explainedBy": null,
"explainedAt": null
}
],
"nextCursor": null
}