> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.taigabilling.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.taigabilling.com/_mcp/server.

# Pre Encounter Appointments V 1 Get Counts

GET https://api.taigabilling.com/appointments/v1/visits/counts

Gets aggregate counts for the visits matching the given filters.

The counts respect all provided filters but are independent of pagination, so this can be fetched
once when filters change instead of on every page of `get_visits`.

**IMPORTANT:** Like `get_visits`, this endpoint requires a date filter on `appointment.startTimestamp`
to ensure acceptable query performance.

Reference: https://docs.taigabilling.com/api-reference/pre-encounter-appointments-v-1/pre-encounter-appointments-v-1-get-counts

## Authentication

- `Authorization` header (bearer token, required) — Send your Taiga API key as a Bearer token. Create and manage keys in the Taiga developer portal.

## Servers

- `https://api.taigabilling.com` (Production, default)
- `https://api-staging.taigabilling.com` (Staging)

## Request

### Query parameters

- `filters` (string, optional) — **Required:** Must include a date filter on appointment.startTimestamp (using gt, lt, or eq operators). Example: appointment.startTimestamp|gt|2024-01-01

## Response

### 200

- `not_ready_reason_counts` (map from string to integer, optional, nullable)

## Errors

### 400 Bad Request Error

- `PreEncounter_appointments_v1_get_countsRequestBadRequestError`
  - PreEncounterAppointmentsV1GetCountsRequestBadRequestError0

## Types

### PreEncounterAppointmentsV1GetCountsRequestBadRequestError0

- `errorName` (enum, optional)
  - Allowed values: `BadRequestError`
- `content` (pre-encounterErrorBase4xx, optional)

### pre-encounterErrorBase4xx

- `message` (string, required)
- `data` (any, optional, nullable)

## Examples

**Response**

```json
{
  "not_ready_reason_counts": {}
}
```

**SDK Code**

```python
import requests

url = "https://api.taigabilling.com/appointments/v1/visits/counts"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```