Skip to content
Docs
API 1.0.0 · 22 Nov 2026

Search the docs

    Română

    Checks before sending

    The checks the gateway runs on a register operation before it can be validated: what each looks at, whether it blocks and which kinds it applies to.

    On this page

    The gateway checks a register operation against the contract before it is sent. This page lists every check, says which ones stop the operation and shows how to read them with listChecks.

    The checks

    IdNameSeverityApplies toWhat it looks at
    cnp-structurePersonal numberblockinghireThe personal number typed with editOperation. A personal numeric code has 13 digits. The first digit is the sex and the century of birth (1 to 6 for people born in 1800 to 2099), followed by the year, the month and the day of birth. The control digit is not checked. See The personal number.
    minimum-ageMinimum ageattention or blockinghireThe age of the employee on the start date. At 16 or older the check passes. From 15 to under 16 it shows an attention: work is allowed only with the consent of a parent or legal representative. Under 15 it blocks.
    occupation-codeOccupation codeblockinghire, change-termsThe code of the occupation is in the list. See Occupation codes.
    minimum-salaryMinimum salaryblockinghire, change-terms, change-salaryThe base salary is not below the minimum for the weekly schedule. The guaranteed minimum gross base salary is 4,325 RON a month for a normal schedule of 166.667 hours a month, from 1 July 2026. The check scales it by the hours per week of the contract, with 40 hours as the full week.
    working-timeWorking timeblockinghire, change-terms, change-salaryThe hours per week are positive and at most 40 hours. For an employee under the age of 18 the most is 30 hours.
    fixed-term-endEnd of the fixed termblockinghire, change-terms, change-salaryA fixed-term contract has an end date after its start date.
    legal-basisLegal basisblockingterminateThe legal basis of the termination is stated.
    contract-stateState of the contractblockingAll kindsThe contract is in a status the operation allows: pending for hire; active for change-terms, change-salary, suspend, transfer, secondment; suspended for resume; active or suspended for terminate.
    deadlineDeadlineattentionAll kindsThe deadline has not passed. This check never blocks: after the deadline, the transmission needs a reason. See Late operations.

    The minimum salary scales with the schedule: for 20 hours a week it is 2,162.50 RON.

    Blocking and attention

    • blocking: while the check fails, the draft cannot be validated. validateOperation is refused with blocked_by_checks (422) and the operation stays a draft.
    • attention: the result is shown and stops nothing.

    Read the checks

    listChecks runs every check that applies to the operation, as it is now, and returns each with its severity, whether it passed and the values behind the result in detail. canSend is true when no blocking check fails, and blocking counts the ones that do. Match on id and detail: message is a sentence for people and can change. editOperation runs the checks again after every accepted edit.

    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": 1,
      "canSend": false,
      "blocking": 1,
      "checks": [
        {
          "id": "cnp-structure",
          "severity": "blocking",
          "passed": false,
          "message": "No personal number has been entered yet.",
          "detail": {
            "check": "missing"
          }
        },
        {
          "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
          }
        }
      ]
    }

    The draft above has no personal number yet, so cnp-structure blocks. A draft that passes every check answers like this:

    A draft that can be validated

    {
      "canSend": true,
      "blocking": 0,
      "checks": [
        {
          "id": "cnp-structure",
          "severity": "blocking",
          "passed": true
        },
        {
          "id": "minimum-age",
          "severity": "attention",
          "passed": true
        },
        {
          "id": "occupation-code",
          "severity": "blocking",
          "passed": true
        },
        {
          "id": "minimum-salary",
          "severity": "blocking",
          "passed": true
        },
        {
          "id": "working-time",
          "severity": "blocking",
          "passed": true
        },
        {
          "id": "contract-state",
          "severity": "blocking",
          "passed": true
        },
        {
          "id": "deadline",
          "severity": "attention",
          "passed": true
        }
      ]
    }

    The personal number

    The personal number of a hire is typed with editOperation, field personalNumber; spaces are ignored. The check looks at the structure only: the control digit is not checked. The gateway keeps the last four digits and the birth date and drops the number. detail.check says why a number fails:

    detail.checkSentence
    missingNo personal number has been entered yet.
    wrong-lengthThe personal number must have 13 digits.
    wrong-digitThe first digit of the personal number does not give a valid sex and century.
    wrong-dateThe birth date inside the personal number is not a real date.