---
title: "List an invoice's files in 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.

# List an invoice's files in 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</code>
</div>
</div>

Returns every file of the invoice that is kept in the GoBD archive, oldest first. Only a workspace whose plan includes `gobd-archive` (`GET /v1/plan`) has files here.

A received invoice keeps the file as it arrived, whatever the verdict, and its check reports. An issued invoice keeps the files we wrote and its check reports, once the check did not reject it. A live file is locked in COMPLIANCE mode until the day after `retainUntil`: nobody can change or delete it before then. `lockMode` and `lockedUntil` are what the bucket answered when it was read back, not what was asked for. A sandbox file is not locked and is removed after 30 days.

`state` is `waiting` until the file is written; `lastError` then says why it is still waiting.

## Path parameters

## Response

A `200` answer carries these fields.

## Status codes

| Status | Meaning |
|---|---|
| `200` | `{invoiceId, files: [ArchivedFile]}`. An invoice with nothing in the archive has an empty list. |
| `401` | No usable credential was sent (`invalid_credentials`). |
| `404` | This company filed no invoice with this id (`unknown_invoice`). |
| `503` | This deployment has no database (`no_database`). |

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

</div>
</div>

Source: https://docs.certinvo.com/reference/api/invoices/list-an-invoice-s-files-in-the-gobd-archive/index.mdx
