---
title: "Terminate and reactivate | Docs | REGES Gateway by R&D Copilot"
description: "End a contract with its legal basis, or end a suspension so that the contract is active again, and see why a terminated contract takes no further operation."
canonical: "https://reges.rdcopilot.com/docs/operations/terminate-and-reactivate/"
language: en
updated: 2026-11-22
---

# Terminate and reactivate

End a contract with its legal basis, or end a suspension so that the contract is active again, and see why a terminated contract takes no further operation.

Two operations close a stretch of a contract. `terminate` ends the contract. `resume` ends a suspension, so the contract is `active` again. Both are register operations prepared with `prepareOperation`.

## Terminate a contract

Send `kind` `terminate`, the `contractId` and `details` with the `date` the contract ends and `legalBasis`, in your own words, up to 200 characters. `legalBasis` is required: without it the `legal-basis` check fails and `validateOperation` answers `blocked_by_checks`. The contract can be `active` or `suspended`.

Prepare a termination

curl

```bash
curl -X POST "$RDC_BASE_URL/reges/v1/register-operations" \
  -H "Authorization: Bearer $RDC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "operationId": "e67ed0f5-d928-4b3b-9368-3dcad1f5cfa6",
  "employerId": "6e2aa977-c041-49c3-8c57-b9f2cd6cf3f0",
  "kind": "terminate",
  "contractId": "a2140271-2e7e-4224-b4c9-88a0bb014864",
  "designatedPerson": "f3a70882-0da0-4686-bc0c-f29ce600bb0c",
  "details": {
    "date": "2026-12-31",
    "legalBasis": "Acordul părților"
  }
}'
```

JavaScript

```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": "e67ed0f5-d928-4b3b-9368-3dcad1f5cfa6",
    "employerId": "6e2aa977-c041-49c3-8c57-b9f2cd6cf3f0",
    "kind": "terminate",
    "contractId": "a2140271-2e7e-4224-b4c9-88a0bb014864",
    "designatedPerson": "f3a70882-0da0-4686-bc0c-f29ce600bb0c",
    "details": {
      "date": "2026-12-31",
      "legalBasis": "Acordul părților"
    }
  }),
});
const result = await response.json();
```

Python

```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': 'e67ed0f5-d928-4b3b-9368-3dcad1f5cfa6',
        'employerId': '6e2aa977-c041-49c3-8c57-b9f2cd6cf3f0',
        'kind': 'terminate',
        'contractId': 'a2140271-2e7e-4224-b4c9-88a0bb014864',
        'designatedPerson': 'f3a70882-0da0-4686-bc0c-f29ce600bb0c',
        'details': {
            'date': '2026-12-31',
            'legalBasis': 'Acordul părților',
        },
    },
)
result = response.json()
```

PHP

```php
<?php

$body = <<<'JSON'
{
  "operationId": "e67ed0f5-d928-4b3b-9368-3dcad1f5cfa6",
  "employerId": "6e2aa977-c041-49c3-8c57-b9f2cd6cf3f0",
  "kind": "terminate",
  "contractId": "a2140271-2e7e-4224-b4c9-88a0bb014864",
  "designatedPerson": "f3a70882-0da0-4686-bc0c-f29ce600bb0c",
  "details": {
    "date": "2026-12-31",
    "legalBasis": "Acordul părților"
  }
}
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#

```csharp
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": "e67ed0f5-d928-4b3b-9368-3dcad1f5cfa6",
  "employerId": "6e2aa977-c041-49c3-8c57-b9f2cd6cf3f0",
  "kind": "terminate",
  "contractId": "a2140271-2e7e-4224-b4c9-88a0bb014864",
  "designatedPerson": "f3a70882-0da0-4686-bc0c-f29ce600bb0c",
  "details": {
    "date": "2026-12-31",
    "legalBasis": "Acordul părților"
  }
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync();
```

Response 202

```json
{
  "operationId": "e67ed0f5-d928-4b3b-9368-3dcad1f5cfa6",
  "status": "accepted",
  "aggregateId": "101bfcee-6236-4ee3-9d6a-8b0d4c6c6d50",
  "aggregateRevision": 1
}
```

| Check | Severity | Result for the example |
| --- | --- | --- |
| `legal-basis` | `blocking` | The legal basis of the termination is stated. |
| `contract-state` | `blocking` | The contract is active, which this operation allows. |
| `deadline` | `attention` | Warns when the deadline has passed. It stops nothing; transmitting after it needs a reason. |

### The deadline of a termination

A termination is transmitted at the latest on the date the contract ends, or on the date the employer learns of the event that ends it. Send `learnedOn` when the employer learned of the event on another day than `date`; it defaults to `date`.

Compute the deadline of a termination

curl

```bash
curl "$RDC_BASE_URL/reges/v1/deadlines?kind=terminate&date=2026-12-31" \
  -H "Authorization: Bearer $RDC_TOKEN"
