# List booking client types

`GET /v1/booking-client-types`

Returns the module and code pairs that the Bitrix24 account accepts as a client type in bookings and in the wait list.

No parameters. The whole list arrives in one response.

## Examples

### curl — personal key

```bash
curl -X GET "https://vibecode.bitrix24.com/v1/booking-client-types" \
  -H "X-Api-Key: YOUR_API_KEY"
```

### curl — OAuth application

```bash
curl -X GET "https://vibecode.bitrix24.com/v1/booking-client-types" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN"
```

### JavaScript — personal key

```javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/booking-client-types', {
  headers: { 'X-Api-Key': 'YOUR_API_KEY' },
})

const { data } = await res.json()
console.log(data.map((type) => `${type.module}/${type.code}`))
```

### JavaScript — OAuth application

```javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/booking-client-types', {
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
  },
})

const { data } = await res.json()
console.log(data.map((type) => `${type.module}/${type.code}`))
```

## Response fields

| Field | Type | Description |
|------|-----|----------|
| `success` | boolean | `true` on success |
| `data` | array | Client types allowed in the Bitrix24 account. An empty array is a valid response |
| `data[].module` | string | Module the client type belongs to, for example `crm` |
| `data[].code` | string | Client type code, for example `CONTACT` or `COMPANY` |

## Response example

```json
{
  "success": true,
  "data": [
    {
      "code": "COMPANY",
      "module": "crm"
    },
    {
      "code": "CONTACT",
      "module": "crm"
    }
  ]
}
```

## Error response example

401 — no key passed:

```json
{
  "success": false,
  "error": {
    "code": "MISSING_API_KEY",
    "message": "API key required. Pass via X-Api-Key header."
  }
}
```

## Errors

| HTTP | Code | Description |
|------|-----|----------|
| 401 | `MISSING_API_KEY` | `X-Api-Key` was not passed |
| 401 | `TOKEN_MISSING` | The key has no connection to Bitrix24 |
| 403 | `SCOPE_DENIED` | The key lacks the `booking` scope |
| 422 | `BITRIX_ERROR` | Bitrix24 rejected the request. The reason is in `message` |
| 429 | `RATE_LIMITED` | Request rate exceeded |
| 502 | `BITRIX_RESPONSE_INVALID` | Bitrix24 returned a list of an unexpected shape |
| 502 | `BITRIX_UNAVAILABLE` | Bitrix24 is unavailable |
| 503 | `BITRIX_TIMEOUT` | Bitrix24 did not respond in time |

Full list of common API errors — [Errors](/docs/errors).

## Known specifics

**Query parameters do not change the response.** `filter`, `limit` and other query string parameters are ignored without a warning: the response always contains every client type of the Bitrix24 account.

## See also

- [Booking client types](/docs/entities/booking-client-types)
- [Booking clients](/docs/entities/bookings/clients)
- [Booking wait list](/docs/entities/booking-wait-list)
- [Errors](/docs/errors)
