Skip to content
Docs
API 1.0.0 · 22 Nov 2026

Search the docs

    Română

    Quickstart

    Register a first hire in the test environment: prepare it, check it, have it approved by another person, record its transmission and the answer of the register.

    On this page

    You need the client credentials and the base address of your test environment. The samples read them from the environment: $RDC_BASE_URL and $RDC_TOKEN. See Authentication for the token and Sandbox and live for the test environment.

    Three designated persons take part: one prepares, another approves and a third transmits. Each holds the matching access permission for the employer. See Designated persons and delegations.

    Prepare the hire

    Choose a new operationId and send the hire with the id of the employer and the preparer as designatedPerson. The contract is described in hire; the personal number comes in the next step. The gateway computes the deadline from the start date. The data of a hire are transmitted at the latest the day before the person starts work.

    curl

    curl -X POST "$RDC_BASE_URL/reges/v1/register-operations" \
      -H "Authorization: Bearer $RDC_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{
      "operationId": "fd7fb0da-e8d9-4e54-831d-70ff66d2545a",
      "employerId": "6e2aa977-c041-49c3-8c57-b9f2cd6cf3f0",
      "kind": "hire",
      "designatedPerson": "f3a70882-0da0-4686-bc0c-f29ce600bb0c",
      "hire": {
        "employeeName": "Dan Ilie",
        "citizenship": "RO",
        "contractNumber": "CIM 0391/2026",
        "concludedOn": "2026-11-20",
        "startDate": "2026-12-02",
        "occupation": "432102",
        "contractType": "indefinite",
        "workplace": {
          "kind": "fixed",
          "place": "Piatra-Neamț"
        },
        "hoursPerWeek": 40,
        "baseSalary": "4400.00"
      }
    }'

    JavaScript

    const response = await fetch(`${process.env.RDC_BASE_URL}/reges/v1/register-operations`, {
      method: 'POST',
      headers: {
        Authorization: `Bearer ${process.env.RDC_TOKEN}`,
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({
        "operationId": "fd7fb0da-e8d9-4e54-831d-70ff66d2545a",
        "employerId": "6e2aa977-c041-49c3-8c57-b9f2cd6cf3f0",
        "kind": "hire",
        "designatedPerson": "f3a70882-0da0-4686-bc0c-f29ce600bb0c",
        "hire": {
          "employeeName": "Dan Ilie",
          "citizenship": "RO",
          "contractNumber": "CIM 0391/2026",
          "concludedOn": "2026-11-20",
          "startDate": "2026-12-02",
          "occupation": "432102",
          "contractType": "indefinite",
          "workplace": {
            "kind": "fixed",
            "place": "Piatra-Neamț"
          },
          "hoursPerWeek": 40,
          "baseSalary": "4400.00"
        }
      }),
    });
    const result = await response.json();

    Python

    import os
    import requests
    
    response = requests.request(
        'POST',
        f'{os.environ["RDC_BASE_URL"]}/reges/v1/register-operations',
        headers={
            'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
        },
        json={
            'operationId': 'fd7fb0da-e8d9-4e54-831d-70ff66d2545a',
            'employerId': '6e2aa977-c041-49c3-8c57-b9f2cd6cf3f0',
            'kind': 'hire',
            'designatedPerson': 'f3a70882-0da0-4686-bc0c-f29ce600bb0c',
            'hire': {
                'employeeName': 'Dan Ilie',
                'citizenship': 'RO',
                'contractNumber': 'CIM 0391/2026',
                'concludedOn': '2026-11-20',
                'startDate': '2026-12-02',
                'occupation': '432102',
                'contractType': 'indefinite',
                'workplace': {
                    'kind': 'fixed',
                    'place': 'Piatra-Neamț',
                },
                'hoursPerWeek': 40,
                'baseSalary': '4400.00',
            },
        },
    )
    result = response.json()

    PHP

    <?php
    
    $body = <<<'JSON'
    {
      "operationId": "fd7fb0da-e8d9-4e54-831d-70ff66d2545a",
      "employerId": "6e2aa977-c041-49c3-8c57-b9f2cd6cf3f0",
      "kind": "hire",
      "designatedPerson": "f3a70882-0da0-4686-bc0c-f29ce600bb0c",
      "hire": {
        "employeeName": "Dan Ilie",
        "citizenship": "RO",
        "contractNumber": "CIM 0391/2026",
        "concludedOn": "2026-11-20",
        "startDate": "2026-12-02",
        "occupation": "432102",
        "contractType": "indefinite",
        "workplace": {
          "kind": "fixed",
          "place": "Piatra-Neamț"
        },
        "hoursPerWeek": 40,
        "baseSalary": "4400.00"
      }
    }
    JSON;
    
    $curl = curl_init(getenv('RDC_BASE_URL') . '/reges/v1/register-operations');
    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/register-operations");
    request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
    request.Content = new StringContent("""
    {
      "operationId": "fd7fb0da-e8d9-4e54-831d-70ff66d2545a",
      "employerId": "6e2aa977-c041-49c3-8c57-b9f2cd6cf3f0",
      "kind": "hire",
      "designatedPerson": "f3a70882-0da0-4686-bc0c-f29ce600bb0c",
      "hire": {
        "employeeName": "Dan Ilie",
        "citizenship": "RO",
        "contractNumber": "CIM 0391/2026",
        "concludedOn": "2026-11-20",
        "startDate": "2026-12-02",
        "occupation": "432102",
        "contractType": "indefinite",
        "workplace": {
          "kind": "fixed",
          "place": "Piatra-Neamț"
        },
        "hoursPerWeek": 40,
        "baseSalary": "4400.00"
      }
    }
    """, System.Text.Encoding.UTF8, "application/json");
    var response = await client.SendAsync(request);
    var result = await response.Content.ReadAsStringAsync();

    Response 202

    {
      "operationId": "fd7fb0da-e8d9-4e54-831d-70ff66d2545a",
      "status": "accepted",
      "aggregateId": "447e408d-e905-4304-a4cb-9e82a9788ce6",
      "aggregateRevision": 1
    }

    The answer says that the change was accepted. Look it up with getOperation and the operationId you sent: when status is completed, aggregateId is the registerOperationId of the draft. See Operations.

    Type the personal number

    Edit the draft: the field is personalNumber. Write the number in groups; spaces are ignored. It is checked for structure only and dropped: the contract keeps its last four digits and the birth date. Send the revision you read as expectedRevision.

    curl

    curl -X POST "$RDC_BASE_URL/reges/v1/register-operations/447e408d-e905-4304-a4cb-9e82a9788ce6/edit" \
      -H "Authorization: Bearer $RDC_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{
      "operationId": "91d8dc13-4627-4a5a-9f22-edf7ee81e418",
      "expectedRevision": 1,
      "field": "personalNumber",
      "value": "5 010118 27 532 8"
    }'

    JavaScript

    const response = await fetch(`${process.env.RDC_BASE_URL}/reges/v1/register-operations/447e408d-e905-4304-a4cb-9e82a9788ce6/edit`, {
      method: 'POST',
      headers: {
        Authorization: `Bearer ${process.env.RDC_TOKEN}`,
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({
        "operationId": "91d8dc13-4627-4a5a-9f22-edf7ee81e418",
        "expectedRevision": 1,
        "field": "personalNumber",
        "value": "5 010118 27 532 8"
      }),
    });
    const result = await response.json();

    Python

    import os
    import requests
    
    response = requests.request(
        'POST',
        f'{os.environ["RDC_BASE_URL"]}/reges/v1/register-operations/447e408d-e905-4304-a4cb-9e82a9788ce6/edit',
        headers={
            'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
        },
        json={
            'operationId': '91d8dc13-4627-4a5a-9f22-edf7ee81e418',
            'expectedRevision': 1,
            'field': 'personalNumber',
            'value': '5 010118 27 532 8',
        },
    )
    result = response.json()

    PHP

    <?php
    
    $body = <<<'JSON'
    {
      "operationId": "91d8dc13-4627-4a5a-9f22-edf7ee81e418",
      "expectedRevision": 1,
      "field": "personalNumber",
      "value": "5 010118 27 532 8"
    }
    JSON;
    
    $curl = curl_init(getenv('RDC_BASE_URL') . '/reges/v1/register-operations/447e408d-e905-4304-a4cb-9e82a9788ce6/edit');
    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/register-operations/447e408d-e905-4304-a4cb-9e82a9788ce6/edit");
    request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
    request.Content = new StringContent("""
    {
      "operationId": "91d8dc13-4627-4a5a-9f22-edf7ee81e418",
      "expectedRevision": 1,
      "field": "personalNumber",
      "value": "5 010118 27 532 8"
    }
    """, System.Text.Encoding.UTF8, "application/json");
    var response = await client.SendAsync(request);
    var result = await response.Content.ReadAsStringAsync();

    Response 202

    {
      "operationId": "91d8dc13-4627-4a5a-9f22-edf7ee81e418",
      "status": "accepted",
      "aggregateId": "447e408d-e905-4304-a4cb-9e82a9788ce6",
      "aggregateRevision": 2
    }

    Read the checks

    The gateway checks the draft before it can be validated. canSend is true when no blocking check fails. See Checks before sending.

    Get the checks of an operation

    curl

    curl "$RDC_BASE_URL/reges/v1/register-operations/447e408d-e905-4304-a4cb-9e82a9788ce6/checks" \
      -H "Authorization: Bearer $RDC_TOKEN"

    JavaScript

    const response = await fetch(`${process.env.RDC_BASE_URL}/reges/v1/register-operations/447e408d-e905-4304-a4cb-9e82a9788ce6/checks`, {
      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/447e408d-e905-4304-a4cb-9e82a9788ce6/checks',
        headers={
            'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
        },
    )
    result = response.json()

    PHP

    <?php
    
    $curl = curl_init(getenv('RDC_BASE_URL') . '/reges/v1/register-operations/447e408d-e905-4304-a4cb-9e82a9788ce6/checks');
    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/447e408d-e905-4304-a4cb-9e82a9788ce6/checks");
    request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
    var response = await client.SendAsync(request);
    var result = await response.Content.ReadAsStringAsync();

    Response 200

    {
      "registerOperationId": "447e408d-e905-4304-a4cb-9e82a9788ce6",
      "revision": 2,
      "canSend": true,
      "blocking": 0,
      "checks": [
        {
          "id": "cnp-structure",
          "severity": "blocking",
          "passed": true,
          "message": "The personal number has a valid structure and its birth date is a real date.",
          "detail": {
            "check": "ok"
          }
        },
        {
          "id": "minimum-age",
          "severity": "attention",
          "passed": true,
          "message": "The employee is 25 years old; the minimum age for work is 16 years.",
          "detail": {
            "age": 25,
            "minimum": 16,
            "withConsent": 15
          }
        },
        {
          "id": "occupation-code",
          "severity": "blocking",
          "passed": true,
          "message": "Occupation code 432102 is in the list of occupations (Magaziner).",
          "detail": {
            "code": "432102"
          }
        },
        {
          "id": "minimum-salary",
          "severity": "blocking",
          "passed": true,
          "message": "The base salary of 4,400.00 RON is not below the minimum of 4,325.00 RON for this weekly schedule.",
          "detail": {
            "salary": "4400.00",
            "minimum": "4325.00"
          }
        },
        {
          "id": "working-time",
          "severity": "blocking",
          "passed": true,
          "message": "40 hours a week is within the maximum of 40 hours.",
          "detail": {
            "hours": 40,
            "maximum": 40
          }
        },
        {
          "id": "contract-state",
          "severity": "blocking",
          "passed": true,
          "message": "The contract is pending, which this operation allows.",
          "detail": {
            "status": "pending",
            "required": "pending"
          }
        },
        {
          "id": "deadline",
          "severity": "attention",
          "passed": true,
          "message": "The deadline is 1 December 2026, in 4 working days.",
          "detail": {
            "deadline": "2026-12-01",
            "late": -4
          }
        }
      ]
    }

    Validate the draft

    Validation moves the draft to validated. While a blocking check fails, the answer is a 422 and the draft stays a draft. If someone changed the draft since your revision, the answer is a 409 and nothing is applied.

    curl

    curl -X POST "$RDC_BASE_URL/reges/v1/register-operations/447e408d-e905-4304-a4cb-9e82a9788ce6/validate" \
      -H "Authorization: Bearer $RDC_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{
      "operationId": "f3e122ff-b3de-4e37-816b-035e7c22214f",
      "expectedRevision": 2
    }'

    JavaScript

    const response = await fetch(`${process.env.RDC_BASE_URL}/reges/v1/register-operations/447e408d-e905-4304-a4cb-9e82a9788ce6/validate`, {
      method: 'POST',
      headers: {
        Authorization: `Bearer ${process.env.RDC_TOKEN}`,
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({
        "operationId": "f3e122ff-b3de-4e37-816b-035e7c22214f",
        "expectedRevision": 2
      }),
    });
    const result = await response.json();

    Python

    import os
    import requests
    
    response = requests.request(
        'POST',
        f'{os.environ["RDC_BASE_URL"]}/reges/v1/register-operations/447e408d-e905-4304-a4cb-9e82a9788ce6/validate',
        headers={
            'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
        },
        json={
            'operationId': 'f3e122ff-b3de-4e37-816b-035e7c22214f',
            'expectedRevision': 2,
        },
    )
    result = response.json()

    PHP

    <?php
    
    $body = <<<'JSON'
    {
      "operationId": "f3e122ff-b3de-4e37-816b-035e7c22214f",
      "expectedRevision": 2
    }
    JSON;
    
    $curl = curl_init(getenv('RDC_BASE_URL') . '/reges/v1/register-operations/447e408d-e905-4304-a4cb-9e82a9788ce6/validate');
    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/register-operations/447e408d-e905-4304-a4cb-9e82a9788ce6/validate");
    request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
    request.Content = new StringContent("""
    {
      "operationId": "f3e122ff-b3de-4e37-816b-035e7c22214f",
      "expectedRevision": 2
    }
    """, System.Text.Encoding.UTF8, "application/json");
    var response = await client.SendAsync(request);
    var result = await response.Content.ReadAsStringAsync();

    Response 202

    {
      "operationId": "f3e122ff-b3de-4e37-816b-035e7c22214f",
      "status": "accepted",
      "aggregateId": "447e408d-e905-4304-a4cb-9e82a9788ce6",
      "aggregateRevision": 3
    }

    Have it approved by another person

    A designated person with the approve scope approves the operation. It moves to authorized.

    curl

    curl -X POST "$RDC_BASE_URL/reges/v1/register-operations/b5f54bb0-fa5e-43d6-b9fc-b5b0afe9d3d7/authorize" \
      -H "Authorization: Bearer $RDC_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{
      "operationId": "64b9975a-c670-4934-8a99-91c95b901952",
      "expectedRevision": 2,
      "designatedPerson": "c403d6ca-4254-4be4-8781-6be8b95a3de0"
    }'

    JavaScript

    const response = await fetch(`${process.env.RDC_BASE_URL}/reges/v1/register-operations/b5f54bb0-fa5e-43d6-b9fc-b5b0afe9d3d7/authorize`, {
      method: 'POST',
      headers: {
        Authorization: `Bearer ${process.env.RDC_TOKEN}`,
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({
        "operationId": "64b9975a-c670-4934-8a99-91c95b901952",
        "expectedRevision": 2,
        "designatedPerson": "c403d6ca-4254-4be4-8781-6be8b95a3de0"
      }),
    });
    const result = await response.json();

    Python

    import os
    import requests
    
    response = requests.request(
        'POST',
        f'{os.environ["RDC_BASE_URL"]}/reges/v1/register-operations/b5f54bb0-fa5e-43d6-b9fc-b5b0afe9d3d7/authorize',
        headers={
            'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
        },
        json={
            'operationId': '64b9975a-c670-4934-8a99-91c95b901952',
            'expectedRevision': 2,
            'designatedPerson': 'c403d6ca-4254-4be4-8781-6be8b95a3de0',
        },
    )
    result = response.json()

    PHP

    <?php
    
    $body = <<<'JSON'
    {
      "operationId": "64b9975a-c670-4934-8a99-91c95b901952",
      "expectedRevision": 2,
      "designatedPerson": "c403d6ca-4254-4be4-8781-6be8b95a3de0"
    }
    JSON;
    
    $curl = curl_init(getenv('RDC_BASE_URL') . '/reges/v1/register-operations/b5f54bb0-fa5e-43d6-b9fc-b5b0afe9d3d7/authorize');
    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/register-operations/b5f54bb0-fa5e-43d6-b9fc-b5b0afe9d3d7/authorize");
    request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
    request.Content = new StringContent("""
    {
      "operationId": "64b9975a-c670-4934-8a99-91c95b901952",
      "expectedRevision": 2,
      "designatedPerson": "c403d6ca-4254-4be4-8781-6be8b95a3de0"
    }
    """, System.Text.Encoding.UTF8, "application/json");
    var response = await client.SendAsync(request);
    var result = await response.Content.ReadAsStringAsync();

    Response 202

    {
      "operationId": "64b9975a-c670-4934-8a99-91c95b901952",
      "status": "accepted",
      "aggregateId": "b5f54bb0-fa5e-43d6-b9fc-b5b0afe9d3d7",
      "aggregateRevision": 3
    }

    Record the transmission

    A designated person with the transmit scope transmits the approved operation with the employer’s access. Record it with submitOperation: the operation moves to submitted and the operation.submitted event is sent. The sample is past its deadline, so it carries a reason; an operation on time needs none.

    curl

    curl -X POST "$RDC_BASE_URL/reges/v1/register-operations/27357abf-301f-4956-88af-73c842b85100/submit" \
      -H "Authorization: Bearer $RDC_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{
      "operationId": "4387ad28-fee6-449b-83f5-c31574533646",
      "expectedRevision": 3,
      "designatedPerson": "b5192196-cb10-4857-a91d-e1eae8a64953",
      "reason": "The employer’s access to the register had expired and was renewed first."
    }'

    JavaScript

    const response = await fetch(`${process.env.RDC_BASE_URL}/reges/v1/register-operations/27357abf-301f-4956-88af-73c842b85100/submit`, {
      method: 'POST',
      headers: {
        Authorization: `Bearer ${process.env.RDC_TOKEN}`,
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({
        "operationId": "4387ad28-fee6-449b-83f5-c31574533646",
        "expectedRevision": 3,
        "designatedPerson": "b5192196-cb10-4857-a91d-e1eae8a64953",
        "reason": "The employer’s access to the register had expired and was renewed first."
      }),
    });
    const result = await response.json();

    Python

    import os
    import requests
    
    response = requests.request(
        'POST',
        f'{os.environ["RDC_BASE_URL"]}/reges/v1/register-operations/27357abf-301f-4956-88af-73c842b85100/submit',
        headers={
            'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
        },
        json={
            'operationId': '4387ad28-fee6-449b-83f5-c31574533646',
            'expectedRevision': 3,
            'designatedPerson': 'b5192196-cb10-4857-a91d-e1eae8a64953',
            'reason': 'The employer’s access to the register had expired and was renewed first.',
        },
    )
    result = response.json()

    PHP

    <?php
    
    $body = <<<'JSON'
    {
      "operationId": "4387ad28-fee6-449b-83f5-c31574533646",
      "expectedRevision": 3,
      "designatedPerson": "b5192196-cb10-4857-a91d-e1eae8a64953",
      "reason": "The employer’s access to the register had expired and was renewed first."
    }
    JSON;
    
    $curl = curl_init(getenv('RDC_BASE_URL') . '/reges/v1/register-operations/27357abf-301f-4956-88af-73c842b85100/submit');
    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/register-operations/27357abf-301f-4956-88af-73c842b85100/submit");
    request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
    request.Content = new StringContent("""
    {
      "operationId": "4387ad28-fee6-449b-83f5-c31574533646",
      "expectedRevision": 3,
      "designatedPerson": "b5192196-cb10-4857-a91d-e1eae8a64953",
      "reason": "The employer’s access to the register had expired and was renewed first."
    }
    """, System.Text.Encoding.UTF8, "application/json");
    var response = await client.SendAsync(request);
    var result = await response.Content.ReadAsStringAsync();

    Response 202

    {
      "operationId": "4387ad28-fee6-449b-83f5-c31574533646",
      "status": "accepted",
      "aggregateId": "27357abf-301f-4956-88af-73c842b85100",
      "aggregateRevision": 4
    }

    Record the answer

    When the register answers, record it. registered takes the reference the register gave; rejected takes its message exactly as written. A registered hire activates the contract.

    curl

    curl -X POST "$RDC_BASE_URL/reges/v1/register-operations/33ac882a-d64f-4ac2-9658-37361cf74da1/answer" \
      -H "Authorization: Bearer $RDC_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{
      "operationId": "4fd6d86a-abb0-412a-a168-7a6824007b32",
      "expectedRevision": 10,
      "outcome": "registered",
      "reference": "R2026-0490409"
    }'

    JavaScript

    const response = await fetch(`${process.env.RDC_BASE_URL}/reges/v1/register-operations/33ac882a-d64f-4ac2-9658-37361cf74da1/answer`, {
      method: 'POST',
      headers: {
        Authorization: `Bearer ${process.env.RDC_TOKEN}`,
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({
        "operationId": "4fd6d86a-abb0-412a-a168-7a6824007b32",
        "expectedRevision": 10,
        "outcome": "registered",
        "reference": "R2026-0490409"
      }),
    });
    const result = await response.json();

    Python

    import os
    import requests
    
    response = requests.request(
        'POST',
        f'{os.environ["RDC_BASE_URL"]}/reges/v1/register-operations/33ac882a-d64f-4ac2-9658-37361cf74da1/answer',
        headers={
            'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
        },
        json={
            'operationId': '4fd6d86a-abb0-412a-a168-7a6824007b32',
            'expectedRevision': 10,
            'outcome': 'registered',
            'reference': 'R2026-0490409',
        },
    )
    result = response.json()

    PHP

    <?php
    
    $body = <<<'JSON'
    {
      "operationId": "4fd6d86a-abb0-412a-a168-7a6824007b32",
      "expectedRevision": 10,
      "outcome": "registered",
      "reference": "R2026-0490409"
    }
    JSON;
    
    $curl = curl_init(getenv('RDC_BASE_URL') . '/reges/v1/register-operations/33ac882a-d64f-4ac2-9658-37361cf74da1/answer');
    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/register-operations/33ac882a-d64f-4ac2-9658-37361cf74da1/answer");
    request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
    request.Content = new StringContent("""
    {
      "operationId": "4fd6d86a-abb0-412a-a168-7a6824007b32",
      "expectedRevision": 10,
      "outcome": "registered",
      "reference": "R2026-0490409"
    }
    """, System.Text.Encoding.UTF8, "application/json");
    var response = await client.SendAsync(request);
    var result = await response.Content.ReadAsStringAsync();

    Response 202

    {
      "operationId": "4fd6d86a-abb0-412a-a168-7a6824007b32",
      "status": "accepted",
      "aggregateId": "33ac882a-d64f-4ac2-9658-37361cf74da1",
      "aggregateRevision": 11
    }

    Read the operation

    The operation carries its deadline, its history and the reference of the register. Register an endpoint and the events tell you the same without reading: see Event catalogue.

    Get a register operation

    curl

    curl "$RDC_BASE_URL/reges/v1/register-operations/1453a253-8c3c-41cc-99e0-23855a04de29" \
      -H "Authorization: Bearer $RDC_TOKEN"

    JavaScript

    const response = await fetch(`${process.env.RDC_BASE_URL}/reges/v1/register-operations/1453a253-8c3c-41cc-99e0-23855a04de29`, {
      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/1453a253-8c3c-41cc-99e0-23855a04de29',
        headers={
            'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
        },
    )
    result = response.json()

    PHP

    <?php
    
    $curl = curl_init(getenv('RDC_BASE_URL') . '/reges/v1/register-operations/1453a253-8c3c-41cc-99e0-23855a04de29');
    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/1453a253-8c3c-41cc-99e0-23855a04de29");
    request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
    var response = await client.SendAsync(request);
    var result = await response.Content.ReadAsStringAsync();

    Response 200

    {
      "id": "1453a253-8c3c-41cc-99e0-23855a04de29",
      "number": "RG-2026-001479",
      "employerId": "6e2aa977-c041-49c3-8c57-b9f2cd6cf3f0",
      "contractId": "9b79f86f-cc08-4468-8879-747525466dd3",
      "employee": "Ioana Marin",
      "kind": "change-salary",
      "status": "registered",
      "date": "2026-11-01",
      "until": null,
      "deadline": {
        "date": "2026-11-27",
        "rule": "salary",
        "from": "2026-11-01",
        "workingDaysLeft": 4
      },
      "late": false,
      "details": {
        "date": "2026-11-01",
        "salary": "9800.00"
      },
      "preparedBy": {
        "id": "f3a70882-0da0-4686-bc0c-f29ce600bb0c",
        "name": "Elena Dumitru"
      },
      "authorizedBy": {
        "id": "c403d6ca-4254-4be4-8781-6be8b95a3de0",
        "name": "Ana Rusu"
      },
      "transmittedBy": {
        "id": "b5192196-cb10-4857-a91d-e1eae8a64953",
        "name": "Maria Costea"
      },
      "reference": "R2026-0479033",
      "rejection": null,
      "lateReason": null,
      "correctionOf": null,
      "attempts": 1,
      "history": [
        {
          "status": "draft",
          "at": "2026-11-02T08:20:00Z",
          "by": {
            "id": "f3a70882-0da0-4686-bc0c-f29ce600bb0c",
            "name": "Elena Dumitru"
          },
          "reference": null,
          "message": null,
          "reason": null,
          "late": false
        },
        {
          "status": "validated",
          "at": "2026-11-02T08:31:00Z",
          "by": null,
          "reference": null,
          "message": null,
          "reason": null,
          "late": false
        },
        {
          "status": "authorized",
          "at": "2026-11-02T09:05:00Z",
          "by": {
            "id": "c403d6ca-4254-4be4-8781-6be8b95a3de0",
            "name": "Ana Rusu"
          },
          "reference": null,
          "message": null,
          "reason": null,
          "late": false
        },
        {
          "status": "submitted",
          "at": "2026-11-02T09:40:00Z",
          "by": {
            "id": "b5192196-cb10-4857-a91d-e1eae8a64953",
            "name": "Maria Costea"
          },
          "reference": null,
          "message": null,
          "reason": null,
          "late": false
        },
        {
          "status": "processing",
          "at": "2026-11-02T09:41:00Z",
          "by": null,
          "reference": null,
          "message": null,
          "reason": null,
          "late": false
        },
        {
          "status": "registered",
          "at": "2026-11-02T10:12:00Z",
          "by": null,
          "reference": "R2026-0479033",
          "message": null,
          "reason": null,
          "late": false
        }
      ],
      "revision": 6
    }