# List: Booking resource types

`GET /v1/booking-resource-types`

Returns all booking resource types of the Bitrix24 account in one response, with filtering by code or name, and sorting.

## Parameters

| Parameter | Type | Required | Default | Description |
|----------|-----|:-----:|-----------|----------|
| `filter` (query) | string | no | — | JSON filter object. Fields: `code` — a string or an array of strings, `name` — exact name, `searchQuery` — part of the name. Example: `?filter={"code":["equipment","expert"]}` |
| `order` (query) | string | no | `{"id":"ASC"}` | JSON object for sorting by `id`, `name` or `code`, with values `ASC` or `DESC`. Example: `?order={"name":"DESC"}` |

**Pagination.** There is no pagination: the list returns all matching types in one response, up to 500. The `limit` and `offset` parameters are not accepted — a request with them is rejected with `400 INVALID_PARAMS`. Pass `filter` and `order` URL-encoded, as in the examples.

## Examples

### curl — personal key

```bash
curl -G "https://vibecode.bitrix24.com/v1/booking-resource-types" \
  -H "X-Api-Key: YOUR_API_KEY" \
  --data-urlencode 'filter={"code":["equipment","expert"]}'
```

### curl — OAuth application

```bash
curl -G "https://vibecode.bitrix24.com/v1/booking-resource-types" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN" \
  --data-urlencode 'filter={"code":["equipment","expert"]}'
```

### JavaScript — personal key

```javascript
const params = new URLSearchParams({
  filter: JSON.stringify({ code: ['equipment', 'expert'] }),
})

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

const { data, meta } = await res.json()
console.log(meta.total, data.map((type) => type.code))
```

### JavaScript — OAuth application

```javascript
const params = new URLSearchParams({
  filter: JSON.stringify({ code: ['equipment', 'expert'] }),
})

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

const { data, meta } = await res.json()
console.log(meta.total, data.map((type) => type.code))
```

## Response fields

| Field | Type | Description |
|------|-----|----------|
| `success` | boolean | `true` on success |
| `data` | array | Array of type cards. The card fields are listed in the "Response fields" section of the [Get a booking resource type](/docs/entities/booking-resource-types/get) page |
| `meta.total` | number | Number of types in the response |
| `meta.hasMore` | boolean | Always `false`: the list arrives whole |

## Response example

The main card fields are shown. The full set is on the [Get a booking resource type](/docs/entities/booking-resource-types/get) page.

```json
{
  "success": true,
  "data": [
    {
      "id": 3,
      "code": "equipment",
      "name": "Equipment",
      "senderCode": null,
      "isInfoNotificationOn": true,
      "isConfirmationNotificationOn": true,
      "isReminderNotificationOn": true,
      "isFeedbackNotificationOn": false,
      "isDelayedNotificationOn": true,
      "isCancellationNotificationOn": true,
      "templateTypeConfirmation": "inanimate"
    },
    {
      "id": 5,
      "code": "expert",
      "name": "Expert",
      "senderCode": null,
      "isInfoNotificationOn": true,
      "isConfirmationNotificationOn": true,
      "isReminderNotificationOn": true,
      "isFeedbackNotificationOn": false,
      "isDelayedNotificationOn": true,
      "isCancellationNotificationOn": true,
      "templateTypeConfirmation": "animate"
    }
  ],
  "meta": {
    "total": 2,
    "hasMore": false
  }
}
```

## Error response example

400 — the filter field is not supported:

```json
{
  "success": false,
  "error": {
    "code": "INVALID_PARAMS",
    "message": "Unknown resource type filter"
  }
}
```

## Errors

| HTTP | Code | Description |
|------|-----|----------|
| 400 | `INVALID_PARAMS` | A filter field is not one of the allowed fields. Message `Unknown resource type filter` |
| 400 | `INVALID_PARAMS` | A filter field value is an object. Message `Filter values must be scalars or scalar arrays` |
| 400 | `INVALID_PARAMS` | Sorting by a field other than `id`, `name` or `code`, or in a direction other than `ASC` / `DESC`. Message `Invalid resource type order` |
| 400 | `INVALID_PARAMS` | `filter` or `order` is not JSON. Message `filter and order must be JSON objects` |
| 400 | `INVALID_PARAMS` | `filter` or `order` is JSON but not an object, for example an array. Message `filter and order must be objects` |
| 400 | `INVALID_PARAMS` | A parameter other than `filter` and `order` is passed. Message `Only filter and order are supported` |
| 400 | `INVALID_PARAMS` | A parameter is passed twice. Message `Repeated query parameters are not supported` |
| 401 | `MISSING_API_KEY` | The `X-Api-Key` header is not passed |
| 401 | `TOKEN_MISSING` | The key has no Bitrix24 tokens |
| 403 | `SCOPE_DENIED` | The key does not have the `booking` scope |
| 429 | `RATE_LIMITED` | Request rate exceeded. The effective cap is in the `x-ratelimit-limit` header |
| 502 | `BITRIX_RESPONSE_INVALID` | The Bitrix24 account has more than 500 types, or Bitrix24 returned a list of an unexpected shape |

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

## Known specifics

**A filter by `id` does not work.** The `id` field and uppercase field names, for example `CODE`, pass validation but do not filter records: the response contains all types of the Bitrix24 account. To get a single type by its identifier, call [`GET /v1/booking-resource-types/:id`](/docs/entities/booking-resource-types/get).

**Built-in types.** Besides the types created through the API, the list contains types that Bitrix24 creates on its own, for example `equipment` — "Equipment" and `room` — "Property".

## See also

- [Get a booking resource type](/docs/entities/booking-resource-types/get)
- [Create a booking resource type](/docs/entities/booking-resource-types/create)
- [Booking resources](/docs/entities/booking-resources)
- [Errors](/docs/errors)
