Knowledge Center

Knowledge Center > API > REST API > REST API Reference > Get Files

Get Files

This reference describes how to retrieve files through the REST API by specifying the file ID. You can retrieve accounting period reports, such as the Revenue Detail report, as well as other files such as invoice PDFs.

Request

  • Production: GET https://api.zuora.com/rest/v1/files/{file-id}
  • API Sandbox: GET https://apisandbox-api.zuora.com/rest/v1/files/{file-id}

Request parameter

file-id

required

path

The Zuora ID of the file you want to retrieve.

See Get Accounting Period for getting file IDs of accounting period reports, such as the Revenue Detail report.

File Size Limitation 

The maximum export file size is 2047MB. If you have large data requests that go over this limit, you will get the following 403 HTTP response code from Zuora:
  <security:max-object-size>2047MB</security:max-object-size>

Submit a request at Zuora Global Support if you require additional assistance.

We can work with you to determine if large file optimization is an option for you.

Example

The following is an example cURL request that retrieves an invoice PDF. 

curl -i -k -H "apiAccessKeyId:$USER_NAME" -H "apiSecretAccessKey:$PASSWORD" 
-H "Accept:application/pdf" 
-X GET https://apisandbox-api.zuora.com/rest/v1/files/2c92c08c55534cf00155581fb474314d 
-o /Users/jsmith/Downloads/invoiceFile1.pdf

The invoice PDF is downloaded to /Users/jsmith/Downloads and named invoiceFile1.pdf.

Last modified
08:51, 30 Jun 2016

Tags

Classifications

(not set)