# Get: Booking resources

`GET /v1/booking-resources/:id`

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

## Parameters

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

## Examples

### curl — personal key

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

### curl — OAuth application

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

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

### JavaScript — OAuth application

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

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

## Response fields

The `isMain` and `is*NotificationOn` switches are always `true` or `false` in the card, 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 | Resource identifier. Pass it in `resourceIds` when [creating a booking](/docs/entities/bookings/create) |
| `data.name` | string | Resource name |
| `data.description` | string \| null | Resource description. `null` — not set |
| `data.typeId` | number | Resource type identifier. Type card: [`GET /v1/booking-resource-types/:id`](/docs/entities/booking-resource-types/get) |
| `data.isMain` | boolean | Main resource |
| `data.senderCode` | string \| null | Service that sends messages to the client, for example `bitrix24` |
| `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.templateTypeInfo` | string | Booking info message template: `inanimate`, `animate`, `inanimate_long` |
| `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": 51,
    "description": "Appointments only",
    "typeId": 1,
    "isMain": true,
    "name": "Room 3",
    "senderCode": "bitrix24",
    "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,
    "templateTypeInfo": "inanimate",
    "templateTypeConfirmation": "inanimate",
    "templateTypeReminder": "base",
    "templateTypeFeedback": "inanimate",
    "templateTypeDelayed": "inanimate"
  }
}
```

## Error response example

404 — no resource 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 resource 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

**`isMain` comes in different forms in the card and in the list.** The card returns `true` / `false`, while the [resource list](/docs/entities/booking-resources/list) returns the strings `"Y"` / `"N"`. Compare the value with its source in mind.

**Work hours come from a separate request.** The card does not include the resource schedule. It is returned by [`GET /v1/booking-resources/:id/slots`](/docs/entities/booking-resources/slots).

## See also

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