Store and archive
The record the gateway stores for an accepted or a received invoice, how to read its name and hash, and what to keep yourself.
On this page
The gateway stores a record of every invoice that was accepted by the authority and of every invoice it downloaded. The record has a file name and a SHA-256 hash. The open invoice shows the same two values in its Stored record.
Read the stored record
curl
curl "$RDC_BASE_URL/efactura/v1/invoices/63b02302-55dc-4523-b584-c4eb55159924/file" \
-H "Authorization: Bearer $RDC_TOKEN" JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/efactura/v1/invoices/63b02302-55dc-4523-b584-c4eb55159924/file`, {
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"]}/efactura/v1/invoices/63b02302-55dc-4523-b584-c4eb55159924/file',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
)
result = response.json() PHP
<?php
$curl = curl_init(getenv('RDC_BASE_URL') . '/efactura/v1/invoices/63b02302-55dc-4523-b584-c4eb55159924/file');
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")}/efactura/v1/invoices/63b02302-55dc-4523-b584-c4eb55159924/file");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); {
"invoiceId": "63b02302-55dc-4523-b584-c4eb55159924",
"name": "FCT-2026-00418.xml",
"contentType": "application/xml",
"sha256": "3b40e35ffaa1a35fe6eecbac2e7914b79e732ae7850dd9f6dceb00b712f886dd",
"storedAt": "2026-11-19T14:37:40Z"
} | Field | Meaning |
|---|---|
name | The file name: the number of the invoice and .xml. |
contentType | The media type of the file. |
sha256 | The SHA-256 of the stored record, in hexadecimal. |
storedAt | When the record was stored: when the authority accepted the invoice, or when the gateway downloaded it. |
An invoice that is not accepted or received has no stored record yet, and the answer is a 404 with no_stored_file.
Use the hash
The hash identifies the record. Keep it next to the invoice in your own archive. When you read the record later and the hash is the same, the record has not changed.
What to keep yourself
- The invoice object of every sent invoice once it is
accepted, with itsuploadIndex, and of every received invoice. - The
sha256of its stored record. - The history of an invoice that was
rejected, with the message of the authority.