---
title: "Send and follow | Docs | e-Factura Gateway by R&D Copilot"
description: "Send a draft to the authority, then follow it from the upload index to ok or nok by polling, by events or by its history."
canonical: "https://efactura.rdcopilot.com/docs/send/send-and-follow/"
language: en
updated: 2026-11-22
---

# Send and follow

Send a draft to the authority, then follow it from the upload index to ok or nok by polling, by events or by its history.

Sending is one request. The gateway then does the rest and your software follows the result. This is the whole path of an invoice, as the Activity of the open invoice shows it.

## Send

Send the draft with the revision you read. In one operation the gateway passes `validated`, `authorized` and `queued`, uploads the file and takes the upload index the authority returns. The invoice is then `submitted`.

curl

```bash
curl -X POST "$RDC_BASE_URL/efactura/v1/invoices/5081abd5-935d-4688-b961-0715c149fbd1/send" \
  -H "Authorization: Bearer $RDC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "operationId": "138774d1-e683-4558-a364-ae838d082f9a",
  "expectedRevision": 1
}'
```

JavaScript

```javascript
const response = await fetch(`${process.env.RDC_BASE_URL}/efactura/v1/invoices/5081abd5-935d-4688-b961-0715c149fbd1/send`, {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.RDC_TOKEN}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "operationId": "138774d1-e683-4558-a364-ae838d082f9a",
    "expectedRevision": 1
  }),
});
const result = await response.json();
```

Python

```python
import os
import requests

response = requests.request(
    'POST',
    f'{os.environ["RDC_BASE_URL"]}/efactura/v1/invoices/5081abd5-935d-4688-b961-0715c149fbd1/send',
    headers={
        'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
    },
    json={
        'operationId': '138774d1-e683-4558-a364-ae838d082f9a',
        'expectedRevision': 1,
    },
)
result = response.json()
```

PHP

```php
<?php

$body = <<<'JSON'
{
  "operationId": "138774d1-e683-4558-a364-ae838d082f9a",
  "expectedRevision": 1
}
JSON;

$curl = curl_init(getenv('RDC_BASE_URL') . '/efactura/v1/invoices/5081abd5-935d-4688-b961-0715c149fbd1/send');
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/invoices/5081abd5-935d-4688-b961-0715c149fbd1/send");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
  "operationId": "138774d1-e683-4558-a364-ae838d082f9a",
  "expectedRevision": 1
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync();
```

Response 202

```json
{
  "operationId": "138774d1-e683-4558-a364-ae838d082f9a",
  "status": "accepted",
  "aggregateId": "5081abd5-935d-4688-b961-0715c149fbd1",
  "aggregateRevision": 2
}
```

