Skip to main content

InvoiceFile

Zuora

InvoiceFile

The InvoiceFile SOAP object allows you to retrieve invoice PDF files for historical versions of an invoice. This reference describes the InvoiceFile object and its fields.

The InvoiceFile object is available in WSDL 65 and highter.

The InvoiceFile object is only available for invoice files generated after the Zuora February 2015 release, R185.

 

The InvoiceFile object is not available in Data Source for export.

Supported Calls

You can use this object with the following call:

Walkthroughs and Use Cases

Common ways to use this object include:

  • One of your customers has questions about an invoice PDF file that is no longer the most recent version. You can query InvoiceFile to retrieve exactly the same PDF file version as the customer is using.
  • One of your customers lost an invoice PDF file that is no longer the most recent version. You can query InvoiceFile to retrieve that version of the PDF file and resend it to the customer.

The InvoiceFile object is deleted if you delete the invoice with which it is associated.

Field Descriptions

All field names are case sensitive. Check enumerated values in descriptions to confirm capitalization and spacing. See Field Types for additional information.

Name

Required to Create?

Allowed Operations

Description

CreatedById

optional

Query

User ID of the person who created the invoice file. If a bill run created the invoice file, then the value is the user ID of the person who created the bill run.

Type: zns:ID

Character limit: --

Version: WSDL 65.0+

Values: automatically generated

CreatedDate

optional

Query

Date and time the invoice PDF file was created.

Type: dateTime

Character limit: --

Version: WSDL 65.0+

Values: automatically generated

Id optional Query

The ID of this object.

Type: zns:ID

Character limit: 32

Version notes: WSDL 65.0+

Values: automatically generated

InvoiceId

optional

Query

ID of the invoice that the InvoiceFile object belongs to.

Type: zns:ID

Character limit: --

Version: WSDL 65.0+

Values: automatically generated

PdfFileUrl

optional

Query

URL where you can download the invoice PDF file.

Type: string

Character limit: --

Version: WSDL 65.0+

Values: automatically generated

UpdatedById

optional

Query

User ID of the person who last updated the invoice.

Type: zns:ID

Character limit: --

Version: WSDL 65.0+

Values: automatically generated

UpdatedDate

optional

Query

Date and time the invoice was last updated.

Type: dateTime

Character limit: --

Version: WSDL 65.0+

Values: automatically generated

VersionNumber

optional

Query

Version number of the invoice PDF file.

Type: long

Character limit: --

Version: WSDL 65.0+

Values: automatically generated

Example

Retrieving all historical PDF files of an invoice

Example request

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:api="http://api.zuora.com/">
   <soapenv:Header>
        <ns1:SessionHeader xmlns:ns1="http://api.zuora.com/"
            soapenv:mustUnderstand="0">
            <ns1:session>${login#Response#//ns1:loginResponse/ns1:result/ns1:Session}</ns1:session>
        </ns1:SessionHeader>
    </soapenv:Header>
   <soapenv:Body>
      <api:query>
         <api:queryString>select VersionNumber, InvoiceId, PdfFileUrl from InvoiceFile where InvoiceId='402892014add19eb014add21d0060022' </api:queryString>
      </api:query>
   </soapenv:Body>
</soapenv:Envelope>

Example response

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Body>
      <ns1:queryResponse xmlns:ns1="http://api.zuora.com/">
         <ns1:result>
            <ns1:done>true</ns1:done>
            <ns1:queryLocator xsi:nil="1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
            <ns1:records xsi:type="ns2:InvoiceFile" xmlns:ns2="http://object.api.zuora.com/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
               <ns2:Id>402892014add19eb014add21e93a0030</ns2:Id>
               <ns2:InvoiceId>402892014add19eb014add21d0060022</ns2:InvoiceId>
               <ns2:PdfFileUrl>https://apisandbox.zuora.com/apps/api/file/402892014add19eb014add21e937002e</ns2:PdfFileUrl>
               <ns2:VersionNumber>1421049188930</ns2:VersionNumber>
            </ns1:records>
            <ns1:records xsi:type="ns2:InvoiceFile" xmlns:ns2="http://object.api.zuora.com/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
               <ns2:Id>402892014add2595014add2b76520013</ns2:Id>
               <ns2:InvoiceId>402892014add19eb014add21d0060022</ns2:InvoiceId>
               <ns2:PdfFileUrl>https://apisandbox.zuora.com/apps/api/file/402892014add2595014add2b764d0011</ns2:PdfFileUrl>
               <ns2:VersionNumber>1421049817776</ns2:VersionNumber>
            </ns1:records>
            <ns1:size>2</ns1:size>
         </ns1:result>
      </ns1:queryResponse>
   </soapenv:Body>
</soapenv:Envelope>