Skip to content
Docs
API 1.0.0 · 22 Nov 2026

Search the docs

    Română

    Access permissions

    Who may prepare, approve and transmit for an employer: the designated persons and the providers. Add an access permission, revoke it or extend it.

    On this page

    List access permissions

    GET /reges/v1/employers/{employerId}/permissions

    Returns the access permissions of an employer: who may prepare, approve and transmit for it, until when, and whether each is in force.

    Parameters

    NameInTypeRequiredMeaning
    employerId path string (uuid) Yesrequired The employer.
    limit query integer Nooptional Records per page, from 1 to 500. Default 100 Range 1 – 500
    cursor query string Nooptional The nextCursor of the previous page.

    Responses

    StatusMeaningBody
    200 A page of access permissions. PermissionPage
    401 The token is missing, has expired or is not ours. Error
    403 The token does not give access to this employer or operation. Error
    404 The employer does not exist in your account. Error
    429 There were too many requests. Nothing was processed. The header Retry-After gives the seconds to wait. Error
    503 The gateway cannot answer now. Error

    Request

    curl

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

    JavaScript

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

    PHP

    <?php
    
    $curl = curl_init(getenv('RDC_BASE_URL') . '/reges/v1/employers/6e2aa977-c041-49c3-8c57-b9f2cd6cf3f0/permissions?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/employers/6e2aa977-c041-49c3-8c57-b9f2cd6cf3f0/permissions?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": "2569be01-6d61-46a3-9671-1f6643e0ed2c",
          "employerId": "6e2aa977-c041-49c3-8c57-b9f2cd6cf3f0",
          "kind": "designated-person",
          "holder": {
            "id": "f3a70882-0da0-4686-bc0c-f29ce600bb0c",
            "name": "Elena Dumitru"
          },
          "scope": [
            "prepare"
          ],
          "expires": "2027-06-30",
          "status": "active",
          "revision": 1
        },
        {
          "id": "9e76128b-431e-42b4-8c89-a185d95774af",
          "employerId": "6e2aa977-c041-49c3-8c57-b9f2cd6cf3f0",
          "kind": "designated-person",
          "holder": {
            "id": "c403d6ca-4254-4be4-8781-6be8b95a3de0",
            "name": "Ana Rusu"
          },
          "scope": [
            "approve"
          ],
          "expires": "2027-06-30",
          "status": "active",
          "revision": 1
        },
        {
          "id": "e3ff1f7f-71ea-4e7e-ad3b-d570359c7dd5",
          "employerId": "6e2aa977-c041-49c3-8c57-b9f2cd6cf3f0",
          "kind": "designated-person",
          "holder": {
            "id": "b5192196-cb10-4857-a91d-e1eae8a64953",
            "name": "Maria Costea"
          },
          "scope": [
            "transmit"
          ],
          "expires": "2027-03-31",
          "status": "active",
          "revision": 1
        }
      ],
      "nextCursor": null
    }

    Add an access permission

    POST /reges/v1/employers/{employerId}/permissions

    Gives a designated person, or a provider, one or more scopes for the employer until a day. A holder who already has an access permission of the same kind that is in force for the employer is refused.

    Parameters

    NameInTypeRequiredMeaning
    employerId path string (uuid) Yesrequired The employer.

    Request body

    FieldTypeRequiredMeaning
    operationId string (uuid) Yesrequired A UUID you choose for this change. Send it again to repeat the request.
    kind string Yesrequired designated-person or provider. One of designated-person, provider
    holder string Yesrequired The person or the company the access permission is for, by name.
    scope string[] Yesrequired What the holder may do: prepare, approve, transmit, one or more.
    expires string (date) Yesrequired The last day the access permission is in force. It cannot be in the past.

    Responses

    StatusMeaningBody
    202 The change was accepted. The body is the operation result: aggregateId is the record that was created or changed. OperationResult
    400 The request cannot be read or breaks the contract: the JSON is malformed, a field is missing or unknown, or a type is wrong. fields names each one. Error
    401 The token is missing, has expired or is not ours. Error
    403 The token does not give access to this employer or operation. Error
    404 The employer does not exist in your account. Error
    409 operation_reused: The operationId was already used with a different request. already_permitted: This holder already has an access permission of this kind for the employer. Error
    422 A value has the right type but the rules do not accept it: a date that does not exist, an amount that is not positive, an unknown kind of change for the contract. Error
    429 There were too many requests. Nothing was processed. The header Retry-After gives the seconds to wait. Error
    503 The gateway cannot answer now. Error

    Request

    curl

    curl -X POST "$RDC_BASE_URL/reges/v1/employers/6e2aa977-c041-49c3-8c57-b9f2cd6cf3f0/permissions" \
      -H "Authorization: Bearer $RDC_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{
      "operationId": "ea581ece-5cb0-4c45-a880-8fd96e7771da",
      "kind": "designated-person",
      "holder": "Ioana Marin",
      "scope": [
        "prepare"
      ],
      "expires": "2027-06-30"
    }'

    JavaScript

    const response = await fetch(`${process.env.RDC_BASE_URL}/reges/v1/employers/6e2aa977-c041-49c3-8c57-b9f2cd6cf3f0/permissions`, {
      method: 'POST',
      headers: {
        Authorization: `Bearer ${process.env.RDC_TOKEN}`,
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({
        "operationId": "ea581ece-5cb0-4c45-a880-8fd96e7771da",
        "kind": "designated-person",
        "holder": "Ioana Marin",
        "scope": [
          "prepare"
        ],
        "expires": "2027-06-30"
      }),
    });
    const result = await response.json();

    Python

    import os
    import requests
    
    response = requests.request(
        'POST',
        f'{os.environ["RDC_BASE_URL"]}/reges/v1/employers/6e2aa977-c041-49c3-8c57-b9f2cd6cf3f0/permissions',
        headers={
            'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
        },
        json={
            'operationId': 'ea581ece-5cb0-4c45-a880-8fd96e7771da',
            'kind': 'designated-person',
            'holder': 'Ioana Marin',
            'scope': [
                'prepare',
            ],
            'expires': '2027-06-30',
        },
    )
    result = response.json()

    PHP

    <?php
    
    $body = <<<'JSON'
    {
      "operationId": "ea581ece-5cb0-4c45-a880-8fd96e7771da",
      "kind": "designated-person",
      "holder": "Ioana Marin",
      "scope": [
        "prepare"
      ],
      "expires": "2027-06-30"
    }
    JSON;
    
    $curl = curl_init(getenv('RDC_BASE_URL') . '/reges/v1/employers/6e2aa977-c041-49c3-8c57-b9f2cd6cf3f0/permissions');
    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/employers/6e2aa977-c041-49c3-8c57-b9f2cd6cf3f0/permissions");
    request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
    request.Content = new StringContent("""
    {
      "operationId": "ea581ece-5cb0-4c45-a880-8fd96e7771da",
      "kind": "designated-person",
      "holder": "Ioana Marin",
      "scope": [
        "prepare"
      ],
      "expires": "2027-06-30"
    }
    """, System.Text.Encoding.UTF8, "application/json");
    var response = await client.SendAsync(request);
    var result = await response.Content.ReadAsStringAsync();

    Response 202

    JSON

    {
      "operationId": "ea581ece-5cb0-4c45-a880-8fd96e7771da",
      "status": "accepted",
      "aggregateId": "05063715-5110-48cd-99e9-ba201af2edf9",
      "aggregateRevision": 1
    }

    Revoke an access permission

    POST /reges/v1/permissions/{permissionId}/revoke

    Ends an access permission now. The holder can no longer act for the employer with it; operations already transmitted are not affected.

    Parameters

    NameInTypeRequiredMeaning
    permissionId path string (uuid) Yesrequired The access permission.

    Request body

    FieldTypeRequiredMeaning
    operationId string (uuid) Yesrequired A UUID you choose for this change. Send it again to repeat the request.
    expectedRevision integer Yesrequired The revision of the register operation you read.

    Responses

    StatusMeaningBody
    202 The change was accepted. The body is the operation result: aggregateId is the record that was created or changed. OperationResult
    401 The token is missing, has expired or is not ours. Error
    403 The token does not give access to this employer or operation. Error
    404 The access permission does not exist in your account. Error
    409 revision_conflict: The record changed since the revision you sent. Nothing was applied. operation_reused: The operationId was already used with a different request. already_revoked: The access permission or the client was already revoked. Error
    429 There were too many requests. Nothing was processed. The header Retry-After gives the seconds to wait. Error
    503 The gateway cannot answer now. Error

    Request

    curl

    curl -X POST "$RDC_BASE_URL/reges/v1/permissions/fda4ecc4-9e6f-4e7f-ab51-001cf3f61806/revoke" \
      -H "Authorization: Bearer $RDC_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{
      "operationId": "4f0548d4-b9a9-4d49-abca-de34badf775e",
      "expectedRevision": 1
    }'

    JavaScript

    const response = await fetch(`${process.env.RDC_BASE_URL}/reges/v1/permissions/fda4ecc4-9e6f-4e7f-ab51-001cf3f61806/revoke`, {
      method: 'POST',
      headers: {
        Authorization: `Bearer ${process.env.RDC_TOKEN}`,
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({
        "operationId": "4f0548d4-b9a9-4d49-abca-de34badf775e",
        "expectedRevision": 1
      }),
    });
    const result = await response.json();

    Python

    import os
    import requests
    
    response = requests.request(
        'POST',
        f'{os.environ["RDC_BASE_URL"]}/reges/v1/permissions/fda4ecc4-9e6f-4e7f-ab51-001cf3f61806/revoke',
        headers={
            'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
        },
        json={
            'operationId': '4f0548d4-b9a9-4d49-abca-de34badf775e',
            'expectedRevision': 1,
        },
    )
    result = response.json()

    PHP

    <?php
    
    $body = <<<'JSON'
    {
      "operationId": "4f0548d4-b9a9-4d49-abca-de34badf775e",
      "expectedRevision": 1
    }
    JSON;
    
    $curl = curl_init(getenv('RDC_BASE_URL') . '/reges/v1/permissions/fda4ecc4-9e6f-4e7f-ab51-001cf3f61806/revoke');
    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/permissions/fda4ecc4-9e6f-4e7f-ab51-001cf3f61806/revoke");
    request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
    request.Content = new StringContent("""
    {
      "operationId": "4f0548d4-b9a9-4d49-abca-de34badf775e",
      "expectedRevision": 1
    }
    """, System.Text.Encoding.UTF8, "application/json");
    var response = await client.SendAsync(request);
    var result = await response.Content.ReadAsStringAsync();

    Response 202

    JSON

    {
      "operationId": "4f0548d4-b9a9-4d49-abca-de34badf775e",
      "status": "accepted",
      "aggregateId": "fda4ecc4-9e6f-4e7f-ab51-001cf3f61806",
      "aggregateRevision": 2
    }

    Extend an access permission

    POST /reges/v1/permissions/{permissionId}/extend

    Moves the end date of an access permission to twelve months from today. It is refused for a revoked access permission and for one that already runs that long.

    Parameters

    NameInTypeRequiredMeaning
    permissionId path string (uuid) Yesrequired The access permission.

    Request body

    FieldTypeRequiredMeaning
    operationId string (uuid) Yesrequired A UUID you choose for this change. Send it again to repeat the request.
    expectedRevision integer Yesrequired The revision of the register operation you read.

    Responses

    StatusMeaningBody
    202 The change was accepted. The body is the operation result: aggregateId is the record that was created or changed. OperationResult
    401 The token is missing, has expired or is not ours. Error
    403 The token does not give access to this employer or operation. Error
    404 The access permission does not exist in your account. Error
    409 revision_conflict: The record changed since the revision you sent. Nothing was applied. operation_reused: The operationId was already used with a different request. already_revoked: The access permission or the client was already revoked. already_extended: The access permission already runs to the end date an extension gives. Error
    429 There were too many requests. Nothing was processed. The header Retry-After gives the seconds to wait. Error
    503 The gateway cannot answer now. Error

    Request

    curl

    curl -X POST "$RDC_BASE_URL/reges/v1/permissions/79bcdc71-0ab2-4594-913c-3919be3d41ed/extend" \
      -H "Authorization: Bearer $RDC_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{
      "operationId": "0f8bd4ec-3f52-4ca2-9fc9-54dab168e7cf",
      "expectedRevision": 1
    }'

    JavaScript

    const response = await fetch(`${process.env.RDC_BASE_URL}/reges/v1/permissions/79bcdc71-0ab2-4594-913c-3919be3d41ed/extend`, {
      method: 'POST',
      headers: {
        Authorization: `Bearer ${process.env.RDC_TOKEN}`,
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({
        "operationId": "0f8bd4ec-3f52-4ca2-9fc9-54dab168e7cf",
        "expectedRevision": 1
      }),
    });
    const result = await response.json();

    Python

    import os
    import requests
    
    response = requests.request(
        'POST',
        f'{os.environ["RDC_BASE_URL"]}/reges/v1/permissions/79bcdc71-0ab2-4594-913c-3919be3d41ed/extend',
        headers={
            'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
        },
        json={
            'operationId': '0f8bd4ec-3f52-4ca2-9fc9-54dab168e7cf',
            'expectedRevision': 1,
        },
    )
    result = response.json()

    PHP

    <?php
    
    $body = <<<'JSON'
    {
      "operationId": "0f8bd4ec-3f52-4ca2-9fc9-54dab168e7cf",
      "expectedRevision": 1
    }
    JSON;
    
    $curl = curl_init(getenv('RDC_BASE_URL') . '/reges/v1/permissions/79bcdc71-0ab2-4594-913c-3919be3d41ed/extend');
    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/permissions/79bcdc71-0ab2-4594-913c-3919be3d41ed/extend");
    request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
    request.Content = new StringContent("""
    {
      "operationId": "0f8bd4ec-3f52-4ca2-9fc9-54dab168e7cf",
      "expectedRevision": 1
    }
    """, System.Text.Encoding.UTF8, "application/json");
    var response = await client.SendAsync(request);
    var result = await response.Content.ReadAsStringAsync();

    Response 202

    JSON

    {
      "operationId": "0f8bd4ec-3f52-4ca2-9fc9-54dab168e7cf",
      "status": "accepted",
      "aggregateId": "79bcdc71-0ab2-4594-913c-3919be3d41ed",
      "aggregateRevision": 2
    }