Skip to content
Docs
API 1.0.0 · 22 Nov 2026

Search the docs

    Română

    When the authority is unavailable

    What happens when the authority does not answer an upload, why the invoice goes to manual review and how to send it again safely.

    On this page

    If the authority does not answer in time, the gateway cannot know whether the file arrived. It does not guess. The invoice moves to manual_review and waits for a person, because sending it again blindly could upload it twice.

    The history entry of an unknown outcome

    {
      "status": "manual_review",
      "at": "2026-11-23T07:02:00Z",
      "message": "timeout",
      "code": "unknown-outcome"
    }

    The entry has the code unknown-outcome. The invoice has no upload index yet, because the gateway never saw one. It is on the errors list of Invoices and credit notes.

    What to do

    1. Find the invoices

      List the invoices with list set to errors, or filter on the status manual_review.

    2. Check at the authority

      Check whether the authority received the file. The gateway cannot tell you, and neither can the status of the invoice.

    3. Send it again

      If the file did not arrive, send the invoice again. It is queued again and uploaded, and it gets its upload index.

    curl

    curl -X POST "$RDC_BASE_URL/efactura/v1/invoices/9b75cd3f-17be-4470-810d-511167d22575/resend" \
      -H "Authorization: Bearer $RDC_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{
      "operationId": "f6771348-1d54-4dd9-90fb-feb42fc4ec7c",
      "expectedRevision": 5
    }'

    JavaScript

    const response = await fetch(`${process.env.RDC_BASE_URL}/efactura/v1/invoices/9b75cd3f-17be-4470-810d-511167d22575/resend`, {
      method: 'POST',
      headers: {
        Authorization: `Bearer ${process.env.RDC_TOKEN}`,
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({
        "operationId": "f6771348-1d54-4dd9-90fb-feb42fc4ec7c",
        "expectedRevision": 5
      }),
    });
    const result = await response.json();

    Python

    import os
    import requests
    
    response = requests.request(
        'POST',
        f'{os.environ["RDC_BASE_URL"]}/efactura/v1/invoices/9b75cd3f-17be-4470-810d-511167d22575/resend',
        headers={
            'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
        },
        json={
            'operationId': 'f6771348-1d54-4dd9-90fb-feb42fc4ec7c',
            'expectedRevision': 5,
        },
    )
    result = response.json()

    PHP

    <?php
    
    $body = <<<'JSON'
    {
      "operationId": "f6771348-1d54-4dd9-90fb-feb42fc4ec7c",
      "expectedRevision": 5
    }
    JSON;
    
    $curl = curl_init(getenv('RDC_BASE_URL') . '/efactura/v1/invoices/9b75cd3f-17be-4470-810d-511167d22575/resend');
    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/invoices/9b75cd3f-17be-4470-810d-511167d22575/resend");
    request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
    request.Content = new StringContent("""
    {
      "operationId": "f6771348-1d54-4dd9-90fb-feb42fc4ec7c",
      "expectedRevision": 5
    }
    """, System.Text.Encoding.UTF8, "application/json");
    var response = await client.SendAsync(request);
    var result = await response.Content.ReadAsStringAsync();

    Response 202

    {
      "operationId": "f6771348-1d54-4dd9-90fb-feb42fc4ec7c",
      "status": "accepted",
      "aggregateId": "9b75cd3f-17be-4470-810d-511167d22575",
      "aggregateRevision": 6
    }

    • Only an invoice in manual_review can be sent again. Any other status answers invalid_status.
    • The send is refused with authorisation_not_in_force when the authorisation of the company is not in force.

    Invoices already uploaded

    An invoice that is submitted or processing has an upload index, so the gateway knows the authority has it. It keeps its status until the authority answers, and you read it again later or wait for the event. Do not send it again.