Accounting-firm access
One account for many companies: how a firm that sends for its clients holds, selects and separates them.
On this page
A firm that keeps the books of many clients uses one account and one set of client credentials. Each client is a company of the account, with its own CIF, its own authorisation and its own invoices. The product window shows the same thing as a company menu.
One account, many companies
Add each client
Add a company for every client. The list of companies shows them all.
Each client authorises
The representative of each client confirms access at the authority. See Authorise access at the authority.
Name the company on every request
Lists take
companyId, and a new invoice carries it in its body. An invoice, a message or a file is found by its ownid.
curl
curl "$RDC_BASE_URL/efactura/v1/companies?limit=20" \
-H "Authorization: Bearer $RDC_TOKEN" JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/efactura/v1/companies?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"]}/efactura/v1/companies?limit=20',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
)
result = response.json() PHP
<?php
$curl = curl_init(getenv('RDC_BASE_URL') . '/efactura/v1/companies?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")}/efactura/v1/companies?limit=20");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); {
"items": [
{
"id": "c6a26b8c-3323-4e7a-8611-f5a92f5e1a42",
"name": "Brumar Distribuție SRL",
"cif": "48290619",
"vatId": "RO48290619",
"authorisation": {
"status": "active",
"expires": "2027-03-12",
"authorisedBy": {
"name": "Ana Rusu",
"role": "Finance director"
},
"scope": [
"send",
"receive"
],
"renewal": null
},
"sync": {
"paused": false,
"lastAt": "2026-11-23T05:00:00Z"
},
"endpoint": {
"host": "erp.brumar.example",
"status": "healthy",
"http": 200
},
"revision": 1
},
{
"id": "aaa74c23-5c48-4055-82e9-dc5c4c36c13e",
"name": "Brumar Retail SRL",
"cif": "48290783",
"vatId": "RO48290783",
"authorisation": {
"status": "renewal_needed",
"expires": "2026-12-03",
"authorisedBy": {
"name": "Ioana Marin",
"role": "Chief accountant"
},
"scope": [
"send",
"receive"
],
"renewal": null
},
"sync": {
"paused": false,
"lastAt": "2026-11-23T05:00:00Z"
},
"endpoint": {
"host": "pos.brumar.example",
"status": "failing",
"http": 503
},
"revision": 1
}
],
"nextCursor": null
} Keeping clients apart
- Lists show only the company you name. A request for a company that is not in your account is refused.
- Events carry
legalCompanyId, so one endpoint can serve every client and route each event to the right client by that field. A subscription belongs to one company and has its own signing secret, so an endpoint that serves many clients keeps one secret for each. - The client credentials give access to every company of the account. Keep them in your own back end and give each client only what your software shows them.