# Retrieve BI View data (v2, paged)

Returns one page of BI View rows for a date range as CSV or gzip-compressed CSV. Page 1 starts a background task that writes all pages; the response carries a `continuation-token` header that you send to read pages 2, 3 and so on. Use POST with a `Fields` body to return only selected columns.
**Purpose:** Extract large volumes of Zuora Revenue data (contracts, lines, schedules, bills, journal data) into a data warehouse or reconciliation process efficiently.
**Notes:**
- `fromDate` and `toDate` use `yyyy-MM-ddTHH:mm:ss` and filter on the view's incremental update date (`INCR_UPDT_DT`), so consecutive ranges give you incremental (changed-data) extracts.
- Request `pagenum=1` first without a `continuation-token`. For every later page, send the token from the page 1 response. Increase `pagenum` until the response is `404` ("This page will not exist"), which also tells you the total pages and rows.
- `pageSize` maximum: 10,000 rows for `csv` and 20,000 rows for `gzip` (your tenant may have lower limits).
- `pagenum=0` returns `204 No Content`.
- For `BI3_LINE_STAGE_HISTORY` and `BI3_EVENT_STAGE_HISTORY`, `fromDate` and `toDate` are optional when you filter by `batchId`. Always send `pagenum=1` (or higher); without it the response is `204`.
- A later page can return `400` "Page still not yet cached. Please retry." while the background task is still writing it. Wait a few seconds and retry; check the task with Get a BI View task if it keeps happening.
- The default `gzip` output is returned with content type `application/gzip`; `csv` with `text/csv`.
- Rows are limited to the organizations your role can access.

Endpoint: GET /api/integration/v2/biviews/{tmpl_name}
Version: 2026-11-02
Security: OneIdOAuth

## Security:

  - `OneIdOAuth` (unknown)
    oauth2

## Path parameters:

  - `tmpl_name` (string, required)
    BI View API name. Standard views: `BI3_ACCT_TYPE`, `BI3_APPR_DTL`, `BI3_BOOK`, `BI3_CALENDAR`, `BI3_MJE`, `BI3_ORG`, `BI3_PERIODS`, `BI3_RC_BILL`, `BI3_RC_HEAD`, `BI3_RC_LNS`, `BI3_RC_LN_COST`, `BI3_RC_POB`, `BI3_RC_SCHD`, `BI3_RC_SCHD_DEL`, `BI3_RI_ACCT_SUMM`, `BI3_LINE_STAGE_HISTORY`, `BI3_EVENT_STAGE_HISTORY`, `BI3_CT_MOD_DETAIL`, `BI3_RC_LNS_VERSION`, `BI3_POB_ACTIONS`, `BI3_RC_CT_MOD_DET`, `BI3_RC_HOLD`. Custom views configured for your tenant are also accepted.

## Query parameters:

  - `fromDate` (string, required)
    Start of the date range, `yyyy-MM-ddTHH:mm:ss`.

  - `toDate` (string, required)
    End of the date range, `yyyy-MM-ddTHH:mm:ss`.

  - `pagenum` (integer, required)
    Page to return, starting at 1.

  - `pageSize` (integer)
    Rows per page.

  - `outputType` (string)
    Response format: `gzip` (gzip-compressed CSV) or `csv`.

  - `max_pages` (integer)
    Maximum number of pages the background task prepares.

  - `add_record_count` (boolean)
    Send `true` to have the task count the rows first. Slower on large views. Omit the parameter to turn counting off: any non-empty value, including `false`, turns it on.

  - `batchId` (string)
    Batch identifier. Used only by `BI3_LINE_STAGE_HISTORY` and `BI3_EVENT_STAGE_HISTORY`, where it replaces the date range filter.

  - `clientId` (integer)
    Accepted for compatibility with v1. Not used by v2.

## Header parameters:

  - `continuation-token` (string)
    Task identifier returned in the `continuation-token` response header of page 1. Required for every page after the first.

  - `Zuora-Track-Id` (string)
    Optional correlation identifier (up to 64 characters) that you choose. The Zuora One gateway records it; quote it to Zuora Support when you report a problem.

## Response 200:

  - `200` (unknown)
    One page of rows. The `continuation-token` header identifies the background task; send it on the next page.

## Response 200 headers (text/csv):

  - `continuation-token` (string)
    Task identifier to send when requesting later pages.

## Response 204:

  - `204` (unknown)
    `pagenum` is 0. No body.

## Response 400:

  - `400` (unknown)
    A parameter is missing or invalid, a later page was requested without a `continuation-token`, `pageSize` is above the limit, a selected field does not exist, the view name is unknown, or the tenant's query quota is used up. Also returned when the database connection fails (retry with backoff).

## Response 400 fields (application/json):

  - `Status` (any)
    `Error` for most failures. Some BI View operations put the error text (or, for the v1 column list, the columns) here.
    Example: Error

  - `Message` (any)
    Human-readable error detail. A string on most errors; an object such as `{"Invalid_fields": [...]}` on field validation errors.
    Example: Invalid date format 2026-09-22 for createddate

  - `Result` (any)
    Additional error detail or `null`. Some BI View operations return the message text or the list of supported views here.

