Skip to content
Docs
API 1.0.0 · 22 Nov 2026

Search the docs

    Română

    Transfer and secondment

    Move a contract to another employer of your account with a transfer, or send an employee to another employer for a period with a secondment.

    On this page

    Both operations name a second employer in details.to: its id from listEmployers, an employer of your account other than the one that prepares the operation. A transfer moves the contract there. A secondment leaves it where it is.

    Transfer

    Prepare a transfer for the employer that holds the contract, with the date of the transfer and the other employer as to. The contract must be active, and the designated person must hold prepare for the employer that holds it. A to that is the same employer or not in your account is refused with invalid_value.

    Prepare a transfer

    curl

    curl -X POST "$RDC_BASE_URL/reges/v1/register-operations" \
      -H "Authorization: Bearer $RDC_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{
      "operationId": "55340039-ddc2-4fce-9a0a-21ca1b4197b5",
      "employerId": "6f90be8d-78b7-4a97-9b06-7cc6db931f53",
      "kind": "transfer",
      "contractId": "1893fd78-fd15-4f1e-9252-17c6c59351cd",
      "designatedPerson": "f3a70882-0da0-4686-bc0c-f29ce600bb0c",
      "details": {
        "date": "2026-12-07",
        "to": "6e2aa977-c041-49c3-8c57-b9f2cd6cf3f0"
      }
    }'

    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": "55340039-ddc2-4fce-9a0a-21ca1b4197b5",
        "employerId": "6f90be8d-78b7-4a97-9b06-7cc6db931f53",
        "kind": "transfer",
        "contractId": "1893fd78-fd15-4f1e-9252-17c6c59351cd",
        "designatedPerson": "f3a70882-0da0-4686-bc0c-f29ce600bb0c",
        "details": {
          "date": "2026-12-07",
          "to": "6e2aa977-c041-49c3-8c57-b9f2cd6cf3f0"
        }
      }),
    });
    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': '55340039-ddc2-4fce-9a0a-21ca1b4197b5',
            'employerId': '6f90be8d-78b7-4a97-9b06-7cc6db931f53',
            'kind': 'transfer',
            'contractId': '1893fd78-fd15-4f1e-9252-17c6c59351cd',
            'designatedPerson': 'f3a70882-0da0-4686-bc0c-f29ce600bb0c',
            'details': {
                'date': '2026-12-07',
                'to': '6e2aa977-c041-49c3-8c57-b9f2cd6cf3f0',
            },
        },
    )
    result = response.json()

    PHP

    <?php
    
    $body = <<<'JSON'
    {
      "operationId": "55340039-ddc2-4fce-9a0a-21ca1b4197b5",
      "employerId": "6f90be8d-78b7-4a97-9b06-7cc6db931f53",
      "kind": "transfer",
      "contractId": "1893fd78-fd15-4f1e-9252-17c6c59351cd",
      "designatedPerson": "f3a70882-0da0-4686-bc0c-f29ce600bb0c",
      "details": {
        "date": "2026-12-07",
        "to": "6e2aa977-c041-49c3-8c57-b9f2cd6cf3f0"
      }
    }
    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": "55340039-ddc2-4fce-9a0a-21ca1b4197b5",
      "employerId": "6f90be8d-78b7-4a97-9b06-7cc6db931f53",
      "kind": "transfer",
      "contractId": "1893fd78-fd15-4f1e-9252-17c6c59351cd",
      "designatedPerson": "f3a70882-0da0-4686-bc0c-f29ce600bb0c",
      "details": {
        "date": "2026-12-07",
        "to": "6e2aa977-c041-49c3-8c57-b9f2cd6cf3f0"
      }
    }
    """, System.Text.Encoding.UTF8, "application/json");
    var response = await client.SendAsync(request);
    var result = await response.Content.ReadAsStringAsync();

    Response 202

    {
      "operationId": "55340039-ddc2-4fce-9a0a-21ca1b4197b5",
      "status": "accepted",
      "aggregateId": "306e1d65-c72d-4b00-90ce-0ac75f95ec34",
      "aggregateRevision": 1
    }

    CheckSeverityResult for the example
    contract-stateblockingThe contract is active, which this operation allows.
    deadlineattentionWarns when the deadline has passed. It stops nothing; transmitting after it needs a reason.

    A transfer is transmitted within 5 working days of the transfer, or of taking the employee over by transfer. The gateway counts it from date.

    Compute the deadline of a transfer

    curl

    curl "$RDC_BASE_URL/reges/v1/deadlines?kind=transfer&date=2026-12-07" \
      -H "Authorization: Bearer $RDC_TOKEN"

    JavaScript

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

    PHP

    <?php
    
    $curl = curl_init(getenv('RDC_BASE_URL') . '/reges/v1/deadlines?kind=transfer&date=2026-12-07');
    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/deadlines?kind=transfer&date=2026-12-07");
    request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
    var response = await client.SendAsync(request);
    var result = await response.Content.ReadAsStringAsync();

    Response 200

    {
      "date": "2026-12-11",
      "rule": "transfer",
      "from": "2026-12-07",
      "workingDaysLeft": 12
    }

    The contract once the transfer is registered

    When recordAnswer records registered, the contract moves: employerId becomes the employer of details.to, and listContracts returns it under that employer. Later operations on it need a designated person with access for the new employer.

    The employer of the contract before and after

    {
      "before": {
        "number": "CIM 0129/2019",
        "employerId": "6f90be8d-78b7-4a97-9b06-7cc6db931f53"
      },
      "after": {
        "number": "CIM 0129/2019",
        "employerId": "6e2aa977-c041-49c3-8c57-b9f2cd6cf3f0"
      }
    }

    Secondment

    Prepare a secondment with details.date, the first day, details.until, the last day, and details.to, the employer the employee is seconded to. until must be after date. A secondment is transmitted at the latest the day before it starts or ends. The gateway counts it from date.

    Prepare a secondment

    curl

    curl -X POST "$RDC_BASE_URL/reges/v1/register-operations" \
      -H "Authorization: Bearer $RDC_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{
      "operationId": "2bbf5655-26f8-45a5-af8b-17e4301bbb76",
      "employerId": "6f90be8d-78b7-4a97-9b06-7cc6db931f53",
      "kind": "secondment",
      "contractId": "d388f0e1-c10f-42f8-b8fc-67ac21d05225",
      "designatedPerson": "f3a70882-0da0-4686-bc0c-f29ce600bb0c",
      "details": {
        "date": "2026-12-07",
        "until": "2027-03-31",
        "to": "6e2aa977-c041-49c3-8c57-b9f2cd6cf3f0"
      }
    }'

    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": "2bbf5655-26f8-45a5-af8b-17e4301bbb76",
        "employerId": "6f90be8d-78b7-4a97-9b06-7cc6db931f53",
        "kind": "secondment",
        "contractId": "d388f0e1-c10f-42f8-b8fc-67ac21d05225",
        "designatedPerson": "f3a70882-0da0-4686-bc0c-f29ce600bb0c",
        "details": {
          "date": "2026-12-07",
          "until": "2027-03-31",
          "to": "6e2aa977-c041-49c3-8c57-b9f2cd6cf3f0"
        }
      }),
    });
    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': '2bbf5655-26f8-45a5-af8b-17e4301bbb76',
            'employerId': '6f90be8d-78b7-4a97-9b06-7cc6db931f53',
            'kind': 'secondment',
            'contractId': 'd388f0e1-c10f-42f8-b8fc-67ac21d05225',
            'designatedPerson': 'f3a70882-0da0-4686-bc0c-f29ce600bb0c',
            'details': {
                'date': '2026-12-07',
                'until': '2027-03-31',
                'to': '6e2aa977-c041-49c3-8c57-b9f2cd6cf3f0',
            },
        },
    )
    result = response.json()

    PHP

    <?php
    
    $body = <<<'JSON'
    {
      "operationId": "2bbf5655-26f8-45a5-af8b-17e4301bbb76",
      "employerId": "6f90be8d-78b7-4a97-9b06-7cc6db931f53",
      "kind": "secondment",
      "contractId": "d388f0e1-c10f-42f8-b8fc-67ac21d05225",
      "designatedPerson": "f3a70882-0da0-4686-bc0c-f29ce600bb0c",
      "details": {
        "date": "2026-12-07",
        "until": "2027-03-31",
        "to": "6e2aa977-c041-49c3-8c57-b9f2cd6cf3f0"
      }
    }
    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": "2bbf5655-26f8-45a5-af8b-17e4301bbb76",
      "employerId": "6f90be8d-78b7-4a97-9b06-7cc6db931f53",
      "kind": "secondment",
      "contractId": "d388f0e1-c10f-42f8-b8fc-67ac21d05225",
      "designatedPerson": "f3a70882-0da0-4686-bc0c-f29ce600bb0c",
      "details": {
        "date": "2026-12-07",
        "until": "2027-03-31",
        "to": "6e2aa977-c041-49c3-8c57-b9f2cd6cf3f0"
      }
    }
    """, System.Text.Encoding.UTF8, "application/json");
    var response = await client.SendAsync(request);
    var result = await response.Content.ReadAsStringAsync();

    Response 202

    {
      "operationId": "2bbf5655-26f8-45a5-af8b-17e4301bbb76",
      "status": "accepted",
      "aggregateId": "33ac882a-d64f-4ac2-9658-37361cf74da1",
      "aggregateRevision": 1
    }

    The example seconds the employee of RG-2026-001487 from 7 December 2026 to 31 March 2027. The checks are the same two as for a transfer.

    Compute the deadline of a secondment

    curl

    curl "$RDC_BASE_URL/reges/v1/deadlines?kind=secondment&date=2026-12-07" \
      -H "Authorization: Bearer $RDC_TOKEN"

    JavaScript

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

    PHP

    <?php
    
    $curl = curl_init(getenv('RDC_BASE_URL') . '/reges/v1/deadlines?kind=secondment&date=2026-12-07');
    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/deadlines?kind=secondment&date=2026-12-07");
    request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
    var response = await client.SendAsync(request);
    var result = await response.Content.ReadAsStringAsync();

    Response 200

    {
      "date": "2026-12-06",
      "rule": "secondment",
      "from": "2026-12-07",
      "workingDaysLeft": 7
    }

    The contract once the secondment is registered

    The register records the secondment, and recordAnswer keeps its reference on the operation. The contract does not change: it stays with the employer that seconded the employee, and until and details.to stay on the operation.

    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
    }

    Validate, approve, transmit

    Both operations follow the path of any other: validateOperation, authorizeOperation by a person other than the one who prepared it, submitOperation once a designated person who holds transmit has sent it to the register, then recordAnswer. See Lifecycle and statuses.