# Preview an account Generates a preview of future invoice and credit memo items for a customer account. Previewing a customer account shows you how much a single customer will be invoiced from the most recent invoice to a specific end of term date in the future. Previewing a customer account only calculates taxes for charges if you use Zuora Tax and the price associated with the invoice item is tax inclusive; otherwise, it does not calculate taxes. Endpoint: POST /accounts/{account_id}/preview Version: 2025-11-12 Security: bearerAuth ## Path parameters: - `account_id` (string, required) Identifier for the account, either account_number or account_id ## Header parameters: - `zuora-track-id` (string) A custom identifier for tracking API requests. If you set a value for this header, Zuora returns the same value in the response header. This header enables you to track your 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 ("), or quote ('). - `async` (boolean) Making asynchronous requests allows you to scale your applications more efficiently by leveraging Zuora's infrastructure to enqueue and execute requests for you without blocking. These requests also use built-in retry semantics, which makes them much less likely to fail for non-deterministic reasons, even in extreme high-throughput scenarios. Meanwhile, when you send a request to one of these endpoints, you can expect to receive a response in less than 150 milliseconds and these calls are unlikely to trigger rate limit errors. If set to true, Zuora returns a 202 Accepted response, and the response body contains only a request ID. - `zuora-entity-ids` (string) An entity ID. If you have Multi-entity enabled and the authorization token is valid for more than one entity, you must use this header to specify which entity to perform the operation on. If the authorization token is only valid for a single entity or you do not have Multi-entity enabled, you do not need to set this header. - `idempotency-key` (string) Specify a unique idempotency key if you want to perform an idempotent POST or PATCH request. Do not use this header in other request types. This idempotency key should be a unique value, and the Zuora server identifies subsequent retries of the same request using this value. For more information, see Idempotent Requests. - `accept-encoding` (string) Include a accept-encoding: gzip header to compress responses, which can reduce the bandwidth required for a response. If specified, Zuora automatically compresses responses that contain over 1000 bytes. For more information about this header, see Request and Response Compression. - `content-encoding` (string) Include a content-encoding: gzip header to compress a request. Upload a gzipped file for the payload if you specify this header. For more information, see Request and Response Compression. ## Request fields (application/json): - `exclude` (string) Any combination of one-time, recurring, and usage. Enum: "one_time", "recurring", "usage" - `include_draft_items` (boolean) Indicates whether to include items in the draft status. - `include_evergreen_subscriptions` (boolean) Indicates whether to include evergreen subscriptions. - `target_date` (string, required) The target date is used to determine which charges to bill. All unbilled charges as of or prior to the target date are included. Zuora automatically keeps track of all charges that need to be billed and that have not been billed prior to the target date. Example: "2022-01-01" ## Response 200 fields (application/json): - `account_id` (string) The unique identifier of the customer account associated with these items. - `credit_memo_items` (array) - `credit_memo_items.amount` (number) The total amount of this credit memo item. - `credit_memo_items.subtotal` (number) The total amount of this credit memo item exclusive of tax. - `credit_memo_items.applied_to_item_id` (string) Identifier of an invoice item that this credit memo item is applied to. - `credit_memo_items.document_item_date` (string) The date when the credit memo item takes effect. Example: "2022-01-01T07:08:12-07:00" - `credit_memo_items.document_item_number` (string) - `credit_memo_items.charge_type` (string) Type of the charge. It can be one of the following types: one-time, recurring, or usage. - `credit_memo_items.description` (string) An arbitrary string associated with the object. Often useful for displaying to users. - `credit_memo_items.id` (string) Unique identifier of the object - `credit_memo_items.processing_type` (string) Enum: "subscription_item", "discount", "prepayment", "tax" - `credit_memo_items.quantity` (number) The number of units of this item. - `credit_memo_items.subscription_item_id` (string) The identifier the subscription item associated with this credit memo item. - `credit_memo_items.service_start_date` (string) The start date of the service period associated with this credit memo item. If the associated charge is a one-time fee, then this date is the date of that charge. - `credit_memo_items.service_end_date` (string) The end date of the service period associated with this credit memo item. If the associated charge is a one-time fee, then this date is the date of that charge. - `credit_memo_items.sku` (string) The unique SKU (stock keeping unit) of the product associated with this item. - `credit_memo_items.sku_name` (string) The name of the SKU associated with this item - `credit_memo_items.subscription_id` (string) The identifier of the subscription associated with the credit memo item. - `credit_memo_items.subscription_number` (string) Human-readable identifier of the subscription. It can be user-supplied. - `credit_memo_items.unit_of_measure` (string) Specifies the units used to measure usage. - `invoice_items` (array) - `invoice_items.amount` (number) The total amount of this invoice item. - `invoice_items.applied_to_item_id` (string) Identifier of an invoice item or a debit memo item that this discount item or credit memo item is applied to. - `invoice_items.document_date` (string) Example: "2022-01-01" - `invoice_items.subscription_item_description` (string) - `invoice_items.subscription_item_id` (string) The identifier the subscription item associated with this invoice item. - `invoice_items.subscription_item_name` (string) - `invoice_items.subscription_item_number` (string) Human-readable identifier of the subscription item. It can be user-supplied. - `invoice_items.product_name` (string) - `invoice_items.service_start_date` (string) The start date of the service period associated with this invoice item. If the associated charge is a one-time fee, then this date is the date of that charge. - `invoice_items.service_end_date` (string) The end date of the service period associated with this invoice item. If the associated charge is a one-time fee, then this date is the date of that charge. - `invoice_items.subscription_id` (string) The identifier of the subscription associated with the invoice item. - `invoice_items.subscription_number` (string) The subscription number of the subscription associated with this item. - `invoice_items.subscription_name` (string) The name of the subscription associated with this item. - `invoice_items.tax` (number) The amount of tax applied to the invoice item. ## Response 400 fields (application/json): - `type` (string) - `errors` (array) - `errors.code` (string) - `errors.parameter` (string) - `errors.message` (string) - `retryable` (boolean) ## Response 401 fields (application/json): - `type` (string) - `errors` (array) - `errors.code` (string) - `errors.parameter` (string) - `errors.message` (string) - `retryable` (boolean) ## Response 404 fields (application/json): - `type` (string) - `errors` (array) - `errors.code` (string) - `errors.parameter` (string) - `errors.message` (string) - `retryable` (boolean) ## Response 405 fields (application/json): - `type` (string) - `errors` (array) - `errors.code` (string) - `errors.parameter` (string) - `errors.message` (string) - `retryable` (boolean) ## Response 429 fields (application/json): - `type` (string) - `errors` (array) - `errors.code` (string) - `errors.parameter` (string) - `errors.message` (string) - `retryable` (boolean) ## Response 500 fields (application/json): - `type` (string) - `errors` (array) - `errors.code` (string) - `errors.parameter` (string) - `errors.message` (string) - `retryable` (boolean) ## Response 502 fields (application/json): - `type` (string) - `errors` (array) - `errors.code` (string) - `errors.parameter` (string) - `errors.message` (string) - `retryable` (boolean) ## Response 503 fields (application/json): - `type` (string) - `errors` (array) - `errors.code` (string) - `errors.parameter` (string) - `errors.message` (string) - `retryable` (boolean) ## Response 504 fields (application/json): - `type` (string) - `errors` (array) - `errors.code` (string) - `errors.parameter` (string) - `errors.message` (string) - `retryable` (boolean)