# Retrieve BI View data (v1)

Returns BI View rows as CSV, one page per call, for a date range. Without a date range it returns the view's columns; with `count=true` it returns the row count; with `format=csv` and no dates it returns only the CSV header row. Use POST with a `Fields` body to select columns.
**Purpose:** Existing integrations built on v1. New integrations should use the v2 operations, which handle large volumes better.
**Notes:**
- `clientId` is required and must match the client of your user (usually `1`).
- `fromDate` and `toDate` use `yyyy-MM-ddTHH:mm:ss`; `toDate` must be later than `fromDate`.
- Pages start at 1. Increase `pagenum` until the response is `204`.
- `pagesize` (lowercase) accepts 1 to 10,000; other values fall back to 1,000.
- When `Fields` are selected, the response headers `pagenum` (next page) and `record_count` (rows in this page) are added.
- CSV rows are returned with content type `text/html`; read the body as CSV text.

Endpoint: GET /api/integration/v1/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:

  - `clientId` (integer, required)
    Zuora Revenue client ID of your user.

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

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

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

  - `pagesize` (integer)
    Rows per page, 1 to 10,000.

  - `count` (boolean)
    When `true` (with `fromDate` and `toDate`), return the row count instead of rows.

  - `format` (string)
    With `csv` and no dates, return only the CSV header row.

## Header parameters:

  - `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)
    CSV rows (`text/csv`), or JSON with the row count (`count=true`) or the column list (no dates; the columns are returned in `Status`).

## Response 200 fields (application/json):

  - `Status` (string)
    `Success` when the count was computed.
    Example: Success

  - `Result` (object)
    The count.

  - `Result.count` (integer)
    Number of rows in the view for the requested date range, limited to the organizations the caller can access.
    Example: 25430

  - `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 204:

  - `204` (unknown)
    No rows for the criteria, or past the last page. No body.

## Response 400:

  - `400` (unknown)
    The view name is unknown, `clientId` is missing or wrong, a date is invalid or out of order, the POST body is not JSON, a selected field does not exist, or the row count failed. 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 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)
    Column information for the CSV header could not be read.

## 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 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:

  - `CSV rows` (unknown)

  - `Row count (count=true)` (unknown)

  - `Columns (no dates)` (unknown)

## Response 400 examples:

  - `Unknown view` (unknown)

  - `clientId invalid` (unknown)

  - `toDate before fromDate` (unknown)

  - `Wrong date format` (unknown)

  - `POST body not JSON` (unknown)

  - `Unknown column` (unknown)

  - `Row count failed` (unknown)

  - `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 429 examples:

  - `Rate limit exceeded` (unknown)

## Response 500 examples:

  - `Metadata error` (unknown)

## Response 502 examples:

  - `Query service error` (unknown)

