Authentication
Get client credentials, request a token and call the REGES Gateway API with it.
On this page
Client credentials, your base address and a test company are issued with your account. Accounts are opened by our team: ask for one through the contact form and we set it up with you.
Request an accountRequest a token
The API uses OAuth 2.0 with the client credentials flow. Your client asks the sign-in service for a token with the scope reges.access and sends it as a bearer token on every request.
curl -X POST "$RDC_TOKEN_URL" \
-d "grant_type=client_credentials" \
-d "client_id=$RDC_CLIENT_ID" \
-d "client_secret=$RDC_CLIENT_SECRET" \
-d "scope=reges.access" The answer carries these fields.
| Field | Meaning |
|---|---|
access_token | The token. Send it as Authorization: Bearer $RDC_TOKEN. |
token_type | Always Bearer. |
expires_in | Seconds until the token ends. Reuse the token until then and ask for a new one before it ends. Never ask for a token per request. |
Call the API
Every request carries the token. The sample lists records and shows the header in each language.
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"
} Refused requests
| Status | Code | Cause | What to do |
|---|---|---|---|
401 | unauthorized | No token, or a token that is not valid or has ended. | Ask for a new token, then repeat the request. |
403 | forbidden | A valid token without the scope reges.access, or a request for data outside your account. | Do not repeat it. Check the scope and the company. |
Build against the test company first. Read Sandbox and live.
The full rule: Developer guide