---
title: "Read one file from the GoBD archive"
description: "Invoices API"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.certinvo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Read one file from the GoBD archive

{/* Generated by apps/docs/scripts/generate.ts from contracts/api/openapi.yaml. Do not edit. */}
<div class="cvo-op">
<div class="cvo-op-main">

<div class="cvo-op-header">
<div class="cvo-op-path-row">
<span class="cvo-method" data-method="get">GET</span>
<code class="cvo-op-path-code">/v1/invoices/&#123;id&#125;/archive/&#123;file&#125;</code>
</div>
</div>

Returns one archived file, read from the bucket by the version that was locked, as it was archived. Its sha256 is checked on the way: a file whose bytes differ is never returned. Each read is added to the invoice's history as `api:archive-read`, with the file and its sha256. Where one invoice has several files of one name (the check reports of several checks), the newest is returned.

## Path parameters

## Status codes

| Status | Meaning |
|---|---|
| `200` | The file, with the media type it was archived with. |
| `401` | No usable credential was sent (`invalid_credentials`). |
| `404` | This company filed no invoice with this id (`unknown_invoice`), or the invoice has no archived file of this name (`not_archived`). |
| `409` | The file is waiting to be written to the archive (`not_archived_yet`), or it is a file we made that the newest check no longer accepts (`invoice_rejected`, `invoice_not_validated`, `invoice_changed_since_check`), the same refusal every download gives. It stays locked in the archive. An invoice already sent is decided by the check it was sent with, while that check accepted it. |
| `502` | The bucket returned bytes that are not the archived file (`archive_file_changed`). Nothing was returned. |
| `503` | This deployment has no archive bucket (`archive_not_configured`) or no database (`no_database`), or the bucket did not hand the file back (`archive_unavailable`). The file is still archived. |

</div>
<div class="cvo-op-aside">

</div>
</div>

Source: https://docs.certinvo.com/reference/api/invoices/read-one-file-from-the-gobd-archive/index.mdx
