---
title: "Files | Docs | e-Factura Gateway by R&D Copilot"
description: "The record the gateway stores for an accepted or a received invoice."
canonical: "https://efactura.rdcopilot.com/docs/api-reference/files/"
language: en
updated: 2026-11-22
---

# Files

The record the gateway stores for an accepted or a received invoice.

## Get the stored file of an invoice

GET `/efactura/v1/invoices/{invoiceId}/file`

Returns the record the gateway stores for an invoice that was accepted or received: its file name and the SHA-256 of the record.

### Parameters

| Name | In | Type | Required | Meaning |
| --- | --- | --- | --- | --- |
| `invoiceId` | path | `string (uuid)` | Yesrequired | The invoice. |

### Responses

| Status | Meaning | Body |
| --- | --- | --- |
| `200` | The stored record. | `StoredFile` |
| `401` | The token is missing, has expired or is not ours. | `Error` |
| `403` | The token does not give access to this company or operation. | `Error` |
| `404` | `invoice_not_found`: The invoice does not exist in your account. `no_stored_file`: The invoice has no stored file yet. A file is stored for an accepted invoice and for a received one. | `Error` |
| `429` | There were too many requests. Nothing was processed. The header `Retry-After` gives the seconds to wait. | `Error` |
| `503` | The gateway cannot answer now. | `Error` |

### Request

curl

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

JavaScript

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

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

```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/file");
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

```json
{
  "invoiceId": "63b02302-55dc-4523-b584-c4eb55159924",
  "name": "FCT-2026-00418.xml",
  "contentType": "application/xml",
  "sha256": "3b40e35ffaa1a35fe6eecbac2e7914b79e732ae7850dd9f6dceb00b712f886dd",
  "storedAt": "2026-11-19T14:37:40Z"
}
```
