Restrictions Management

Restrictions help you manage occupancy and revenue (RevPAR) by defining the conditions under which specific rates, room types, and/or room classes are available to sell for new reservations. For example, you could place a two-night minimum stay restriction on all rooms and rates during a weekend when demand is high, or you could set extended stay durations on certain room types and rates to ensure maximum revenue is achieved over periods of high demand. Restrictions can be set at the house level, meaning that any restrictions placed are applicable to all rooms/room types or based on the channel, rate code, rate category, room type, or room class.

Figure 4-7 Restrictions Management Workflow


This image shows the restrictions management workflow.

Use Cases

Use Case Description Operation
Posting a single restriction You can post a single restriction. You can create a Restriction at various levels, such as house level, rate class, rate category, rate plan, room class, room type, and booking channel code. You can combine restrictions to apply to more than one element. For example, you are able to restrict reservations for a specific room type and rate code combination. postRestriction
Posting multiple restrictions You can create up to 1000 restrictions at once with postRestrictions. These can be created at various levels such as house level, rate class, rate category, rate plan, room class, room type, and booking channel code. You can combine restrictions to apply to more than one element. For example, you are able to restrict reservations for a specific room type and rate code combination. postRestrictionsProcess
Retrieving restrictions for a hotel for a given date range You can retrieve the Restrictions for a hotel in a given date range. The search criteria can include filter codes or restriction control types, date range, and the hotel information. getRestrictionsByDateRange

1. Posting a single restriction using postRestriction

The synchronous operation postRestriction is used to set or update one restriction at a time for a hotel. Restrictions can be set at the house level, meaning that any restrictions placed are applicable to all rooms/room types or based on the channel, rate code, rate category, room type, or room class.

Business Logic Comments
Posting a single restriction

The restrictions can be set using specific parameters to control room availability and booking patterns.

hotelId: Specifies the hotel for which restrictions are being set.

You can send the specific restriction details to be posted with the following information:

  • restrictionStatus: Defines the type and specifics of the restriction.
    • code: Type of restriction (for example, MinimumLengthOfStay).
    • lOS1 to lOS7: Flags indicating the length of stay restrictions for 1 to 7 nights.
  • ratePlanCodes: An array of rate plan codes to which the restriction applies.
  • roomClasses: Classes of rooms affected by the restriction.
  • bookingChannels: Channels through which the booking can be made.
  • roomTypes: Types of rooms affected by the restriction.
  • ratePlanCategories: Categories of rate plans affected by the restriction.
  • Sunday to Saturday: Flags indicating the days of the week the restriction applies.
  • start: The beginning date for the restriction.
  • end: The ending date for the restriction.
Key Considerations
  • The hotelId parameter is essential to identify which hotel's restrictions are being set or updated.
  • Specify the exact start and end dates for which the restrictions are to be applied to ensure accurate implementation and avoid overlaps or gaps.
  • Define restrictionStatus clearly to indicate the type of restriction being applied (for example, MinimumLengthOfStay), ensuring it aligns with the hotel's booking policies.
  • Set lOS1 to lOS7 flags accurately to control the allowed booking durations and optimize room utilization.
  • Include ratePlanCodes, roomClasses, and roomTypes to apply restrictions to specific rate plans, room classes, and room types, ensuring precise control over availability and pricing.
  • Specify the bookingChannels and ratePlanCategories to control which booking channels and rate plan categories the restrictions apply to, optimizing revenue management.
  • Set day-of-week flags (Sunday to Saturday) appropriately to ensure the restrictions are applied on the correct days.
Validation Validate the applied restrictions through the RMS to ensure they match the intended configurations and do not conflict with other restrictions or booking policies.
Sample API request/response
postRestriction
Endpoint:

POST  {{HostName}}/par/v1/hotels/{{HotelId}}/restrictions


Request body:
{
"restriction": {
"restrictionStatus": {
"code": "Closed",
"lOS1": false,
"lOS2": false,
"lOS3": false,
"lOS4": false,
"lOS5": false,
"lOS6": false,
"lOS7": false
},
"ratePlanCodes": [
"RACK"
],
"roomClasses": [],
"bookingChannels": [],
"roomTypes": [],
"ratePlanCategories": [],
"hotelId": "SH765",
"sunday": true,
"monday": true,
"tuesday": true,
"wednesday": true,
"thursday": true,
"friday": true,
"saturday": true,
"start": "2023-11-07",
"end": "2023-11-07"
}
}