## Response 401:

  - `401` (unknown)
    The access token is missing, invalid or expired (gateway), or the OAuth client's user is not a Zuora Revenue user.

## Response 401 fields (application/json):

  - `message` (string)
    Description of the gateway error.
    Example: Authentication error

  - `Status` (any)
    `Error` for most failures. Some BI View operations put the error text (or, for the v1 column list, the columns) here.
    Example: Error

  - `Message` (any)
    Human-readable error detail. A string on most errors; an object such as `{"Invalid_fields": [...]}` on field validation errors.
    Example: Invalid date format 2026-09-22 for createddate

  - `Result` (any)
    Additional error detail or `null`. Some BI View operations return the message text or the list of supported views here.

## Response 403:

  - `403` (unknown)
    The request was rejected by the Integration service. Either the tenant is not enabled for this API, or the tenant requires custom request headers that were not sent.

## Response 403 fields (application/json):

  - `Status` (any)
    `Error` for most failures. Some BI View operations put the error text (or, for the v1 column list, the columns) here.
    Example: Error

  - `Message` (any)
    Human-readable error detail. A string on most errors; an object such as `{"Invalid_fields": [...]}` on field validation errors.
    Example: Invalid date format 2026-09-22 for createddate

  - `Result` (any)
    Additional error detail or `null`. Some BI View operations return the message text or the list of supported views here.

## Response 404:

  - `404` (unknown)
    The requested page is beyond the last page. `Result` gives the total pages and rows. Stop paging.

## Response 404 fields (application/json):

  - `Status` (any)
    `Error` for most failures. Some BI View operations put the error text (or, for the v1 column list, the columns) here.
    Example: Error

  - `Message` (any)
    Human-readable error detail. A string on most errors; an object such as `{"Invalid_fields": [...]}` on field validation errors.
    Example: Invalid date format 2026-09-22 for createddate

  - `Result` (any)
    Additional error detail or `null`. Some BI View operations return the message text or the list of supported views here.

## Response 429:

  - `429` (unknown)
    Too many requests. Wait for the time in the `Retry-After` header, then retry with backoff.

## Response 429 fields (application/json):

  - `message` (string)
    Description of the gateway error.
    Example: Authentication error

## Response 429 headers (application/json):

  - `Retry-After` (string)
    Seconds to wait before retrying.

## Response 500:

  - `500` (unknown)
    The background worker was interrupted, or an unexpected error occurred. Retry page 1.

## Response 500 fields (application/json):

  - `Status` (any)
    `Error` for most failures. Some BI View operations put the error text (or, for the v1 column list, the columns) here.
    Example: Error

  - `Message` (any)
    Human-readable error detail. A string on most errors; an object such as `{"Invalid_fields": [...]}` on field validation errors.
    Example: Invalid date format 2026-09-22 for createddate

  - `Result` (any)
    Additional error detail or `null`. Some BI View operations return the message text or the list of supported views here.

## Response 500 headers (application/json):

  - `continuation-token` (string)
    Task identifier of the interrupted task.

## Response 502:

  - `502` (unknown)
    An internal query service did not respond correctly. Retry later.

## Response 502 fields (application/json):

  - `Status` (any)
    `Error` for most failures. Some BI View operations put the error text (or, for the v1 column list, the columns) here.
    Example: Error

  - `Message` (any)
    Human-readable error detail. A string on most errors; an object such as `{"Invalid_fields": [...]}` on field validation errors.
    Example: Invalid date format 2026-09-22 for createddate

  - `Result` (any)
    Additional error detail or `null`. Some BI View operations return the message text or the list of supported views here.

## Response 200 examples:

  - `Page 1 as CSV (outputType=csv)` (unknown)

  - `Page 1 as gzip (default outputType)` (unknown)

## Response 400 examples:

  - `fromDate missing` (unknown)

  - `Wrong date format` (unknown)

  - `continuation-token missing for page 2` (unknown)

  - `pageSize too large` (unknown)

  - `Unknown column in Fields` (unknown)

  - `Unknown BI View name` (unknown)
    The message lists the requested name and the views supported for the tenant. Correct the name using the list in the `tmpl_name` description.

  - `Later page not ready yet` (unknown)

  - `Query quota reached` (unknown)
    Wait for running tasks to finish (see List BI View tasks) or cancel tasks you no longer need.

  - `Database connection failed` (unknown)
    Temporary. Retry with backoff.

## Response 401 examples:

  - `Expired or missing token` (unknown)

  - `User of the OAuth client not found in Zuora Revenue` (unknown)
    The OAuth client's Zuora user has no matching Zuora Revenue user. Map the user in Zuora Revenue.

## Response 403 examples:

  - `API not enabled for the tenant` (unknown)

  - `Required custom headers missing` (unknown)

## Response 404 examples:

  - `Past the last page` (unknown)

## Response 429 examples:

  - `Rate limit exceeded` (unknown)

## Response 500 examples:

  - `Worker lost` (unknown)

## Response 502 examples:

  - `Query service error` (unknown)

