---
title: "List all files of an invoice"
method: GET
path: "/v1/invoices/{invoiceKey}/files"
tags: ["Invoices"]
---

# List all files of an invoice

`GET /v1/invoices/{invoiceKey}/files`

Retrieves the information about all PDF files of a specified invoice. 

Invoice PDF files are returned in reverse chronological order by the value of the `versionNumber` field.
**Note**: This API only retrieves the PDF files that have been generated. If the latest PDF file is being generated, it will not be included in the response.
You can use the [Query](https://developer.zuora.com/api-references/api/operation/Action_POSTquery) action to get the latest PDF file, for example: `"select Body from Invoice where Id = '2c93808457d787030157e0324aea5158'"`.
See [Query an Invoice Body](https://docs.zuora.com?resourceId=platform-soap-api-object-invoice) for more information.

## Path parameters

- `invoiceKey` string, required

## Query parameters

- `pageSize` integer
- `page` integer

## Headers

- `Accept-Encoding` string
- `Content-Encoding` string
- `Zuora-Track-Id` string
- `Zuora-Entity-Ids` string
- `Zuora-Org-Ids` string
- `Zuora-Version` string

## Response `200`

OK

- GETInvoiceFilesResponse
  - `invoiceFiles` InvoiceFile[] — Container for invoice PDF files.
    - `id` string — The ID of the invoice PDF file. This is the ID for the file object and different from the file handle ID in the `pdfFileUrl` field. To open a file, you have to use the file handle ID.
    - `pdfFileUrl` string — The relative URL of the invoice PDF file. You can obtain the absolute URL for downloading the file by adding a prefix in the following format: `{environment_base_url}/apps` For example, `https://apisandbox.zuora.com/apps/v1/files/2c98901f62d7d83d0162d7facea6262d`.
    - `versionNumber` integer — The version number of the invoice PDF file.
  - `nextPage` string, URL — URL to retrieve the next page of the response if it exists; otherwise absent.
  - `success` boolean — Returns `true` if the request was processed successfully.

## Other responses

- `500` — Internal Server Error
- `4XX` — Request Errors

---

[API](https://skmtc.dev/zuora/apis/api-reference.md) · [All operations](https://skmtc.dev/zuora/apis/api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/zuora/api-reference/revisions/d11e237f3e54/schema)