Sample Successful Response:

201 Created
The Restrictions are posted to OPERA Cloud

2. Posting multiple restrictions using postRestrictionsProcess

The asynchronous operation postRestrictionsProcess is used to set or update multiple restrictions for a hotel for a given date range. The postRestrictionProcess endpoint is designed for setting or updating restrictions on reservations in a hotel system. These restrictions can include rules such as minimum length of stay, specific rate plans, room types, and other conditions that control how rooms can be booked.

Business Logic Comments
Posting multiple restrictions

The restrictions can be set using the following parameters to control room availability and booking patterns.

  • hotelId: Specifies the hotel for which restrictions are being set.

You can send the specific restriction details to be posted with the following information:

  • restrictionStatus: Defines the type and specifics of the restriction.
    • code: Type of restriction (for example, MinimumLengthOfStay).
    • unit: Unit of measurement for the restriction.
    • lengthOfStay1 to lengthOfStay7: Flags indicating the length of stay restrictions for 1 to 7 nights.
  • ratePlanCodes: An array of rate plan codes to which the restriction applies.
  • roomTypes: An array of room types affected by the restriction.
  • ratePlanCategories: An array of rate plan categories affected by the restriction.
  • seasonCode: Code identifying the season during which the restriction applies.
  • blockId: Identifier for the block of rooms affected by the restriction.
    • id: Specific block ID.
  • bookingChannelOnRequest: Specifies the booking channel on request for the restriction.
  • dateRangeStart: The start date for the restriction.
  • dateRangeEnd: The end date for the restriction.
  • Day of Week Flags: Flags indicating if the restriction applies on a particular day of the week.
  • yieldStatus: Indicates whether the restriction is yieldable or not.
Key Considerations
  • Specify the exact dateRangeStart and dateRangeEnd to ensure accurate implementation and avoid overlaps or gaps.
  • Define restrictionStatus clearly to indicate the type of restriction being applied, such as MinimumLengthOfStay.
  • Set lengthOfStay flags (lengthOfStay1 to lengthOfStay7) accurately to control the allowed booking durations and optimize room utilization.
  • Include ratePlanCodes and roomTypes to apply restrictions to specific rate plans and room types, ensuring precise control over availability and pricing.
  • Specify the seasonCode and blockId to manage seasonal and block-specific restrictions.
  • Use bookingChannelOnRequest to define the applicable booking channels for the restrictions.
  • Set day-of-week flags (Sunday to Saturday) appropriately to ensure the restrictions are applied on the correct days.
  • Specify the yieldStatus to indicate whether the restriction is yieldable or not.
Validation Validate the applied restrictions through the RMS to ensure they match the intended configurations and do not conflict with other restrictions or booking policies.
Sample API request/response
1. postRestrictionsProcess
Endpoint:

POST  {{HostName}}/par/async/v1/externalSystems/{{ExtSystemCode}}/hotels/{{HotelId}}/restrictions


Request Body:
{
"restriction": {
"restrictionStatus": {
"code": "Closed",
"lOS1": false,
"lOS2": false,
"lOS3": false,
"lOS4": false,
"lOS5": false,
"lOS6": false,
"lOS7": false
},
"ratePlanCodes": [
"RACK"
],
"roomClasses": [],
"bookingChannels": [],
"roomTypes": [],
"ratePlanCategories": [],
"hotelId": "SH765",
"sunday": true,
"monday": true,
"tuesday": true,
"wednesday": true,
"thursday": true,
"friday": true,
"saturday": true,
"start": "2023-11-07",
"end": "2023-11-07"
}
}


Sample Successful Response:

202 Accepted
2. getRestrictionsProcessStatus
Endpoint:

HEAD  {{HostName}}/par/async/v1/externalSystems/{{ExtSystemCode}}/hotels/{{HotelId}}/restrictions/{{RequestId1}}


Sample Successful Response:

201 Created
(You are ready to proceed to Step 3)
3. getRestrictions
Endpoint:

GET {{HostName}}/par/async/v1/externalSystems/{{ExtSystemCode}}/hotels/{{HotelId}}/restrictions/{{RequestId2}}


Sample Successful Response:

200 OK
<The Restrictions are posted to OPERA Cloud>

3. Retrieving restrictions for a hotel for a given date range

