# Wait list clients

Wait list record clients are CRM contacts and companies waiting for a free time slot. The methods in this subsection read the record's clients, replace their whole set, and remove all clients in one call.

Bitrix24 API: `booking.v1.waitList.client.list`, `booking.v1.waitList.client.set`, `booking.v1.waitList.client.unset`
Scope: `booking`

## Operations

- [List clients of a wait list record](./clients-list.md) — `GET /v1/booking-wait-list/:id/clients`
- [Replace clients of a wait list record](./clients-set.md) — `PUT /v1/booking-wait-list/:id/clients`
- [Remove clients from a wait list record](./clients-delete.md) — `DELETE /v1/booking-wait-list/:id/clients`

## Key fields

Fields of a single client. They are returned in every response item of all three methods and passed in the body of the replace request.

| Field | Description |
|------|----------|
| `id` | CRM contact or company ID. Lists: [`GET /v1/contacts`](/docs/entities/contacts/list), [`GET /v1/companies`](/docs/entities/companies/list) |
| `type.module` | Client type module: `crm` |
| `type.code` | Client type code: `CONTACT` — contact, `COMPANY` — company. Dictionary: [`GET /v1/booking-client-types`](/docs/entities/booking-client-types) |

## What to know before you start

1. **The client type comes from the dictionary.** Take the `type.module` and `type.code` pair from [`GET /v1/booking-client-types`](/docs/entities/booking-client-types). A pair that is not in the dictionary is rejected with `400 INVALID_PARAMS` before writing.
2. **Replace, not add.** Replacement writes the set you pass in full: clients missing from the request are removed from the record. An empty `clients` array removes all of them.
3. **Clients are checked before writing.** A nonexistent contact or company returns `404 ENTITY_NOT_FOUND`, and the record's clients stay unchanged.
4. **A write returns the re-read list.** After writing, replacement and removal read the wait list record's clients again and return them.
5. **A read-only key can read clients.** Replacement and removal with such a key return `403 WRITE_BLOCKED_READONLY_KEY`.

## Typical scenario

1. Find a wait list record: [`GET /v1/booking-wait-list`](/docs/entities/booking-wait-list/list), or create a new one: [`POST /v1/booking-wait-list`](/docs/entities/booking-wait-list/create).
2. Find a contact or company: [`GET /v1/contacts`](/docs/entities/contacts/list), [`GET /v1/companies`](/docs/entities/companies/list).
3. Set the clients: [`PUT /v1/booking-wait-list/:id/clients`](./clients-set.md).
4. Check the clients: [`GET /v1/booking-wait-list/:id/clients`](./clients-list.md).

## Limits

| Limit | Value |
|-------|----------|
| List pagination | None: [`GET /v1/booking-wait-list/:id/clients`](./clients-list.md) returns all clients of the record in one call |
| Request rate | Common API limits — [Limits and optimization](/docs/optimization) |
| Replacement time | Grows with the number of clients: before writing, each contact and company is checked one at a time. Replacing 55 contacts takes about 30 seconds — [Client-side timeout](/docs/optimization#client-side-timeout) |

## See also

- [Booking wait list](/docs/entities/booking-wait-list)
- [Booking client types](/docs/entities/booking-client-types)
- [Booking clients](/docs/entities/bookings/clients)
- [Contacts](/docs/entities/contacts)
- [Companies](/docs/entities/companies)
