Skip to content

CRUD: Retrieve a bill run

Request

Retrieves information about a bill run.

Business operations depending on the completion of the bill run will not be available while the bill run query returns PostInProgress. Upon completion of the bill run, a query will return Posted.

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/bill-run/{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

ID of the object.

Character limit: 32

Values: automatically generated

AutoEmailboolean

Determines whether to auto send email or not once the bill run completes.

Note: You must enable the Support Bill Run Auto-Post Billing rule to pass this field.

AutoPostboolean

Determines whether to auto post bill run or not once the bill run completes.

Note: You must enable the Support Bill Run Auto-Post Billing rule to pass this field.

AutoRenewalboolean

Determines whether to auto renew subscription or not by this bill run once the bill run completes.

Batchstring

Batch of accounts for this bill run.

Character limit: 20

Values: AllBatches or Batchn where n is a number between 1 and 50.

Batchesstring

The specific batches of customer accounts to be included in the bill run.

Note: To use this field, you must set the X-Zuora-WSDL-Version request header to 102 or later. Otherwise, an error occurs.

Character limit: 20

Values: AllBatches, Batchn or an array of Batchn where n is a number between 1 and 50

BillCycleDaystring

The day of the bill cycle.

Character limit: 32

Values: AllBillCycleDays or 01 - 31.

BillRunNumberstring

Number of the bill run.

Character limit: 50

Values: automatically generated

CreatedByIdstring

The user ID of the person who created the bill run.

Character limit: 32

Values: automatically generated

CreatedDatestring, (date-time)

The date and time when the bill run was created.

Character limit: 29

Values: automatically generated

NoEmailForZeroAmountInvoiceboolean

Determines whether to suppress email for invoices with zero total or not for this bill run once the bill run completes. (Do not email invoices with 0 Invoice Total).

ExecutedDatestring, (date-time)

The date and time when the bill run was executed.

InvoiceDatestring, (date)

Invoice date for this bill run.

Character limit: 29

InvoicesEmailedboolean

Indicates whether the invoice has been sent or not.

Values: automatically generated

LastEmailSentTimestring, (date-time)

The last time emails were sent for this bill run.

Character limit: 29

Values: automatically generated

NumberOfAccountsinteger, (int64)

The number of accounts processed by this bill run.

Values: automatically generated

NumberOfInvoicesinteger, (int64)

The number of invoices generated by this run.

Values: automatically generated

AccountIdstring

ID of the account used for single account bill run.

Character limit: 32

Statusstring

The status for this bill run. See Status Types for more information.

Enum:"Pending""Processing""Completed""Error""Canceled""Posted""PostInProgress""CancelInProgress""RemoveInProgress""Paused"
TargetDatestring, (date)

Target date for this bill run. See Create Bill Run for more information.

Character limit: 29

UpdatedByIdstring

The user ID of the person who last updated the bill run.

Character limit: 32

Values: automatically generated

UpdatedDatestring, (date-time)

The date and time when the bill run was last updated.

Character limit: 29

Values: automatically generated

Response
{ "AutoRenewal": false, "InvoiceDate": "2017-02-01", "Id": "2c92c09459d949220159f79d592f7e1a", "NumberOfInvoices": 1, "UpdatedDate": "2017-02-01T19:00:00.000-08:00", "BillCycleDay": "AllBillCycleDays", "AutoEmail": false, "AutoPost": false, "NoEmailForZeroAmountInvoice": false, "NumberOfAccounts": 1, "BillRunNumber": "BR-00002572", "Status": "Completed", "CreatedDate": "2017-01-31T19:00:01.000-08:00", "CreatedById": "2c92c0f956bc8fcb0156f8eee04b4d54", "UpdatedById": "2c92c0f956bc8fcb0156f8eee04b4d54", "ExecutedDate": "2017-02-01T19:00:00.000-08:00", "Batch": "Batch1", "InvoicesEmailed": false, "TargetDate": "2017-02-20" }