| Refused with | Code | Why |
| --- | --- | --- |
| `422` | `blocked_by_checks` | A blocking check fails. The invoice stays a draft. |
| `409` | `authorisation_not_in_force` | The company has no authorisation in force. See [Expiry and renewal](https://efactura.rdcopilot.com/docs/companies/expiry-and-renewal/). |
| `409` | `revision_conflict` | The invoice changed after you read it. |
| `409` | `invalid_status` | The invoice is not a draft. |

## Follow the answer

After the upload the authority checks the file. The invoice is `processing` while it does, and ends `accepted` or `rejected`. Three ways to follow it, from the lightest to the most complete.

1.  Events
    
    The gateway sends `invoice.submitted`, `invoice.accepted` and `invoice.rejected` to your endpoint. See [Event catalogue](https://efactura.rdcopilot.com/docs/events/event-catalogue/).
    
2.  Read the invoice
    
    `status` and `uploadIndex` of [the invoice](https://efactura.rdcopilot.com/docs/api-reference/invoices/) are always current.
    
3.  Ask the authority now
    
    Read the answer of the authority at once, without waiting for the event.
    

curl

```bash
curl -X POST "$RDC_BASE_URL/efactura/v1/invoices/0fd9e3fe-3800-4b8b-9b55-c5cb45eddc73/refresh" \
  -H "Authorization: Bearer $RDC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "operationId": "137f14e2-38b7-430a-a716-be7e3c75f564",
  "expectedRevision": 6
}'
```

JavaScript

```javascript
const response = await fetch(`${process.env.RDC_BASE_URL}/efactura/v1/invoices/0fd9e3fe-3800-4b8b-9b55-c5cb45eddc73/refresh`, {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.RDC_TOKEN}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "operationId": "137f14e2-38b7-430a-a716-be7e3c75f564",
    "expectedRevision": 6
  }),
});
const result = await response.json();
```

Python

```python
import os
import requests

response = requests.request(
    'POST',
    f'{os.environ["RDC_BASE_URL"]}/efactura/v1/invoices/0fd9e3fe-3800-4b8b-9b55-c5cb45eddc73/refresh',
    headers={
        'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
    },
    json={
        'operationId': '137f14e2-38b7-430a-a716-be7e3c75f564',
        'expectedRevision': 6,
    },
)
result = response.json()
```

PHP

```php
<?php

$body = <<<'JSON'
{
  "operationId": "137f14e2-38b7-430a-a716-be7e3c75f564",
  "expectedRevision": 6
}
JSON;

$curl = curl_init(getenv('RDC_BASE_URL') . '/efactura/v1/invoices/0fd9e3fe-3800-4b8b-9b55-c5cb45eddc73/refresh');
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/invoices/0fd9e3fe-3800-4b8b-9b55-c5cb45eddc73/refresh");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
  "operationId": "137f14e2-38b7-430a-a716-be7e3c75f564",
  "expectedRevision": 6
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync();
```

Response 202

```json
{
  "operationId": "137f14e2-38b7-430a-a716-be7e3c75f564",
  "status": "accepted",
  "aggregateId": "0fd9e3fe-3800-4b8b-9b55-c5cb45eddc73",
  "aggregateRevision": 7
}
```

`refreshInvoice` is refused with `invalid_status` unless the invoice is `submitted` or `processing`.

## Read the history

The history lists every status the invoice went through, oldest first, with the time. The entry of `submitted` carries the `uploadIndex`. The entry of `rejected` carries the `message` of the authority, exactly as the authority wrote it. An accepted invoice is also stored: see [Store and archive](https://efactura.rdcopilot.com/docs/receive/store-and-archive/).

curl

```bash
curl "$RDC_BASE_URL/efactura/v1/invoices/63b02302-55dc-4523-b584-c4eb55159924/history?limit=20" \
  -H "Authorization: Bearer $RDC_TOKEN"
```

JavaScript

```javascript
const response = await fetch(`${process.env.RDC_BASE_URL}/efactura/v1/invoices/63b02302-55dc-4523-b584-c4eb55159924/history?limit=20`, {
  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"]}/efactura/v1/invoices/63b02302-55dc-4523-b584-c4eb55159924/history?limit=20',
    headers={
        'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
    },
)
result = response.json()
```

PHP

```php
<?php

$curl = curl_init(getenv('RDC_BASE_URL') . '/efactura/v1/invoices/63b02302-55dc-4523-b584-c4eb55159924/history?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#

```csharp
using System.Net.Http.Headers;

var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/efactura/v1/invoices/63b02302-55dc-4523-b584-c4eb55159924/history?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": [
    {
      "status": "draft",
      "at": "2026-11-19T14:31:00Z"
    },
    {
      "status": "validated",
      "at": "2026-11-19T14:31:02Z"
    },
    {
      "status": "authorized",
      "at": "2026-11-19T14:31:03Z"
    },
    {
      "status": "queued",
      "at": "2026-11-19T14:31:04Z"
    },
    {
      "status": "submitted",
      "at": "2026-11-19T14:31:09Z",
      "uploadIndex": "5012480131"
    },
    {
      "status": "processing",
      "at": "2026-11-19T14:33:10Z"
    },
    {
      "status": "accepted",
      "at": "2026-11-19T14:37:40Z"
    }
  ],
  "nextCursor": null
}
```

`accepted` and `rejected` are final: they never change, and a rejected invoice is answered with a correction. See [Lifecycle and statuses](https://efactura.rdcopilot.com/docs/statuses-and-errors/lifecycle-and-statuses/).
