# BookingRule

## Fields

| Field | Description | Type | Min/max | Notes |
| --- | --- | --- | --- | --- |
| [BookingRules](/connectivity/docs/api-reference/bookingrules)/`BookingRule` | Booking rule details. | object | 0..* | - |
| `BookingRule`/`@MinAdvancedBookingOffset` | Minimum amount of time in advance the room must be booked, relative to midnight on the day of check-in in the property's local timezone. The search date is counted as one of the days in the restriction length. | `P[0-9]+(Y | M | D |
| `BookingRule`/`@MaxAdvancedBookingOffset` | Maximum amount of time in advance the room can be booked, relative to midnight on the day of check-in in the property's local timezone. The search date is counted as one of the days in the restriction length. | `P[0-9]+(Y | M | D |
| `BookingRule`/`@ReleaseTimeOfDayStart` | Specifies the time of day from which the room can start being booked. | `HH:MM` in requests; integer in responses | 0..1 | Requests use a time on a 15-minute interval, such as `10:15`. Responses return an integer index of a 15-minute interval from midnight. Convert a response value to a time using `hours = value / 4` (integer division) and `minutes = (value % 4) × 15`. For example, response value `41` represents `10:15`. |
| `BookingRule`/`@ReleaseTimeOfDayEnd` | Specifies the time of day after which the room can no longer be booked. | `HH:MM` in requests; integer in responses | 0..1 | Requests use a time on a 15-minute interval, such as `21:30`. Responses return an integer index of a 15-minute interval from midnight. Convert a response value to a time using `hours = value / 4` (integer division) and `minutes = (value % 4) × 15`. For example, response value `86` represents `21:30`. |

For properties without a configured timezone, the system uses the `Europe/Amsterdam` timezone (CET or CEST, depending on the date) as a fallback.

## XML

```xml
<BookingRule
  MinAdvancedBookingOffset="P5H" />
<BookingRule
  MaxAdvancedBookingOffset="P14D" />
<!-- Request values use HH:MM. -->
<BookingRule ReleaseTimeOfDayStart="10:00"/>
<BookingRule ReleaseTimeOfDayEnd="14:15"/>
<!-- Response values use 15-minute interval indexes. -->
<BookingRule ReleaseTimeOfDayStart="40"/>
<BookingRule ReleaseTimeOfDayEnd="57"/>
```

## Related endpoints

- [/ota/OTA_HotelProductNotif](/connectivity/docs/ota-hotelproductnotif)
