Post a day of sales
Send the closed day of a shop as one posting request: the base and the VAT of each rate and the payments in cash and by card.
On this page
A shop sells at several rates in one day. The POS closes the day and submits it as one document of the type sales_day, with the number of the day's report. Here Z-0441 sells at 11% and at 21%: 32500.50 net, 4621.24 VAT and 37121.74 in all.
The facts
- One
amountfact for each rate, with the base and the VAT of that rate. The VAT of a rate is computed on the base of the rate, not line by line. - One
paymentfact withmethodcashand one withcard. The two add up to the gross of the day. effectiveDateis the day of sales.
Submit the day
curl
curl -X POST "$RDC_BASE_URL/accounting/v1/posting-requests" \
-H "Authorization: Bearer $RDC_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"operationId": "b7dac1d5-87b3-498a-a7fc-d088aced32b1",
"postingRequestId": "a517d363-44de-423d-9f16-508713a73b69",
"customerOrgId": "bdbc5b26-3f8a-4c1a-8c21-6c396293da32",
"legalCompanyId": "8373a2b0-3239-4aee-b6c8-56d7829a746d",
"sourceDocumentId": "41b164ff-8962-4eb6-a004-132ac489fcc3",
"sourceDocumentType": "sales_day",
"sourceRevision": 2,
"eventId": "2c16876c-76ce-4c4c-8a75-461d882ce697",
"effectiveDate": "2026-10-30",
"currency": "RON",
"mappingPolicyVersion": "ro-2026.1",
"correlationId": "6e630b7e-1457-4e21-918f-eefe03596daf",
"facts": [
{
"type": "document",
"number": "Z-0441",
"date": "2026-10-30"
},
{
"type": "amount",
"rate": "11",
"base": "22038.70",
"vat": "2424.26"
},
{
"type": "amount",
"rate": "21",
"base": "10461.80",
"vat": "2196.98"
},
{
"type": "payment",
"method": "cash",
"amount": "13950.00"
},
{
"type": "payment",
"method": "card",
"amount": "23171.74"
}
]
}' JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/accounting/v1/posting-requests`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"operationId": "b7dac1d5-87b3-498a-a7fc-d088aced32b1",
"postingRequestId": "a517d363-44de-423d-9f16-508713a73b69",
"customerOrgId": "bdbc5b26-3f8a-4c1a-8c21-6c396293da32",
"legalCompanyId": "8373a2b0-3239-4aee-b6c8-56d7829a746d",
"sourceDocumentId": "41b164ff-8962-4eb6-a004-132ac489fcc3",
"sourceDocumentType": "sales_day",
"sourceRevision": 2,
"eventId": "2c16876c-76ce-4c4c-8a75-461d882ce697",
"effectiveDate": "2026-10-30",
"currency": "RON",
"mappingPolicyVersion": "ro-2026.1",
"correlationId": "6e630b7e-1457-4e21-918f-eefe03596daf",
"facts": [
{
"type": "document",
"number": "Z-0441",
"date": "2026-10-30"
},
{
"type": "amount",
"rate": "11",
"base": "22038.70",
"vat": "2424.26"
},
{
"type": "amount",
"rate": "21",
"base": "10461.80",
"vat": "2196.98"
},
{
"type": "payment",
"method": "cash",
"amount": "13950.00"
},
{
"type": "payment",
"method": "card",
"amount": "23171.74"
}
]
}),
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'POST',
f'{os.environ["RDC_BASE_URL"]}/accounting/v1/posting-requests',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
json={
'operationId': 'b7dac1d5-87b3-498a-a7fc-d088aced32b1',
'postingRequestId': 'a517d363-44de-423d-9f16-508713a73b69',
'customerOrgId': 'bdbc5b26-3f8a-4c1a-8c21-6c396293da32',
'legalCompanyId': '8373a2b0-3239-4aee-b6c8-56d7829a746d',
'sourceDocumentId': '41b164ff-8962-4eb6-a004-132ac489fcc3',
'sourceDocumentType': 'sales_day',
'sourceRevision': 2,
'eventId': '2c16876c-76ce-4c4c-8a75-461d882ce697',
'effectiveDate': '2026-10-30',
'currency': 'RON',
'mappingPolicyVersion': 'ro-2026.1',
'correlationId': '6e630b7e-1457-4e21-918f-eefe03596daf',
'facts': [
{
'type': 'document',
'number': 'Z-0441',
'date': '2026-10-30',
},
{
'type': 'amount',
'rate': '11',
'base': '22038.70',
'vat': '2424.26',
},
{
'type': 'amount',
'rate': '21',
'base': '10461.80',
'vat': '2196.98',
},
{
'type': 'payment',
'method': 'cash',
'amount': '13950.00',
},
{
'type': 'payment',
'method': 'card',
'amount': '23171.74',
},
],
},
)
result = response.json() PHP
<?php
$body = <<<'JSON'
{
"operationId": "b7dac1d5-87b3-498a-a7fc-d088aced32b1",
"postingRequestId": "a517d363-44de-423d-9f16-508713a73b69",
"customerOrgId": "bdbc5b26-3f8a-4c1a-8c21-6c396293da32",
"legalCompanyId": "8373a2b0-3239-4aee-b6c8-56d7829a746d",
"sourceDocumentId": "41b164ff-8962-4eb6-a004-132ac489fcc3",
"sourceDocumentType": "sales_day",
"sourceRevision": 2,
"eventId": "2c16876c-76ce-4c4c-8a75-461d882ce697",
"effectiveDate": "2026-10-30",
"currency": "RON",
"mappingPolicyVersion": "ro-2026.1",
"correlationId": "6e630b7e-1457-4e21-918f-eefe03596daf",
"facts": [
{
"type": "document",
"number": "Z-0441",
"date": "2026-10-30"
},
{
"type": "amount",
"rate": "11",
"base": "22038.70",
"vat": "2424.26"
},
{
"type": "amount",
"rate": "21",
"base": "10461.80",
"vat": "2196.98"
},
{
"type": "payment",
"method": "cash",
"amount": "13950.00"
},
{
"type": "payment",
"method": "card",
"amount": "23171.74"
}
]
}
JSON;
$curl = curl_init(getenv('RDC_BASE_URL') . '/accounting/v1/posting-requests');
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")}/accounting/v1/posting-requests");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
"operationId": "b7dac1d5-87b3-498a-a7fc-d088aced32b1",
"postingRequestId": "a517d363-44de-423d-9f16-508713a73b69",
"customerOrgId": "bdbc5b26-3f8a-4c1a-8c21-6c396293da32",
"legalCompanyId": "8373a2b0-3239-4aee-b6c8-56d7829a746d",
"sourceDocumentId": "41b164ff-8962-4eb6-a004-132ac489fcc3",
"sourceDocumentType": "sales_day",
"sourceRevision": 2,
"eventId": "2c16876c-76ce-4c4c-8a75-461d882ce697",
"effectiveDate": "2026-10-30",
"currency": "RON",
"mappingPolicyVersion": "ro-2026.1",
"correlationId": "6e630b7e-1457-4e21-918f-eefe03596daf",
"facts": [
{
"type": "document",
"number": "Z-0441",
"date": "2026-10-30"
},
{
"type": "amount",
"rate": "11",
"base": "22038.70",
"vat": "2424.26"
},
{
"type": "amount",
"rate": "21",
"base": "10461.80",
"vat": "2196.98"
},
{
"type": "payment",
"method": "cash",
"amount": "13950.00"
},
{
"type": "payment",
"method": "card",
"amount": "23171.74"
}
]
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); {
"operationId": "b7dac1d5-87b3-498a-a7fc-d088aced32b1",
"status": "accepted",
"aggregateId": "a517d363-44de-423d-9f16-508713a73b69",
"aggregateRevision": 1
} The entry
Cash goes to the cash account. The part paid by card goes to amounts in course of settlement until the bank credits it. Revenue and collected VAT are on the credit side. Debit equals credit, and the sum of both payments is the sum of net and VAT.
Get the posting request
curl
curl "$RDC_BASE_URL/accounting/v1/posting-requests/a517d363-44de-423d-9f16-508713a73b69" \
-H "Authorization: Bearer $RDC_TOKEN" JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/accounting/v1/posting-requests/a517d363-44de-423d-9f16-508713a73b69`, {
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"]}/accounting/v1/posting-requests/a517d363-44de-423d-9f16-508713a73b69',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
)
result = response.json() PHP
<?php
$curl = curl_init(getenv('RDC_BASE_URL') . '/accounting/v1/posting-requests/a517d363-44de-423d-9f16-508713a73b69');
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")}/accounting/v1/posting-requests/a517d363-44de-423d-9f16-508713a73b69");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); {
"postingRequestId": "a517d363-44de-423d-9f16-508713a73b69",
"status": "posted",
"sourceDocumentId": "41b164ff-8962-4eb6-a004-132ac489fcc3",
"sourceDocumentType": "sales_day",
"sourceRevision": 2,
"effectiveDate": "2026-10-30",
"mappingPolicyVersion": "ro-2026.1",
"journalEntryId": "d75fc649-ee06-4dfb-ab83-94b5f1209aa8",
"rejection": null,
"aggregateRevision": 2
} Get the entry
curl
curl "$RDC_BASE_URL/accounting/v1/journal-entries/d75fc649-ee06-4dfb-ab83-94b5f1209aa8" \
-H "Authorization: Bearer $RDC_TOKEN" JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/accounting/v1/journal-entries/d75fc649-ee06-4dfb-ab83-94b5f1209aa8`, {
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"]}/accounting/v1/journal-entries/d75fc649-ee06-4dfb-ab83-94b5f1209aa8',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
)
result = response.json() PHP
<?php
$curl = curl_init(getenv('RDC_BASE_URL') . '/accounting/v1/journal-entries/d75fc649-ee06-4dfb-ab83-94b5f1209aa8');
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")}/accounting/v1/journal-entries/d75fc649-ee06-4dfb-ab83-94b5f1209aa8");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); {
"id": "d75fc649-ee06-4dfb-ab83-94b5f1209aa8",
"number": "JE-2026-10-0008",
"entryDate": "2026-10-30",
"period": "2026-10",
"sourceDocumentId": "41b164ff-8962-4eb6-a004-132ac489fcc3",
"lines": [
{
"account": "5311",
"accountName": "Cash in lei",
"debit": "13950.00",
"credit": "0.00"
},
{
"account": "5125",
"accountName": "Amounts in course of settlement",
"debit": "23171.74",
"credit": "0.00"
},
{
"account": "707",
"accountName": "Revenue from the sale of goods",
"debit": "0.00",
"credit": "32500.50"
},
{
"account": "4427",
"accountName": "Collected VAT",
"debit": "0.00",
"credit": "4621.24"
}
],
"reversalOf": null,
"reversedBy": null,
"reason": null,
"postedAt": "2026-11-23T07:12:00Z",
"aggregateRevision": 1
}