Service-provider mode
Let a company act for an employer with an access permission of kind provider, and read the operations of every employer it acts for.
On this page
A company can act for an employer. In the examples Brumar Distribuție SRL acts for Brumar Retail SRL. The employer gives the company an access permission of kind provider, and the company prepares and transmits with it as a designated person would.
Give the access permission
Add both companies
The employer and the provider are employers of your account. See Add an employer.
Add the access permission for the employer
Send
kindprovider, the name of the company asholder, the scopes and the last day. The sample givesprepare,transmitand keepsapprovewith the employer’s own designated person.
Add an access permission for a provider
curl
curl -X POST "$RDC_BASE_URL/reges/v1/employers/6f90be8d-78b7-4a97-9b06-7cc6db931f53/permissions" \
-H "Authorization: Bearer $RDC_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"operationId": "0ffc2a96-b45a-4b42-918e-01026d1adcf1",
"kind": "provider",
"holder": "Brumar Distribuție SRL",
"scope": [
"prepare",
"transmit"
],
"expires": "2027-06-30"
}' JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/reges/v1/employers/6f90be8d-78b7-4a97-9b06-7cc6db931f53/permissions`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"operationId": "0ffc2a96-b45a-4b42-918e-01026d1adcf1",
"kind": "provider",
"holder": "Brumar Distribuție SRL",
"scope": [
"prepare",
"transmit"
],
"expires": "2027-06-30"
}),
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'POST',
f'{os.environ["RDC_BASE_URL"]}/reges/v1/employers/6f90be8d-78b7-4a97-9b06-7cc6db931f53/permissions',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
json={
'operationId': '0ffc2a96-b45a-4b42-918e-01026d1adcf1',
'kind': 'provider',
'holder': 'Brumar Distribuție SRL',
'scope': [
'prepare',
'transmit',
],
'expires': '2027-06-30',
},
)
result = response.json() PHP
<?php
$body = <<<'JSON'
{
"operationId": "0ffc2a96-b45a-4b42-918e-01026d1adcf1",
"kind": "provider",
"holder": "Brumar Distribuție SRL",
"scope": [
"prepare",
"transmit"
],
"expires": "2027-06-30"
}
JSON;
$curl = curl_init(getenv('RDC_BASE_URL') . '/reges/v1/employers/6f90be8d-78b7-4a97-9b06-7cc6db931f53/permissions');
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")}/reges/v1/employers/6f90be8d-78b7-4a97-9b06-7cc6db931f53/permissions");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
"operationId": "0ffc2a96-b45a-4b42-918e-01026d1adcf1",
"kind": "provider",
"holder": "Brumar Distribuție SRL",
"scope": [
"prepare",
"transmit"
],
"expires": "2027-06-30"
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); {
"operationId": "0ffc2a96-b45a-4b42-918e-01026d1adcf1",
"status": "accepted",
"aggregateId": "fda4ecc4-9e6f-4e7f-ab51-001cf3f61806",
"aggregateRevision": 1
} What the provider may do
The scopes of the access permission decide it: prepare, approve and transmit work as for a designated person, and four eyes still apply, so whoever approves is not whoever prepared. An access permission of a provider expires, can be extended and can be revoked like any other. See Designated persons and delegations.
Read the operations of every employer
A provider that acts for several employers uses one account and one list call: change employerId to read the next employer. status, kind, dueBefore and late narrow the list. listLate and listSubmissions take employerId the same way.
curl
curl "$RDC_BASE_URL/reges/v1/register-operations?employerId=6e2aa977-c041-49c3-8c57-b9f2cd6cf3f0&limit=3" \
-H "Authorization: Bearer $RDC_TOKEN" JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/reges/v1/register-operations?employerId=6e2aa977-c041-49c3-8c57-b9f2cd6cf3f0&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"]}/reges/v1/register-operations?employerId=6e2aa977-c041-49c3-8c57-b9f2cd6cf3f0&limit=3',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
)
result = response.json() PHP
<?php
$curl = curl_init(getenv('RDC_BASE_URL') . '/reges/v1/register-operations?employerId=6e2aa977-c041-49c3-8c57-b9f2cd6cf3f0&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")}/reges/v1/register-operations?employerId=6e2aa977-c041-49c3-8c57-b9f2cd6cf3f0&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": "27357abf-301f-4956-88af-73c842b85100",
"number": "RG-2026-001471",
"employerId": "6e2aa977-c041-49c3-8c57-b9f2cd6cf3f0",
"contractId": "4fc60d72-3c1e-415c-a931-f0b21bfda436",
"employee": "Mihai Stan",
"kind": "change-salary",
"status": "authorized",
"date": "2026-10-26",
"until": null,
"deadline": {
"date": "2026-11-20",
"rule": "salary",
"from": "2026-10-26",
"workingDaysLeft": -1
},
"late": true,
"details": {
"date": "2026-10-26",
"salary": "5600.00"
},
"preparedBy": {
"id": "f3a70882-0da0-4686-bc0c-f29ce600bb0c",
"name": "Elena Dumitru"
},
"authorizedBy": {
"id": "c403d6ca-4254-4be4-8781-6be8b95a3de0",
"name": "Ana Rusu"
},
"transmittedBy": null,
"reference": null,
"rejection": null,
"lateReason": null,
"correctionOf": null,
"attempts": 0,
"history": [
{
"status": "draft",
"at": "2026-10-27T10:02:00Z",
"by": {
"id": "f3a70882-0da0-4686-bc0c-f29ce600bb0c",
"name": "Elena Dumitru"
},
"reference": null,
"message": null,
"reason": null,
"late": false
},
{
"status": "validated",
"at": "2026-10-27T10:10:00Z",
"by": null,
"reference": null,
"message": null,
"reason": null,
"late": false
},
{
"status": "authorized",
"at": "2026-10-28T11:30:00Z",
"by": {
"id": "c403d6ca-4254-4be4-8781-6be8b95a3de0",
"name": "Ana Rusu"
},
"reference": null,
"message": null,
"reason": null,
"late": false
}
],
"revision": 3
},
{
"id": "b5f54bb0-fa5e-43d6-b9fc-b5b0afe9d3d7",
"number": "RG-2026-001481",
"employerId": "6e2aa977-c041-49c3-8c57-b9f2cd6cf3f0",
"contractId": "02b6b76c-19a6-4b97-af20-50b265e9d36d",
"employee": "Radu Ionescu",
"kind": "suspend",
"status": "validated",
"date": "2026-11-18",
"until": null,
"deadline": {
"date": "2026-11-23",
"rule": "suspension-days",
"from": "2026-11-19",
"workingDaysLeft": 0
},
"late": false,
"details": {
"date": "2026-11-18",
"reason": "medical-leave",
"learnedOn": "2026-11-19"
},
"preparedBy": {
"id": "f3a70882-0da0-4686-bc0c-f29ce600bb0c",
"name": "Elena Dumitru"
},
"authorizedBy": null,
"transmittedBy": null,
"reference": null,
"rejection": null,
"lateReason": null,
"correctionOf": null,
"attempts": 0,
"history": [
{
"status": "draft",
"at": "2026-11-19T15:12:00Z",
"by": {
"id": "f3a70882-0da0-4686-bc0c-f29ce600bb0c",
"name": "Elena Dumitru"
},
"reference": null,
"message": null,
"reason": null,
"late": false
},
{
"status": "validated",
"at": "2026-11-19T15:20:00Z",
"by": null,
"reference": null,
"message": null,
"reason": null,
"late": false
}
],
"revision": 2
},
{
"id": "4bbaadac-0dc6-40b0-9470-f26f8177bd8d",
"number": "RG-2026-001483",
"employerId": "6e2aa977-c041-49c3-8c57-b9f2cd6cf3f0",
"contractId": "13156f30-1274-45d1-af53-672ccb3c7e04",
"employee": "Dan Ilie",
"kind": "hire",
"status": "draft",
"date": "2026-12-02",
"until": null,
"deadline": {
"date": "2026-12-01",
"rule": "hire",
"from": "2026-12-02",
"workingDaysLeft": 4
},
"late": false,
"details": {
"date": "2026-12-02"
},
"preparedBy": {
"id": "f3a70882-0da0-4686-bc0c-f29ce600bb0c",
"name": "Elena Dumitru"
},
"authorizedBy": null,
"transmittedBy": null,
"reference": null,
"rejection": null,
"lateReason": null,
"correctionOf": null,
"attempts": 0,
"history": [
{
"status": "draft",
"at": "2026-11-20T13:41:00Z",
"by": {
"id": "f3a70882-0da0-4686-bc0c-f29ce600bb0c",
"name": "Elena Dumitru"
},
"reference": null,
"message": null,
"reason": null,
"late": false
}
],
"revision": 1
}
],
"nextCursor": "eyJvZmZzZXQiOjN9"
} Events carry the id of the employer as legalCompanyId, so one endpoint can serve every employer and route each event by that field. See Event envelope.