> ## Documentation Index
> Fetch the complete documentation index at: https://foliant-help.iforiti.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Download the archive and how long documents are kept

> Download every issued invoice and credit note as a zip with a manifest, and learn how long Foliant keeps them and when personal data is removed.

Foliant keeps your issued invoices and credit notes for the number of years you choose. You can download all of them at any time as one archive, for an audit, for your accountant, or before you uninstall Foliant.

![Keep issued documents for, in the Locked invoices settings](https://mintcdn.com/foliant-dev/nnNby4-r9e5xN6eK/invoices-and-numbering/images/locked-invoices.png?fit=max\&auto=format\&n=nnNby4-r9e5xN6eK\&q=85\&s=41321b0355bd2867b58d4e1c5c343f2b)

## Download the archive

1. In Foliant, open **Issued invoices**.
2. Click **Download archive** at the top of the page.

You get a zip file named after today's date. It contains:

| In the zip | What it is |
| - | - |
| `invoice/` | One PDF per issued invoice, named after its number. |
| `credit-note/` | One PDF per issued credit note. |
| `xml/` | The e-invoice data of each document that carries it, named after its number. Only with [e-invoice data](https://foliant-help.iforiti.com/invoices-and-numbering/e-invoices.md) on. |
| `manifest.csv` | One line per document: number, type, order, currency, total, when it was issued, the PDF's SHA-256 hash, the record hash, the file name and the e-invoice profile (`en16931`, or empty without e-invoice data). |

**Download archive** is unavailable until at least one document has been issued.

## How long documents are kept

You choose this in **Settings › Documents & printing › Locked invoices**, in **Keep issued documents for**: from 1 to 30 years, 10 by default. How long you must keep invoices depends on your country; check with your accountant.

Each document keeps the period that was set when it was issued. Changing the setting later only affects documents issued after the change.

## When personal data is removed

When a customer asks you to erase their data, Shopify tells Foliant. Foliant can't delete an issued invoice while the law still requires you to keep it, so it marks the customer's documents and waits.

Once a marked document's retention period has passed, Foliant removes it:

* The PDF is deleted.
* The customer's personal details are removed from the record. The number, order name, dates and totals stay.
* The document shows a **Redacted** badge on the **Issued invoices** page and can no longer be downloaded.

Documents nobody asked to erase stay as they are.

## Before you uninstall Foliant

After you uninstall, Shopify asks Foliant to delete your store's data, and your issued documents are deleted with it. Download the archive first so you keep your originals.

If you use the [cloud archive](https://foliant-help.iforiti.com/invoices-and-numbering/cloud-archive.md), your Google Drive or Dropbox already has a copy of each document, and it stays there after you uninstall.

## Related articles

* [The Issued invoices page](https://foliant-help.iforiti.com/invoices-and-numbering/issued-invoices-page.md)
* [Save issued invoices to Google Drive or Dropbox](https://foliant-help.iforiti.com/invoices-and-numbering/cloud-archive.md)
* [Lock issued invoices](https://foliant-help.iforiti.com/invoices-and-numbering/locked-invoices.md)
* [Verify a PDF and the hash chain](https://foliant-help.iforiti.com/invoices-and-numbering/verify-a-pdf.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.