```

JavaScript

```javascript
const response = await fetch(`${process.env.RDC_BASE_URL}/reges/v1/deadlines?kind=terminate&date=2026-12-31`, {
  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/deadlines?kind=terminate&date=2026-12-31',
    headers={
        'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
    },
)
result = response.json()
```

PHP

```php
<?php

$curl = curl_init(getenv('RDC_BASE_URL') . '/reges/v1/deadlines?kind=terminate&date=2026-12-31');
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/deadlines?kind=terminate&date=2026-12-31");
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
{
  "date": "2026-12-31",
  "rule": "termination",
  "from": "2026-12-31",
  "workingDaysLeft": 25
}
```

## Reactivate after a suspension

Send `kind` `resume`, the `contractId` of a `suspended` contract and `details.date`, the day the suspension ends. When the register has registered the end, the contract is `active` again and takes the operations of an active contract.

Prepare the end of a suspension

curl

```bash
curl -X POST "$RDC_BASE_URL/reges/v1/register-operations" \
  -H "Authorization: Bearer $RDC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "operationId": "e031fc40-a754-44ed-9acb-6137deb264df",
  "employerId": "6e2aa977-c041-49c3-8c57-b9f2cd6cf3f0",
  "kind": "resume",
  "contractId": "02b6b76c-19a6-4b97-af20-50b265e9d36d",
  "designatedPerson": "f3a70882-0da0-4686-bc0c-f29ce600bb0c",
  "details": {
    "date": "2026-12-02"
  }
}'
```

JavaScript

```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": "e031fc40-a754-44ed-9acb-6137deb264df",
    "employerId": "6e2aa977-c041-49c3-8c57-b9f2cd6cf3f0",
    "kind": "resume",
    "contractId": "02b6b76c-19a6-4b97-af20-50b265e9d36d",
    "designatedPerson": "f3a70882-0da0-4686-bc0c-f29ce600bb0c",
    "details": {
      "date": "2026-12-02"
    }
  }),
});
const result = await response.json();
```

Python

```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': 'e031fc40-a754-44ed-9acb-6137deb264df',
        'employerId': '6e2aa977-c041-49c3-8c57-b9f2cd6cf3f0',
        'kind': 'resume',
        'contractId': '02b6b76c-19a6-4b97-af20-50b265e9d36d',
        'designatedPerson': 'f3a70882-0da0-4686-bc0c-f29ce600bb0c',
        'details': {
            'date': '2026-12-02',
        },
    },
)
result = response.json()
```

PHP

```php
<?php

$body = <<<'JSON'
{
  "operationId": "e031fc40-a754-44ed-9acb-6137deb264df",
  "employerId": "6e2aa977-c041-49c3-8c57-b9f2cd6cf3f0",
  "kind": "resume",
  "contractId": "02b6b76c-19a6-4b97-af20-50b265e9d36d",
  "designatedPerson": "f3a70882-0da0-4686-bc0c-f29ce600bb0c",
  "details": {
    "date": "2026-12-02"
  }
}
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#

```csharp
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": "e031fc40-a754-44ed-9acb-6137deb264df",
  "employerId": "6e2aa977-c041-49c3-8c57-b9f2cd6cf3f0",
  "kind": "resume",
  "contractId": "02b6b76c-19a6-4b97-af20-50b265e9d36d",
  "designatedPerson": "f3a70882-0da0-4686-bc0c-f29ce600bb0c",
  "details": {
    "date": "2026-12-02"
  }
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync();
```

Response 202

```json
{
  "operationId": "e031fc40-a754-44ed-9acb-6137deb264df",
  "status": "accepted",
  "aggregateId": "58a3a5bd-da1b-4e75-8df5-accb62325c2e",
  "aggregateRevision": 1
}
```

A suspension and the end of a suspension are transmitted at the latest the day before they take effect.

Compute the deadline of the end of a suspension

curl

```bash
curl "$RDC_BASE_URL/reges/v1/deadlines?kind=resume&date=2026-12-02" \
  -H "Authorization: Bearer $RDC_TOKEN"
```

JavaScript

```javascript
const response = await fetch(`${process.env.RDC_BASE_URL}/reges/v1/deadlines?kind=resume&date=2026-12-02`, {
  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/deadlines?kind=resume&date=2026-12-02',
    headers={
        'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
    },
)
result = response.json()
```

PHP

```php
<?php

$curl = curl_init(getenv('RDC_BASE_URL') . '/reges/v1/deadlines?kind=resume&date=2026-12-02');
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/deadlines?kind=resume&date=2026-12-02");
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
{
  "date": "2026-12-01",
  "rule": "suspension",
  "from": "2026-12-02",
  "workingDaysLeft": 4
}
```

`resume` needs a `suspended` contract. While the suspension is not registered the contract is `active`, and the `contract-state` check says: The contract is active; this operation needs a contract that is suspended.

## A terminated contract takes no operation

Once a termination is registered the contract is `terminated` and no kind of operation applies to it. A change prepared for it fails `contract-state`, which is blocking: The contract is terminated; this operation needs a contract that is active.

## Validate, approve, transmit

1.  Validate
    
    `validateOperation` with the `expectedRevision` you read.
    
2.  Approve
    
    `authorizeOperation`, by a designated person other than the one who prepared it.
    
3.  Record the transmission
    
    `submitOperation`, after a designated person who holds `transmit` sent it to the register.
    
4.  Record the answer
    
    `recordAnswer` with the reference of the register, or with its words if it rejects the operation.
    

See [Lifecycle and statuses](https://reges.rdcopilot.com/docs/statuses-and-errors/lifecycle-and-statuses/) for every status of this path.

## The contract once it is registered

A registered termination makes the contract `terminated`; a registered end of a suspension makes it `active`. A rejected operation changes nothing.

The two contracts of the examples once their operations are registered

```json
[
  {
    "number": "CIM 0361/2026",
    "status": "terminated"
  },
  {
    "number": "CIM 0198/2020",
    "status": "active"
  }
]
```
