---
title: "Export bulk PDF files"
method: POST
path: "/v1/operations/bulk-pdf"
tags: ["Operations"]
---

# Export bulk PDF files

`POST /v1/operations/bulk-pdf`

The background job that compresses large number of PDF(s) into ZIP files. For answers to frequently asked questions regarding exporting bulk PDF files, see <a href="https://docs.zuora.com/en/zuora-billing/bill-your-customer/export-bulk-pdf-files/faqs" target="_blank">Export Bulk PDF Files FAQs</a>.
**Note**: Do not include multiple objectIds with the same PDF file names in a single bulk PDF upload request.

## Headers

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

## Request body

- POSTBulkPdfGenerationJobRequestType
  - `documents` DocumentList[], required — An array that contains a collection of objects where each object contains billing document type and their IDs.
    - `docType` 'Invoice' | 'CreditMemo' | 'DebitMemo' — The type of billing document.
    - `objectIds` string[] — The collection of billing document IDs.
  - `fileName` string, required — The prefix part of output file name(s). The response will include multiple file URLs. The number of zip files generated corresponds to the number of invoice IDs. Each zip file contains up to 1000 document IDs. Eg: if fileName is "all-invoices-posted-jan-2024" then fileURL(s) will start with the file name followed by an underscore and a number. For instance, all-invoices-posted-jan-2024_1.zip, all-invoices-posted-jan-2024_2.zip, and so on.
  - `name` string — The name of the job.
  - `indexFileFormat` 'JSON' | 'CSV', required — The format of the index file. It contains the metadata about the files and their contents.
  - `generateMissingPDF` boolean — This flag controls the behavior of whether to generate PDF(s) for billing documents that do not already have one. - setting it to true indicates service would go through the provided document ID list, find the billing documents that do not have a generated PDF, generate them all at once, and then proceed to the zipping process. - setting it to false indicates service would go through the provided document ID list, find the billing documents that do not have a generated PDF, mark them as Invalid, and skip them from the zipping process. IDs marked as invalid will be included in the response. The default value is false.
  - `ignoreArchivedFiles` boolean — Ignores archived PDF files during export without causing the entire job request to fail when enabled.
  - `persistIndexFile` boolean — Controls the generation of the index file, allowing you to efficiently handle high volumes of requests. By default, this field is set to `true`. - When set to `true`, the index file is generated and included in the zip file. - When set to `false`, the index file is not generated and consequently not included in the zip file.

## Response `200`

OK

- POSTBulkPdfGenerationJobResponseType
  - `processId` string — The ID of the process that handles the operation.
  - `reasons` object[] — The container of the error code and message. This field is available only if the `success` field is `false`.
    - `code` string — The error code of response.
    - `message` string — The detail information of the error response
  - `requestId` string, uuid — Unique identifier of the request.
  - `success` boolean — Indicates whether the call succeeded.
  - `jobId` string — Unique Id for the Job Triggered.
  - `invalidIds` unknown
  - `skippedDocuments` object[] — The `skippedDocuments` array will be empty unless archived files are marked to skip during job creation.
    - `docType` 'Invoice' | 'CreditMemo' | 'DebitMemo' — The document type of the skipped document.
    - `objectIds` string[] — The IDs of the skipped document objects.

## Other responses

- `400` — Invalid input
- `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)
