---
title: "Expiry and renewal | Docs | e-Factura Gateway by R&D Copilot"
description: "An authorisation has an end date. See the three states it can be in and how to renew it before it ends."
canonical: "https://efactura.rdcopilot.com/docs/companies/expiry-and-renewal/"
language: en
updated: 2026-11-22
---

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

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.

| Status | Meaning |
| --- | --- |
| Active `active` | The authorisation is in force and does not need renewal yet. |
| Renewal needed `renewal_needed` | The authorisation is in force and its end date is near. Renew it now. |
| Revoked `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

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

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

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

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

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

curl

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

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

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

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

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

## When it is refused

| Code | When |
| --- | --- |
| `no_renewal_needed` | The status is `active`. Start a renewal when it is `renewal_needed`. |
| `renewal_running` | A renewal is already under way. Wait for the representative, then check. |
| `no_renewal_running` | You asked the gateway to check a renewal that was never started. |
| `authorisation_revoked` | The authorisation was revoked. The gateway cannot renew it. |

Check `expires` for every company on a schedule of your own and start a renewal when the status is `renewal_needed`. Sending is refused with `authorisation_not_in_force` once an authorisation is no longer in force.
