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

# Client

> A studio client with balances, compensations, and booking history.

Clients are returned only by [`GET /v1/clients`](/api/v1/reference/clients/list-clients),
which requires your [secret API key](/api/authentication#secret-api-key). The
response contains personal data — treat it accordingly.

Only active clients are returned. Archived and blocked clients are excluded.

## Two IDs

A client carries both. They are not interchangeable:

* `id` is the **numeric** client ID. This is what the credit and pass endpoints
  expect as `clientId`.
* `_id` is the opaque ID used elsewhere in Zenamu.

<Warning>
  Always send `id`, never `_id`, when granting credits or passes. See
  [IDs](/api#ids).
</Warning>

## Credit balance

`bundles.credits` reports the current balance and its expiry:

```json theme={null}
{ "numberOfCredits": 500, "validToDate": "2027-01-05" }
```

`validToDate` is `null` when the client holds no credits.

## Entry pass balances

Read `passBalances`. It breaks the client's active, non-expired entries down
**per [pass group](/api/objects/pass-group)**:

```json theme={null}
[
  {
    "passGroupId": 1,
    "passGroupName": "10-entry pass",
    "numberOfEntries": 8,
    "numberOfBlockedEntries": 0,
    "validTo": "2027-01-05"
  }
]
```

`numberOfEntries` is the balance recorded on the group.
`numberOfBlockedEntries` counts entries tied up by a pending waitlist
reservation, and is released when that reservation resolves.
`passGroupName` is `null` for a studio's original default group. The array is
empty when the client holds no active entries.

<Note>
  If you show a single “entries left” number, mirror what Zenamu's own
  reporting uses: `max(0, numberOfEntries - numberOfBlockedEntries)`.
</Note>

<Warning>
  `bundles.entries` is **deprecated**. It sums entries across every pass group
  and reports the latest expiry across them, which hides the breakdown as soon
  as a studio has more than one group. Summing `passBalances[].numberOfEntries`
  reproduces it exactly. Use `passBalances`.
</Warning>

## Make-up sessions

`makeupSessions` lists compensations the client can still redeem, each as a
`validTo` date. An empty array means none. Studios that do not use the
compensation feature always return an empty array.

## Bookings

`bookings.totalBookingsCompleted` sums the client's completed classes and past
workshops in this studio. A class counts once its reservation is marked
completed; a workshop counts once its date has passed and its order is paid or
awaiting payment. Canceled reservations do not count.

`bookings.lastBookingCompletedDate` is the later of the client's last such class
and last such workshop, or `null` when there is none.

## Consent and personal fields

`marketingConsent` is `1` when the client agreed to receive the studio's
newsletters, `0` otherwise. Respect it — it is the studio's legal basis for
contacting them.

`clientBirthNumber` is a national identification number and is `null` unless the
studio collects it. `registrationDate` is when the account was created, or when
the first order was placed for a client who never set a password.