The synchronous operation getRestrictionsByDateRange is used to retrieve detailed information about the restrictions applied to a hotel's booking process within a specified date range. This information is crucial for understanding and managing booking limitations, ensuring compliance with hotel policies, and optimizing room inventory. You can utilize the data for operational planning, revenue management, and enhancing the guest booking experience.

Business Logic Comments
Retrieving restrictions

The restrictions data can be requested using restrictionSearchCriteriaStartDate and end to fetch the restrictions for a specified date range.

  • restrictionSearchCriteriaStartDate: The beginning date to filter restrictions.
  • end: The ending date to filter restrictions.

Other critical parameters include:

  • hotelId: Specifies the hotel for which restrictions are being queried.
  • restrictionStatus: Filters restrictions based on their current status.
  • ratePlanCodes: Filters restrictions based on the rate plan codes applied.
  • roomTypes: Filters restrictions based on the type of room.
  • seasonCode: Filters restrictions based on the season code.
  • blockId: Retrieves a specific block by its unique ID.
  • bookingChannelOnRequest: Specifies the booking channel for which the restrictions apply.
Key Considerations
  • Specify the exact restrictionSearchCriteriaStartDate and end dates to ensure accurate and comprehensive retrieval of restrictions.
  • Use restrictionStatus to filter results based on the current status of the restrictions, ensuring you get relevant data.
  • Include ratePlanCodes to filter restrictions based on specific rate plans, which helps in obtaining detailed and specific information.
  • Specify roomTypes to filter restrictions based on the types of rooms, ensuring precise control over the data retrieved.
  • Use seasonCode to manage seasonal restrictions and ensure that the data reflects the correct seasonal policies.
  • Include blockId to retrieve specific blocks by their unique ID, which is helpful for managing group reservations or specific events.
  • Use bookingChannelOnRequest to filter restrictions based on the booking channel, ensuring that the retrieved data is relevant to specific sales channels.
Key Response Data Elements

The key response data elements include:

RestrictionsByDateRange:

  • hotelId: The ID of the hotel for which restrictions are being retrieved.
  • hasMore: Indicates if there are more restrictions beyond the current response.

RestrictionSets:

  • restrictionControl: Details of the restriction control.
    • house: Indicates if the restriction applies to the entire house.
    • roomClass: The class of the room affected by the restriction.
    • ratePlanCategory: (Optional) The rate plan category affected by the restriction.
  • restrictionStatus: Status details of the restriction.
    • code: The type of restriction (for example, MaximumLengthOfStay, ClosedForDeparture).
    • unit: (Optional) The unit of the restriction, such as the number of nights.
  • actualTimeSpan: The time span during which the restriction is applied.
    • startDate: The starting date of the restriction.
    • endDate: The ending date of the restriction.
  • onRequest: Indicates if the restriction is on request.
  • start: The start date of the restriction.
  • end: The end date of the restriction.
  • Day of Week Flags: Flags indicating if the restriction applies on a particular day of the week.
Sample API request/response
getRestrictionsByDateRange
GET {{HostName}}/par/v1/hotels/{{HotelId}}/restrictions?hotelId={{HotelId}}&restrictionSearchCriteriaStartDate={{StartDate}}&end={{EndDate}}

Sample Successful (200 OK) Response:

{
    "restrictionsByDateRange": {
        "restrictionsByDateRange": {
            "restrictionSets": [
                {
                    "restrictionControl": {
                        "house": true
                    },
                    "restrictionStatus": {
                        "code": "Closed"
                    },
                    "actualTimeSpan": {
                        "startDate": "2023-11-06",
                        "endDate": "2023-11-06"
                    },
                    "onRequest": false,
                    "start": "2023-11-06",
                    "end": "2023-11-06",
                    "sunday": true,
                    "monday": true,
                    "tuesday": true,
                    "wednesday": true,
                    "thursday": true,
                    "friday": true,
                    "saturday": true
                },
                {
                    "restrictionControl": {
                        "house": false,
                        "ratePlanCode": "AMMAR1"
                    },
                    "restrictionStatus": {
                        "code": "Closed"
                    },
                    "actualTimeSpan": {
                        "startDate": "2023-11-06",
                        "endDate": "2023-11-07"
                    },
                    "onRequest": false,
                    "start": "2023-11-06",
                    "end": "2023-11-06",
                    "sunday": true,
                    "monday": true,
                    "tuesday": true,
                    "wednesday": true,
                    "thursday": true,
                    "friday": true,
                    "saturday": true
                }
            ],
            "hotelId": "SH765",
            "hasMore": false
        }
    }
}