# Get: Booking resource types

`GET /v1/booking-resource-types/:id`

Returns a booking resource type by its identifier: name, code and the settings for client messages about bookings.

## Parameters

| Parameter | Type | Required | Description |
|----------|-----|:-----:|----------|
| `id` (path) | number | yes | Type identifier. List: [`GET /v1/booking-resource-types`](/docs/entities/booking-resource-types/list) |

## Examples

### curl — personal key

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

### curl — OAuth application

```bash
curl "https://vibecode.bitrix24.com/v1/booking-resource-types/31" \
  -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-resource-types/31', {
  headers: { 'X-Api-Key': 'YOUR_API_KEY' },
})

const { data } = await res.json()
console.log(data.name, data.code)
```

### JavaScript — OAuth application

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

const { data } = await res.json()
console.log(data.name, data.code)
```

## Response fields

The `is*NotificationOn` switches are always `true` or `false` in the response, even if the strings `"Y"` / `"N"` were passed on write. Delays are in seconds.

| Field | Type | Description |
|------|-----|----------|
| `success` | boolean | `true` on success |
| `data.id` | number | Type identifier. Pass it in `typeId` when [creating a booking resource](/docs/entities/booking-resources/create) |
| `data.code` | string | Symbolic code of the type, unique among the types of the Bitrix24 account |
| `data.name` | string | Type name |
| `data.senderCode` | string \| null | Service that sends messages to the client, for example `bitrix24`. `null` — not set |
| `data.isInfoNotificationOn` | boolean | Booking info message to the client |
| `data.isConfirmationNotificationOn` | boolean | Booking confirmation request |
| `data.isReminderNotificationOn` | boolean | Booking reminder |
| `data.isFeedbackNotificationOn` | boolean | Feedback request |
| `data.isDelayedNotificationOn` | boolean | Message to a client who is running late |
| `data.isCancellationNotificationOn` | boolean | Booking cancellation message to the client |
| `data.infoNotificationDelay` | number \| null | How many seconds after the booking is made to send the booking info message |
| `data.confirmationNotificationDelay` | number \| null | How many seconds before the booking to send the first confirmation request |
| `data.confirmationNotificationRepetitions` | number \| null | How many times to repeat the confirmation request, not counting the first one |
| `data.confirmationNotificationRepetitionsInterval` | number \| null | Interval between repeats of the confirmation request |
| `data.confirmationCounterDelay` | number \| null | How many seconds before the booking an unconfirmed booking enters the counter |
| `data.reminderNotificationDelay` | number \| null | How many seconds before the booking to send the reminder. `-1` — on the morning of the booking day |
| `data.delayedNotificationDelay` | number \| null | After how many seconds of lateness to send the message to the client |
| `data.delayedCounterDelay` | number \| null | After how many seconds of lateness the booking enters the calendar counter |
| `data.cancellationNotificationDelay` | number \| null | Delay of the booking cancellation message |
| `data.templateTypeConfirmation` | string | Confirmation request template: `inanimate`, `animate`, `inanimate_long` |
| `data.templateTypeReminder` | string | Reminder template: `base` |
| `data.templateTypeFeedback` | string | Feedback request template: `inanimate`, `animate` |
| `data.templateTypeDelayed` | string | Late-arrival message template: `inanimate`, `animate` |

## Response example

```json
{
  "success": true,
  "data": {
    "id": 31,
    "code": "master",
    "name": "Technicians",
    "senderCode": null,
    "isInfoNotificationOn": false,
    "isConfirmationNotificationOn": false,
    "isReminderNotificationOn": false,
    "isFeedbackNotificationOn": false,
    "isDelayedNotificationOn": false,
    "isCancellationNotificationOn": false,
    "infoNotificationDelay": null,
    "confirmationNotificationDelay": 86400,
    "confirmationNotificationRepetitions": null,
    "confirmationNotificationRepetitionsInterval": 10800,
    "confirmationCounterDelay": 10800,
    "reminderNotificationDelay": -1,
    "delayedNotificationDelay": 300,
    "delayedCounterDelay": 300,
    "cancellationNotificationDelay": 600,
    "templateTypeConfirmation": "inanimate",
    "templateTypeReminder": "base",
    "templateTypeFeedback": "inanimate",
    "templateTypeDelayed": "inanimate"
  }
}
```

## Error response example

404 — no type with this `id`:

```json
{
  "success": false,
  "error": {
    "code": "ENTITY_NOT_FOUND",
    "message": "Booking record not found"
  }
}
```

## Errors

| HTTP | Code | Description |
|------|-----|----------|
| 404 | `ENTITY_NOT_FOUND` | No type with this `id` |
| 400 | `INVALID_PARAMS` | `id` is not a positive integer. Message `id must be a positive safe integer` |
| 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` | Bitrix24 returned a card of an unexpected shape |

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

## Known specifics

**The type's resources come from a separate request.** The type card does not list its resources. To get them, call [`GET /v1/booking-resources?typeId=31`](/docs/entities/booking-resources/list).

**The booking message template is not returned in the card.** [Create](/docs/entities/booking-resource-types/create) and [update](/docs/entities/booking-resource-types/update) accept the `templateTypeInfo` field, but the card does not include it. The current template cannot be read through the API.

## See also

- [List booking resource types](/docs/entities/booking-resource-types/list)
- [Update a booking resource type](/docs/entities/booking-resource-types/update)
- [Booking resources](/docs/entities/booking-resources)
- [Errors](/docs/errors)
