Skip to content

CRUD: Retrieve an invoice

Request

Path
idstringrequired

Object id

Query
fieldsstring

Object fields to return

Headers
Accept-Encodingstring

Include the Accept-Encoding: gzip header to compress responses as a gzipped file. It can significantly reduce the bandwidth required for a response.

If specified, Zuora automatically compresses responses that contain over 1000 bytes of data, and the response contains a Content-Encoding header with the compression algorithm so that your client can decompress it.

Content-Encodingstring

Include the Content-Encoding: gzip header to compress a request. With this header specified, you should upload a gzipped file for the request payload instead of sending the JSON payload.

Authorizationstring

The value is in the Bearer {token} format where {token} is a valid OAuth token generated by calling Create an OAuth token.

Zuora-Entity-Idsstring

An entity ID. If you have Zuora Multi-entity enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header.

Zuora-Track-Idstring, <= 64 characters

A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue.

The value of this field must use the US-ASCII character set and must not include any of the following characters: colon (:), semicolon (;), double quote ("), and quote (').

X-Zuora-WSDL-Versionstring

Zuora WSDL version number.

Default:79
cURL
curl -i -X GET \
  'https://rest.zuora.com/v1/object/invoice/{id}?fields=string' \
  -H 'Accept-Encoding: string' \
  -H 'Authorization: string' \
  -H 'Content-Encoding: string' \
  -H 'X-Zuora-WSDL-Version: 79' \
  -H 'Zuora-Entity-Ids: string' \
  -H 'Zuora-Track-Id: string'

Responses

Headers
Content-Encodingstring

This header is returned if you specify the Accept-Encoding: gzip request header and the response contains over 1000 bytes of data.

Note that only the following MIME types support gzipped responses:

  • application/json
  • application/xml
  • text/html
  • text/csv
  • text/plain
RateLimit-Limitstring

The request limit quota for the time window closest to exhaustion. See rate limits for more information.

RateLimit-Remainingnumber

The number of requests remaining in the time window closest to quota exhaustion. See rate limits for more information.

RateLimit-Resetnumber

The number of seconds until the quota resets for the time window closest to quota exhaustion. See rate limits for more information.

Zuora-Request-Idstring, = 36 characters

The Zuora internal identifier of the API call. You cannot control the value of this header.

Zuora-Track-Idstring, <= 64 characters

A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.

Bodyapplication/json
Idstring

Object identifier.

AccountIdstring
AdjustmentAmountnumber, (double)

The amount of the invoice adjustments associated with the invoice. Character limit: 16 Values: a valid currency amount

Amountnumber, (double)

The sum of all charges and taxes associated with the invoice.

Character limit: 16 Values: automatically generated

AmountWithoutTaxnumber, (double)

The sum of all charges associated with the invoice. Taxes are excluded from this value.

Character limit: 16 Values: automatically generated

Balancenumber, (double)

The remaining balance of the invoice after all payments, adjustments, and refunds are applied.

Character limit: 16 Values: automatically generated

BillToContactIdstring

The ID of bill-to contact associated with the invoice.

Note: This field is available only if you set the X-Zuora-WSDL-Version request header to 118 or later. The value of this field is null if you have the Flexible Billing Attributes feature disabled.

Bodystring

Required

Commentsstring

Additional information related to the invoice that a Zuora user added to the invoice.

Character limit: 255 Values: a string of 255 characters or fewer

CreatedByIdstring

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

Character limit: 32 Values: automatically generated

CreatedDatestring, (date-time)

The date when the invoice was generated.

Character limit: 29 Values: automatically generated

CreditBalanceAdjustmentAmountnumber, (double)

The currency amount of the adjustment applied to the customer's credit balance.

Character limit: 16 Values: a valid currency amount This field is only available if the Zuora Global Support to enable this feature.

CreditMemoAmountnumber, (double)

The currency amount of all credit memos applied to this invoice.

Note: This field is only available if you have Invoice Settlement enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see Invoice Settlement Enablement and Checklist Guide for more information.

DueDatestring, (date)

The date by which the payment for this invoice is due.

Character limit: 29 Version notes: --

IncludesOneTimeboolean

Whether the bill run picks up all one-time charges for processing. You can use this field only with the Generate call for the Invoice object.

Default:true
IncludesRecurringboolean

Whether the bill run picks up all recurring charges for processing. You can use this field only with the Generate call for the Invoice object.

Default:true
IncludesUsageboolean

Whether the bill run picks up all usage charges for processing. You can use this field only with the Generate call for the Invoice object.

Default:true
InvoiceDatestring, (date)

Specifies the date on which to generate the invoice.

Character limit: 29 Version notes: --

InvoiceNumberstring

The unique identification number for the invoice. This number is returned as a string.

Character limit: 32 Values: automatically generated

LastEmailSentDatestring, (date-time)

The date when the invoice was last emailed.

Character limit: 29 Values: automatically generated

PaymentAmountnumber, (double)

The amount of payments applied to the invoice.

Character limit: 16 Values: automatically generated

PaymentTermstring

The name of payment term associated with the invoice.

Note:

  • This field is available only if you set the X-Zuora-WSDL-Version request header to 118 or later.
  • If you have the Flexible Billing Attributes feature disabled, this field is unavailable in the request body and the value of this field is null in the response body.
  • If you have the Flexible Billing Attributes feature enabled, and you do not specify this field in the request or you select Default Term from Account for this field during subscription creation, the value of this field is automatically set to null in the response body.
PostedBystring

The user ID of the person who moved the invoice to Posted status.

Character limit: 32 Values: automatically generated

PostedDatestring, (date-time)

The date when the invoice was posted.

Character limit: 29 Values: automatically generated

RefundAmountnumber, (double)

Specifies the amount of a refund that was applied against an earlier payment on the invoice.

Character limit: 16 Values: automatically generated

SequenceSetIdstring

The ID of the sequence set associated with the invoice.

Note: This field is available only if you set the X-Zuora-WSDL-Version request header to 127 or later. The value of this field is null if you have the Flexible Billing Attributes feature disabled.

Statusstring

The status of the invoice in the system. This status is not the status of the payment of the invoice, just the status of the invoice itself.

Character limit: 8 Values: one of the following:

  • Draft (default, automatically set upon invoice creation)

  • Posted

  • Canceled

SourceTypestring

The type of the invoice source. Note: To use this field, you must set the X-Zuora-WSDL-Version request header to 118 or later. Otherwise, an error occurs. Character limit: 16 Values: one of the following enum values:

  • Subscription

  • Standalone

  • Order

  • Consolidation

TargetDatestring, (date)

This date is used to determine which charges are to be billed. All charges that are to be billed on this date or prior will be included in this bill run.

Character limit: 29 Version notes: --

TaxAmountnumber, (double)

The total amount of the taxes applied to the invoice.

Character limit: 16 Values: automatically generated

TaxExemptAmountnumber, (double)

The total amount of the invoice that is exempt from taxation.

Character limit: 16 Values: automatically generated

TransferredToAccountingstring

Specifies whether or not the invoice was transferred to an external accounting system, such as NetSuite.

Character limit: 10 Values: Processing, Yes, Error, Ignore

UpdatedByIdstring
UpdatedDatestring, (date-time)

The date when the invoice was last updated.

Character limit: 29 Values: automatically generated

IntegrationId__NSstring, <= 255 characters

ID of the corresponding object in NetSuite. Only available if you have installed the Zuora Connector for NetSuite.

IntegrationStatus__NSstring, <= 255 characters

Status of the invoice's synchronization with NetSuite. Only available if you have installed the Zuora Connector for NetSuite.

SyncDate__NSstring, <= 255 characters

Date when the invoice was synchronized with NetSuite. Only available if you have installed the Zuora Connector for NetSuite.

<property name>anyadditional property

Custom fields of the Invoice object. The name of each custom field has the form customField__c. Custom field names are case sensitive. See Manage Custom Fields for more information.

Response
{ "InvoiceDate": "2011-01-10", "TaxExemptAmount": 0, "UpdatedDate": "2016-10-20T05:45:45.000+02:00", "CreditBalanceAdjustmentAmount": 0, "Status": "Posted", "TargetDate": "2016-10-20", "BillToContactId": "2c93808457d787030157e031bb3f43f8", "PaymentTerm": "Net 30", "AccountId": "2c93808457d787030157e031d2704c28", "IncludesOneTime": true, "InvoiceNumber": "INV00000002", "UpdatedById": "2c93808457d787030157e031bb3f4aa5", "PaymentAmount": 0, "Id": "2c93808457d787030157e031d86c4c57", "TaxAmount": 0, "IncludesUsage": true, "CreatedById": "2c93808457d787030157e031bb3f4aa5", "CreatedDate": "2016-10-20T05:45:45.000+02:00", "Body": "JVBERi0xLjUNCjQg......QNCiUlRU9GDQo=", "PostedDate": "2016-10-20T05:45:45.000+02:00", "Amount": 23.92, "Balance": 23.92, "RefundAmount": 0, "AmountWithoutTax": 23.92, "AdjustmentAmount": 0, "PostedBy": "2c93808457d787030157e031bb3f4aa5", "DueDate": "2011-01-10", "IncludesRecurring": true, "SourceType": "Subscription", "SequenceSetId": "2c93808457d787030157e031bb3f4ab1", "CreditMemoAmount": 0 }