# Count BI View rows

Returns the number of rows in a BI View for a date range, limited to the organizations your role can access.
**Purpose:** Size an extraction before you start it, choose a page size, and reconcile the rows you loaded.
**Notes:**
- Counting a large view over a wide range can take a while; narrow the date range where you can.

Endpoint: GET /api/integration/v2/biviews/count/{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`.

## 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)
    The row count.

## Response 200 fields (application/json):

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

## Response 400:

  - `400` (unknown)
    A date is missing or invalid, the view name is unknown, or the 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)
    Unexpected server or database error. Retry later; if it persists, contact Zuora Support.

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

  - `Row count` (unknown)

## Response 400 examples:

  - `toDate missing` (unknown)

  - `Wrong date format` (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.

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

  - `Database error` (unknown)

## Response 502 examples:

  - `Query service error` (unknown)

