Skip to content
Docs
API 1.0.0 · 22 Nov 2026

Search the docs

    Română

    The contract object

    The fields of an individual employment contract, its four states, what moves it from one to the next and how it keeps the personal number of the employee.

    On this page

    A contract is the individual employment contract of one employee with one employer. The gateway creates it when you prepare a hire and changes it only after the register has registered an operation on it. This page shows what you can read and what moves it.

    A contract waiting for its hire to be registered

    {
      "id": "13156f30-1274-45d1-af53-672ccb3c7e04",
      "employerId": "6e2aa977-c041-49c3-8c57-b9f2cd6cf3f0",
      "employee": {
        "name": "Dan Ilie",
        "personalNumberLast4": "5328",
        "citizenship": "RO"
      },
      "number": "CIM 0391/2026",
      "concludedOn": "2026-11-20",
      "startDate": "2026-12-02",
      "occupation": {
        "code": "432102",
        "name": "Magaziner"
      },
      "contractType": "indefinite",
      "endDate": null,
      "workplace": {
        "kind": "fixed",
        "place": "Piatra-Neamț"
      },
      "hoursPerWeek": 40,
      "baseSalary": "4400.00",
      "currency": "RON",
      "status": "pending"
    }

    Fields

    FieldMeaning
    idIdentifier of the contract.
    employerIdThe employer of the contract.
    employee.nameThe name of the employee.
    employee.personalNumberLast4The last four digits of the personal number, the only part the gateway keeps; null until one was entered.
    employee.citizenshipRO, EU, EEA or non-EU.
    numberThe number of the contract.
    concludedOnThe day the contract was concluded.
    startDateThe first day of work.
    occupation.codeThe code of the occupation.
    occupation.nameThe name of the occupation in the list of occupations, in Romanian; null for a code that is not in the list.
    contractTypeindefinite or fixed-term.
    endDateThe last day of a fixed-term contract, null for an indefinite one.
    workplace.kindfixed or mobile.
    workplace.placeWhere the work is done: a locality, or the area of a mobile workplace.
    hoursPerWeekHours per week.
    baseSalaryThe monthly gross base salary as a decimal string.
    currencyCurrency of the salary.
    statuspending before the hire is registered, active, suspended or terminated.

    States

    StatusMeaning
    pending Made by prepareOperation for a hire. It becomes active when the register registers the hire. It takes: hire.
    active The hire is registered. A registered suspension makes it suspended, a registered termination makes it terminated. It takes: change-terms, change-salary, suspend, terminate, transfer, secondment.
    suspended A suspension is registered. The registered end of the suspension makes it active again, a registered termination makes it terminated. It takes: resume, terminate.
    terminated A termination is registered. The state does not change again. It takes no operation.

    Each kind of operation needs the contract in a state: the contract-state check stops validation when it is not. A hire needs pending, an end of suspension needs suspended, a termination needs active or suspended, every other kind needs active.

    What moves a contract

    A contract changes when recordAnswer records registered for an operation on it, and not before. A draft, an approved operation or a transmitted one leaves the contract as it is, and a rejected one never changes it.

    OperationThe contract once it is registered
    hirestatus becomes active.
    change-termsThe fields of details.terms are set; the others stay.
    change-salarybaseSalary becomes details.salary.
    suspendstatus becomes suspended.
    resumestatus becomes active.
    terminatestatus becomes terminated.
    transferemployerId becomes the employer of details.to.
    secondmentNothing changes: the contract stays with its employer.

    The personal number

    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. You type it on the draft of a hire with editOperation, field personalNumber. The gateway checks its structure and drops it. The contract keeps only the last four digits, as employee.personalNumberLast4, and the birth date the number holds, which the age checks read. The full number is never returned.

    Money

    baseSalary is the monthly gross base salary as a decimal string in currency, for example "4400.00" in RON. Send and read amounts as strings with up to two decimals, never as JSON numbers.

    Read contracts

    Read one contract by its id. The answer always carries its current state.

    curl

    curl "$RDC_BASE_URL/reges/v1/contracts/13156f30-1274-45d1-af53-672ccb3c7e04" \
      -H "Authorization: Bearer $RDC_TOKEN"

    JavaScript

    const response = await fetch(`${process.env.RDC_BASE_URL}/reges/v1/contracts/13156f30-1274-45d1-af53-672ccb3c7e04`, {
      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/contracts/13156f30-1274-45d1-af53-672ccb3c7e04',
        headers={
            'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
        },
    )
    result = response.json()

    PHP

    <?php
    
    $curl = curl_init(getenv('RDC_BASE_URL') . '/reges/v1/contracts/13156f30-1274-45d1-af53-672ccb3c7e04');
    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/contracts/13156f30-1274-45d1-af53-672ccb3c7e04");
    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": "13156f30-1274-45d1-af53-672ccb3c7e04",
      "employerId": "6e2aa977-c041-49c3-8c57-b9f2cd6cf3f0",
      "employee": {
        "name": "Dan Ilie",
        "personalNumberLast4": "5328",
        "citizenship": "RO"
      },
      "number": "CIM 0391/2026",
      "concludedOn": "2026-11-20",
      "startDate": "2026-12-02",
      "occupation": {
        "code": "432102",
        "name": "Magaziner"
      },
      "contractType": "indefinite",
      "endDate": null,
      "workplace": {
        "kind": "fixed",
        "place": "Piatra-Neamț"
      },
      "hoursPerWeek": 40,
      "baseSalary": "4400.00",
      "currency": "RON",
      "status": "pending"
    }

    List the contracts of an employer with employerId. Add status to keep one state, for example the suspended contracts. The list comes in pages: see Pagination.

    curl

    curl "$RDC_BASE_URL/reges/v1/contracts?employerId=6e2aa977-c041-49c3-8c57-b9f2cd6cf3f0&limit=20" \
      -H "Authorization: Bearer $RDC_TOKEN"

    JavaScript

    const response = await fetch(`${process.env.RDC_BASE_URL}/reges/v1/contracts?employerId=6e2aa977-c041-49c3-8c57-b9f2cd6cf3f0&limit=20`, {
      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/contracts?employerId=6e2aa977-c041-49c3-8c57-b9f2cd6cf3f0&limit=20',
        headers={
            'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
        },
    )
    result = response.json()

    PHP

    <?php
    
    $curl = curl_init(getenv('RDC_BASE_URL') . '/reges/v1/contracts?employerId=6e2aa977-c041-49c3-8c57-b9f2cd6cf3f0&limit=20');
    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/contracts?employerId=6e2aa977-c041-49c3-8c57-b9f2cd6cf3f0&limit=20");
    request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
    var response = await client.SendAsync(request);
    var result = await response.Content.ReadAsStringAsync();

    Response 200

    {
      "items": [
        {
          "id": "a2140271-2e7e-4224-b4c9-88a0bb014864",
          "employerId": "6e2aa977-c041-49c3-8c57-b9f2cd6cf3f0",
          "employee": {
            "name": "Vlad Munteanu",
            "personalNumberLast4": "6490",
            "citizenship": "RO"
          },
          "number": "CIM 0361/2026",
          "concludedOn": "2026-08-24",
          "startDate": "2026-09-01",
          "occupation": {
            "code": "251202",
            "name": "Programator"
          },
          "contractType": "indefinite",
          "endDate": null,
          "workplace": {
            "kind": "fixed",
            "place": "Piatra-Neamț"
          },
          "hoursPerWeek": 40,
          "baseSalary": "8200.00",
          "currency": "RON",
          "status": "active"
        },
        {
          "id": "02b6b76c-19a6-4b97-af20-50b265e9d36d",
          "employerId": "6e2aa977-c041-49c3-8c57-b9f2cd6cf3f0",
          "employee": {
            "name": "Radu Ionescu",
            "personalNumberLast4": "8053",
            "citizenship": "RO"
          },
          "number": "CIM 0198/2020",
          "concludedOn": "2020-09-21",
          "startDate": "2020-10-01",
          "occupation": {
            "code": "833201",
            "name": "Șofer autocamion/mașină de mare tonaj"
          },
          "contractType": "indefinite",
          "endDate": null,
          "workplace": {
            "kind": "fixed",
            "place": "Piatra-Neamț"
          },
          "hoursPerWeek": 40,
          "baseSalary": "5600.00",
          "currency": "RON",
          "status": "active"
        },
        {
          "id": "13156f30-1274-45d1-af53-672ccb3c7e04",
          "employerId": "6e2aa977-c041-49c3-8c57-b9f2cd6cf3f0",
          "employee": {
            "name": "Dan Ilie",
            "personalNumberLast4": "5328",
            "citizenship": "RO"
          },
          "number": "CIM 0391/2026",
          "concludedOn": "2026-11-20",
          "startDate": "2026-12-02",
          "occupation": {
            "code": "432102",
            "name": "Magaziner"
          },
          "contractType": "indefinite",
          "endDate": null,
          "workplace": {
            "kind": "fixed",
            "place": "Piatra-Neamț"
          },
          "hoursPerWeek": 40,
          "baseSalary": "4400.00",
          "currency": "RON",
          "status": "pending"
        }
      ],
      "nextCursor": null
    }