---
title: "Retrieve a billing preview run"
method: GET
path: "/v1/billing-preview-runs/{billingPreviewRunId}"
tags: ["Billing Preview Run"]
---

# Retrieve a billing preview run

`GET /v1/billing-preview-runs/{billingPreviewRunId}`

Retrieves a preview of future invoice items for multiple customer accounts through a billing preview run. If you have the Invoice Settlement feature enabled,  you can also retrieve a preview of future credit memo items. 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](https://docs.zuora.com?resourceId=billing-invoice-settlement-migration-checklist-and-guide) for more information. 

A billing preview run asynchronously generates a downloadable CSV file containing a preview of invoice item data and credit memo item data for a batch of customer accounts. Note that if you set `storageOption` to `Database`, no CSV file is generate; instead, you can have a record in the billing preview result. You can use data source to query <a href="https://docs.zuora.com?resourceId=platform-billing-preview-run-result-data-source" target="_blank">Billing Preview Run Result</a>.

## Path parameters

- `billingPreviewRunId` string, required

## Headers

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

## Response `200`

OK

- GetBillingPreviewRunResponse — get billingPreviewRun response
  - `assumeRenewal` string
  - `batches` string — The customer batches included in the billing preview run. **Note**: This field is available only if you are on the latest Zuora API minor version, or you set the `Zuora-Version` request header to `314.0` or [a later available version](https://developer.zuora.com/v1-api-reference/api-versions/#minor-version).
  - `chargeTypeToExclude` string — The charge types excluded from the forecast run.
  - `createdById` string — The ID of the user who created the billing preview run.
  - `createdDate` string — The date and time when the billing preview run was created.
  - `endDate` string — The date and time when the billing preview run completes.
  - `errorMessage` string, nullable — The error message generated by a failed billing preview run.
  - `includingDraftItems` boolean — Whether draft document items are included in the billing preview run. By default, draft document items are not included.
  - `includingEvergreenSubscription` boolean — Indicates if evergreen subscriptions are included in the billing preview run.
  - `organizationLabels` object[] — The organization(s) that the object belongs to. Note: This field is available only when the Multi-Org feature is enabled.
    - `organizationId` string — The organization ID.
    - `organizationName` string — The organization name.
  - `resultFileUrl` string — The URL of the zipped CSV result file generated by the billing preview run. This file contains the preview invoice item data and credit memo item data for the specified customers. If the value of `storageOption` field is `Database`, the returned `resultFileUrl` field is null. **Note:** The credit memo item data is only available if you have Invoice Settlement feature 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](https://docs.zuora.com?resourceId=billing-invoice-settlement-migration-checklist-and-guide) for more information.
  - `runNumber` string — The run number of the billing preview run.
  - `startDate` string, datetime — The date and time when the billing preview run starts.
  - `status` string — The status of the >billing preview run. **Possible values:** * 0: Pending * 1: Processing * 2: Completed * 3: Error * 4: Canceled
  - `storageOption` 'Csv' | 'Database' — The saving options. The default value is `Csv`.
  - `succeededAccounts` integer — The number of accounts for which preview invoice item data and credit memo item data was successfully generated during the billing preview run. **Note:** The credit memo item data is only available if you have Invoice Settlement feature 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](https://docs.zuora.com?resourceId=billing-invoice-settlement-migration-checklist-and-guide) for more information.
  - `success` boolean — Returns `true` if the request was processed successfully.
  - `targetDate` string, date — The target date for the billing preview run.
  - `totalAccounts` integer — The total number of accounts in the billing preview run.
  - `updatedById` string — The ID of the user who last updated the billing preview run.
  - `updatedDate` string — The date and time when the billing preview run was last updated.

## Other responses

- `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)
