Skip to content
Docs
API 1.0.0 · 22 Nov 2026

Search the docs

    Română

    Expiry and renewal

    An authorisation has an end date. See the three states it can be in and how to renew it before it ends.

    On this page

    An authorisation ends on the date in expires. The gateway marks it renewal_needed ahead of that day, and the company keeps sending and receiving until it ends. The Companies view shows the same states.

    StatusMeaning
    active The authorisation is in force and does not need renewal yet.
    renewal_needed The authorisation is in force and its end date is near. Renew it now.
    revoked The authorisation was revoked. Nothing is sent for the company until the representative authorises the gateway again.

    Renew an authorisation

    A renewal has three steps. Two are the gateway’s and one is the company’s, at the authority.

    1. The gateway prepares the renewal

      You start the renewal. The company shows renewal: waiting.

    2. The representative confirms access at the authority

      This step is the company’s. The gateway cannot do it and does not imitate the screens of the authority.

    3. The gateway sees the new authorisation

      You ask the gateway to check. The status becomes active and expires moves to the new end date.

    curl

    curl -X POST "$RDC_BASE_URL/efactura/v1/companies/aaa74c23-5c48-4055-82e9-dc5c4c36c13e/authorisation/renewal" \
      -H "Authorization: Bearer $RDC_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{
      "operationId": "9918b72d-5684-45ca-a650-5265b947f97a"
    }'

    JavaScript

    const response = await fetch(`${process.env.RDC_BASE_URL}/efactura/v1/companies/aaa74c23-5c48-4055-82e9-dc5c4c36c13e/authorisation/renewal`, {
      method: 'POST',
      headers: {
        Authorization: `Bearer ${process.env.RDC_TOKEN}`,
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({
        "operationId": "9918b72d-5684-45ca-a650-5265b947f97a"
      }),
    });
    const result = await response.json();

    Python

    import os
    import requests
    
    response = requests.request(
        'POST',
        f'{os.environ["RDC_BASE_URL"]}/efactura/v1/companies/aaa74c23-5c48-4055-82e9-dc5c4c36c13e/authorisation/renewal',
        headers={
            'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
        },
        json={
            'operationId': '9918b72d-5684-45ca-a650-5265b947f97a',
        },
    )
    result = response.json()

    PHP

    <?php
    
    $body = <<<'JSON'
    {
      "operationId": "9918b72d-5684-45ca-a650-5265b947f97a"
    }
    JSON;
    
    $curl = curl_init(getenv('RDC_BASE_URL') . '/efactura/v1/companies/aaa74c23-5c48-4055-82e9-dc5c4c36c13e/authorisation/renewal');
    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")}/efactura/v1/companies/aaa74c23-5c48-4055-82e9-dc5c4c36c13e/authorisation/renewal");
    request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
    request.Content = new StringContent("""
    {
      "operationId": "9918b72d-5684-45ca-a650-5265b947f97a"
    }
    """, System.Text.Encoding.UTF8, "application/json");
    var response = await client.SendAsync(request);
    var result = await response.Content.ReadAsStringAsync();

    Response 202

    {
      "operationId": "9918b72d-5684-45ca-a650-5265b947f97a",
      "status": "accepted",
      "aggregateId": "aaa74c23-5c48-4055-82e9-dc5c4c36c13e",
      "aggregateRevision": 2
    }

    curl

    curl -X POST "$RDC_BASE_URL/efactura/v1/companies/aaa74c23-5c48-4055-82e9-dc5c4c36c13e/authorisation/renewal/check" \
      -H "Authorization: Bearer $RDC_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{
      "operationId": "70eaf4ae-02ab-4e0b-bb10-5abfc16f483a"
    }'

    JavaScript

    const response = await fetch(`${process.env.RDC_BASE_URL}/efactura/v1/companies/aaa74c23-5c48-4055-82e9-dc5c4c36c13e/authorisation/renewal/check`, {
      method: 'POST',
      headers: {
        Authorization: `Bearer ${process.env.RDC_TOKEN}`,
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({
        "operationId": "70eaf4ae-02ab-4e0b-bb10-5abfc16f483a"
      }),
    });
    const result = await response.json();

    Python

    import os
    import requests
    
    response = requests.request(
        'POST',
        f'{os.environ["RDC_BASE_URL"]}/efactura/v1/companies/aaa74c23-5c48-4055-82e9-dc5c4c36c13e/authorisation/renewal/check',
        headers={
            'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
        },
        json={
            'operationId': '70eaf4ae-02ab-4e0b-bb10-5abfc16f483a',
        },
    )
    result = response.json()

    PHP

    <?php
    
    $body = <<<'JSON'
    {
      "operationId": "70eaf4ae-02ab-4e0b-bb10-5abfc16f483a"
    }
    JSON;
    
    $curl = curl_init(getenv('RDC_BASE_URL') . '/efactura/v1/companies/aaa74c23-5c48-4055-82e9-dc5c4c36c13e/authorisation/renewal/check');
    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")}/efactura/v1/companies/aaa74c23-5c48-4055-82e9-dc5c4c36c13e/authorisation/renewal/check");
    request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
    request.Content = new StringContent("""
    {
      "operationId": "70eaf4ae-02ab-4e0b-bb10-5abfc16f483a"
    }
    """, System.Text.Encoding.UTF8, "application/json");
    var response = await client.SendAsync(request);
    var result = await response.Content.ReadAsStringAsync();

    Response 202

    {
      "operationId": "70eaf4ae-02ab-4e0b-bb10-5abfc16f483a",
      "status": "accepted",
      "aggregateId": "aaa74c23-5c48-4055-82e9-dc5c4c36c13e",
      "aggregateRevision": 3
    }

    When it is refused

    CodeWhen
    no_renewal_neededThe status is active. Start a renewal when it is renewal_needed.
    renewal_runningA renewal is already under way. Wait for the representative, then check.
    no_renewal_runningYou asked the gateway to check a renewal that was never started.
    authorisation_revokedThe authorisation was revoked. The gateway cannot renew it.