Generate documents
Issue a certificate from its template, list the certificates of a person and read their text in English or Romanian.
On this page
A certificate is produced from a template with the data of the person on the day it is issued. It takes the next number, is listed in the record of the person and keeps its text: a certificate that was issued is not rewritten when the person’s job changes later. There are two templates: employment, which states the person, the job, the department, the first day and the contract, and salary, which also states the gross monthly salary.
Issue it
Issue a document names the person, the template and the HR lead as actorId. It is refused for a person who has not started work yet (not_started) and for one whose last day has passed (employment_ended).
curl
curl -X POST "$RDC_BASE_URL/hr/v1/employees/11729ba4-78ca-4dfb-9165-03367b42d67a/documents" \
-H "Authorization: Bearer $RDC_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"expectedRevision": 1,
"kind": "employment",
"actorId": "a31a1dd1-9214-434e-a00a-db907727f048",
"operationId": "48763436-0b7b-45d9-9c0d-ca96d286fe7d"
}' JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/hr/v1/employees/11729ba4-78ca-4dfb-9165-03367b42d67a/documents`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"expectedRevision": 1,
"kind": "employment",
"actorId": "a31a1dd1-9214-434e-a00a-db907727f048",
"operationId": "48763436-0b7b-45d9-9c0d-ca96d286fe7d"
}),
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'POST',
f'{os.environ["RDC_BASE_URL"]}/hr/v1/employees/11729ba4-78ca-4dfb-9165-03367b42d67a/documents',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
json={
'expectedRevision': 1,
'kind': 'employment',
'actorId': 'a31a1dd1-9214-434e-a00a-db907727f048',
'operationId': '48763436-0b7b-45d9-9c0d-ca96d286fe7d',
},
)
result = response.json() PHP
<?php
$body = <<<'JSON'
{
"expectedRevision": 1,
"kind": "employment",
"actorId": "a31a1dd1-9214-434e-a00a-db907727f048",
"operationId": "48763436-0b7b-45d9-9c0d-ca96d286fe7d"
}
JSON;
$curl = curl_init(getenv('RDC_BASE_URL') . '/hr/v1/employees/11729ba4-78ca-4dfb-9165-03367b42d67a/documents');
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")}/hr/v1/employees/11729ba4-78ca-4dfb-9165-03367b42d67a/documents");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
"expectedRevision": 1,
"kind": "employment",
"actorId": "a31a1dd1-9214-434e-a00a-db907727f048",
"operationId": "48763436-0b7b-45d9-9c0d-ca96d286fe7d"
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); {
"operationId": "48763436-0b7b-45d9-9c0d-ca96d286fe7d",
"status": "accepted",
"aggregateRevision": 2
} List the certificates
curl
curl "$RDC_BASE_URL/hr/v1/employees/11729ba4-78ca-4dfb-9165-03367b42d67a/documents" \
-H "Authorization: Bearer $RDC_TOKEN" JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/hr/v1/employees/11729ba4-78ca-4dfb-9165-03367b42d67a/documents`, {
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"]}/hr/v1/employees/11729ba4-78ca-4dfb-9165-03367b42d67a/documents',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
)
result = response.json() PHP
<?php
$curl = curl_init(getenv('RDC_BASE_URL') . '/hr/v1/employees/11729ba4-78ca-4dfb-9165-03367b42d67a/documents');
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")}/hr/v1/employees/11729ba4-78ca-4dfb-9165-03367b42d67a/documents");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); {
"items": [
{
"id": "b2a20d6b-1c5e-4606-90c8-e2738bbb563f",
"number": "AD-2026-0001",
"employeeId": "11729ba4-78ca-4dfb-9165-03367b42d67a",
"kind": "employment",
"issuedOn": "2026-11-23",
"issuedById": "a31a1dd1-9214-434e-a00a-db907727f048"
}
],
"nextCursor": null
} Read the text
Get a document with language returns the text as lines, one string each, ready to print. The same certificate reads in both languages.
curl
curl "$RDC_BASE_URL/hr/v1/employees/11729ba4-78ca-4dfb-9165-03367b42d67a/documents/b2a20d6b-1c5e-4606-90c8-e2738bbb563f" \
-H "Authorization: Bearer $RDC_TOKEN" JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/hr/v1/employees/11729ba4-78ca-4dfb-9165-03367b42d67a/documents/b2a20d6b-1c5e-4606-90c8-e2738bbb563f`, {
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"]}/hr/v1/employees/11729ba4-78ca-4dfb-9165-03367b42d67a/documents/b2a20d6b-1c5e-4606-90c8-e2738bbb563f',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
)
result = response.json() PHP
<?php
$curl = curl_init(getenv('RDC_BASE_URL') . '/hr/v1/employees/11729ba4-78ca-4dfb-9165-03367b42d67a/documents/b2a20d6b-1c5e-4606-90c8-e2738bbb563f');
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")}/hr/v1/employees/11729ba4-78ca-4dfb-9165-03367b42d67a/documents/b2a20d6b-1c5e-4606-90c8-e2738bbb563f");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); {
"id": "b2a20d6b-1c5e-4606-90c8-e2738bbb563f",
"number": "AD-2026-0001",
"employeeId": "11729ba4-78ca-4dfb-9165-03367b42d67a",
"kind": "employment",
"issuedOn": "2026-11-23",
"issuedById": "a31a1dd1-9214-434e-a00a-db907727f048",
"language": "en",
"lines": [
"Certificate AD-2026-0001",
"Brumar Distribuție SRL certifies that Dan Ilie has worked at the company since 7 February 2022 as Picker, in the Warehouse department, on an indefinite contract.",
"Issued on 23 November 2026."
]
} curl
curl "$RDC_BASE_URL/hr/v1/employees/11729ba4-78ca-4dfb-9165-03367b42d67a/documents/b2a20d6b-1c5e-4606-90c8-e2738bbb563f?language=ro" \
-H "Authorization: Bearer $RDC_TOKEN" JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/hr/v1/employees/11729ba4-78ca-4dfb-9165-03367b42d67a/documents/b2a20d6b-1c5e-4606-90c8-e2738bbb563f?language=ro`, {
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"]}/hr/v1/employees/11729ba4-78ca-4dfb-9165-03367b42d67a/documents/b2a20d6b-1c5e-4606-90c8-e2738bbb563f?language=ro',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
)
result = response.json() PHP
<?php
$curl = curl_init(getenv('RDC_BASE_URL') . '/hr/v1/employees/11729ba4-78ca-4dfb-9165-03367b42d67a/documents/b2a20d6b-1c5e-4606-90c8-e2738bbb563f?language=ro');
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")}/hr/v1/employees/11729ba4-78ca-4dfb-9165-03367b42d67a/documents/b2a20d6b-1c5e-4606-90c8-e2738bbb563f?language=ro");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); {
"id": "b2a20d6b-1c5e-4606-90c8-e2738bbb563f",
"number": "AD-2026-0001",
"employeeId": "11729ba4-78ca-4dfb-9165-03367b42d67a",
"kind": "employment",
"issuedOn": "2026-11-23",
"issuedById": "a31a1dd1-9214-434e-a00a-db907727f048",
"language": "ro",
"lines": [
"Adeverința AD-2026-0001",
"Brumar Distribuție SRL certifică faptul că Dan Ilie lucrează în cadrul societății din 7 februarie 2022, în funcția de Pregătitor de comenzi, în departamentul Depozit, cu un contract pe durată nedeterminată.",
"Eliberată la data de 23 noiembrie 2026."
]
} Who issues
Only the HR lead issues documents. A request in the name of anyone else is refused with 422 and not_allowed, and no number is used.
curl
curl -X POST "$RDC_BASE_URL/hr/v1/employees/11729ba4-78ca-4dfb-9165-03367b42d67a/documents" \
-H "Authorization: Bearer $RDC_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"operationId": "5a7d2c90-1e48-4b63-a9f5-8c0b3e6d7124",
"expectedRevision": 1,
"kind": "employment",
"actorId": "11729ba4-78ca-4dfb-9165-03367b42d67a"
}' JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/hr/v1/employees/11729ba4-78ca-4dfb-9165-03367b42d67a/documents`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"operationId": "5a7d2c90-1e48-4b63-a9f5-8c0b3e6d7124",
"expectedRevision": 1,
"kind": "employment",
"actorId": "11729ba4-78ca-4dfb-9165-03367b42d67a"
}),
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'POST',
f'{os.environ["RDC_BASE_URL"]}/hr/v1/employees/11729ba4-78ca-4dfb-9165-03367b42d67a/documents',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
json={
'operationId': '5a7d2c90-1e48-4b63-a9f5-8c0b3e6d7124',
'expectedRevision': 1,
'kind': 'employment',
'actorId': '11729ba4-78ca-4dfb-9165-03367b42d67a',
},
)
result = response.json() PHP
<?php
$body = <<<'JSON'
{
"operationId": "5a7d2c90-1e48-4b63-a9f5-8c0b3e6d7124",
"expectedRevision": 1,
"kind": "employment",
"actorId": "11729ba4-78ca-4dfb-9165-03367b42d67a"
}
JSON;
$curl = curl_init(getenv('RDC_BASE_URL') . '/hr/v1/employees/11729ba4-78ca-4dfb-9165-03367b42d67a/documents');
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")}/hr/v1/employees/11729ba4-78ca-4dfb-9165-03367b42d67a/documents");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
"operationId": "5a7d2c90-1e48-4b63-a9f5-8c0b3e6d7124",
"expectedRevision": 1,
"kind": "employment",
"actorId": "11729ba4-78ca-4dfb-9165-03367b42d67a"
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); {
"code": "not_allowed",
"message": "This person may not do this.",
"requestId": "9b4e1c2a-6d3f-4a78-b5e0-2f8c7d1a3e69"
}