---
title: "The contract object | Docs | REGES Gateway by R&D Copilot"
description: "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."
canonical: "https://reges.rdcopilot.com/docs/operations/the-contract-object/"
language: en
updated: 2026-11-22
---

# 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.

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

```json
{
  "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

| Field | Meaning |
| --- | --- |
| `id` | Identifier of the contract. |
| `employerId` | The employer of the contract. |
| `employee.name` | The name of the employee. |
| `employee.personalNumberLast4` | The last four digits of the personal number, the only part the gateway keeps; `null` until one was entered. |
| `employee.citizenship` | `RO`, `EU`, `EEA` or `non-EU`. |
| `number` | The number of the contract. |
| `concludedOn` | The day the contract was concluded. |
| `startDate` | The first day of work. |
| `occupation.code` | The code of the occupation. |
| `occupation.name` | The name of the occupation in the list of occupations, in Romanian; `null` for a code that is not in the list. |
| `contractType` | `indefinite` or `fixed-term`. |
| `endDate` | The last day of a fixed-term contract, `null` for an indefinite one. |
| `workplace.kind` | `fixed` or `mobile`. |
| `workplace.place` | Where the work is done: a locality, or the area of a mobile workplace. |
| `hoursPerWeek` | Hours per week. |
| `baseSalary` | The monthly gross base salary as a decimal string. |
| `currency` | Currency of the salary. |
| `status` | `pending` before the hire is registered, `active`, `suspended` or `terminated`. |

## States

| Status | Meaning |
| --- | --- |
| Pending `pending` | Made by `prepareOperation` for a hire. It becomes `active` when the register registers the hire. It takes: `hire`. |
| Active `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 `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 `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.

| Operation | The contract once it is registered |
| --- | --- |
| `hire` | `status` becomes `active`. |
| `change-terms` | The fields of `details.terms` are set; the others stay. |
| `change-salary` | `baseSalary` becomes `details.salary`. |
| `suspend` | `status` becomes `suspended`. |
| `resume` | `status` becomes `active`. |
| `terminate` | `status` becomes `terminated`. |
| `transfer` | `employerId` becomes the employer of `details.to`. |
| `secondment` | Nothing changes: the contract stays with its employer. |

No request writes a contract directly. To change one, prepare a register operation and follow it to `registered`. See [Lifecycle and statuses](https://reges.rdcopilot.com/docs/statuses-and-errors/lifecycle-and-statuses/).

## 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

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

JavaScript

```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

```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
<?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#

```csharp
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

```json
{
  "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](https://reges.rdcopilot.com/docs/reference/pagination/).

curl

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

JavaScript

```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

```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
<?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#

```csharp
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

```json
{
  "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
}
```
