> ## Documentation Index
> Fetch the complete documentation index at: https://slovakapi.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Count financial statements

> Returns the number of remaining financial statement IDs.

Use this endpoint to estimate how many records a sync will process before starting. For example, you can use it to show a progress bar, build structured logs, or decide whether to run a full sync or a targeted one.

It accepts the same filters as [List financial statements](/ruz/api-reference/identifier-lists/list-financial-statements) and returns a single count. It is not required for pagination.

***

## Common patterns

<AccordionGroup>
  <Accordion title="Log the number of remaining records">
    Fetch the count before starting a sync to know how many records you'll process.

    ```js Counting financial statements theme={null}
    // 1. Fetch the count of remaining financial statements
    const { pocetZostavajucichId } = await fetch(
      `/api/zostavajuce-id/uctovne-zavierky?zmenene-od=2025-01-01`
    ).then(r => r.json());

    // 2. Log the number of remaining records
    console.log(`${pocetZostavajucichId} records to process`);
    ```
  </Accordion>
</AccordionGroup>


## OpenAPI

````yaml ruz/openapi.json GET /api/zostavajuce-id/uctovne-zavierky
openapi: 3.1.0
info:
  title: RÚZ API
  description: >-
    Public REST API for Slovakia's Register of Financial Statements (Register
    účtovných závierok). Exposes accounting units, financial statements,
    financial reports, and annual reports in JSON. Data is updated throughout
    the day as records are published.
  version: 2.5.0
  license:
    name: Creative Commons Zero (CC0)
    url: https://creativecommons.org/publicdomain/zero/1.0/
servers:
  - url: https://www.registeruz.sk/cruz-public
    description: Production
security: []
paths:
  /api/zostavajuce-id/uctovne-zavierky:
    get:
      summary: Count financial statements
      description: >-
        Returns the number of remaining financial statement IDs matching the
        given filters. Useful for progress tracking — not required for
        pagination.
      operationId: countRemainingFinancialStatements
      parameters:
        - $ref: '#/components/parameters/zmeneneOd'
        - $ref: '#/components/parameters/pokracuvatZaId'
      responses:
        '200':
          description: Remaining count returned successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RemainingCountResponse'
components:
  parameters:
    zmeneneOd:
      name: zmenene-od
      in: query
      required: true
      description: >-
        Return IDs changed on or after this date. Accepts `YYYY-MM-DD` or
        `YYYY-MM-DDThh:mm:ssZ`.
      schema:
        type: string
        example: '2000-01-01'
    pokracuvatZaId:
      name: pokracovat-za-id
      in: query
      description: Pagination cursor. Pass the last `id` from the previous response.
      schema:
        type: integer
  schemas:
    RemainingCountResponse:
      type: object
      description: Count of remaining IDs matching the given filters.
      properties:
        pocetZostavajucichId:
          type: integer
          description: Number of remaining IDs.

````