Skip to main content

Hotel Level

Manage Stay Controls - Hotel Level

The following examples show how to Create, Retrieve and Delete Stay Controls at the Hotel level

For the complete list of Stay Controls Click Here.

 

Create Request

Create Hotel level stay controls for MaximumLeadDays, SellLimit, LeadDays, and NoArrival.

{
    "criteria": {
        "startDate": "2021-07-01",
        "endDate": "2021-07-07",
        "Hotel": {
            "id": 13098
        },
        "ChannelList": [
            {
                "code": "ALL"
            }
        ]
    }, 
    "valueList": [
        {
            "controlType": "MaximumLeadDays,SellLimit",
            "dayofWeek": "M,Tu,W,Th,F,Sa,Su",
            "value": "9",
            "valueType": "Number"
        },
        {
            "controlType": "LeadDays",
            "dayofWeek": "F,Sa,Su",
            "value": "9",
            "valueType": "Number"
        },
        {
            "controlType": "NoArrival",
            "dayofWeek": "M,Tu,W",
            "value": "true",
            "valueType": "Boolean"
        }
    ]
}

 

Retrieve Request

GET /v1/api/admin/product/stayControls?hotelId=13098&level=Hotel&startDate=2021-07-01&endDate=2021-07-07

Response

{
    "paging": {
        "Size": 20,
        "Start": 0,
        "Total": 20
    },
    "StayControlList": [
        {
            "Hotel": {
                "Id": 13098
            },
            "Channel": {
                "Code": "ALL"
            },
            "StartDate": "2021-07-01T00:00:00",
            "EndDate": "2021-07-07T00:00:00",
            "DayofWeek": "Sunday, Friday, Saturday",
            "Level": "Hotel",
            "Type": "LeadDays",
            "Value": "9",
            "ValueType": "Number"
        },
        {
            "Hotel": {
                "Id": 13098
            },
            "Channel": {
                "Code": "ALL"
            },
            "StartDate": "2021-07-01T00:00:00",
            "EndDate": "2021-07-07T00:00:00",
            "DayofWeek": "Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday",
            "Level": "Hotel",
            "Type": "SellLimit",
            "Value": "9",
            "ValueType": "Number"
        },
        {
            "Hotel": {
                "Id": 13098
            },
            "Channel": {
                "Code": "ALL"
            },
            "StartDate": "2021-07-01T00:00:00",
            "EndDate": "2021-07-07T00:00:00",
            "DayofWeek": "Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday",
            "Level": "Hotel",
            "Type": "MaximumLeadDays",
            "Value": "9",
            "ValueType": "Number"
        },
        {
            "Hotel": {
                "Id": 13098
            },
            "Channel": {
                "Code": "ALL"
            },
            "StartDate": "2021-07-01T00:00:00",
            "EndDate": "2021-07-07T00:00:00",
            "DayofWeek": "Monday, Tuesday, Wednesday",
            "Level": "Hotel",
            "Type": "NoArrival",
            "Value": "True",
            "ValueType": "Boolean"
        }
    ],
    "ContentList": {
        "ChannelList": [
            {
                "Code": "ALL",
                "Name": "Channel Independent"
            }
        ],
        "HotelList": [
            {
                "Code": "CRSPROD1",
                "ID": 13098,
                "Name": "SynXis Test Hotel"
            }
        ]
    }
}

 

Delete

Delete the Hotel Level NoArrival and LeadDays stay restrictions

{
    "criteria": {
        "chain": {
            "id": 12723
        },
        "hotel": {
            "id": 13098
        },
        "startDate": "2021-05-01",
        "endDate": "2021-05-03",
        "channelList": [{
            "code": "ALL"
        }]
    },
    "valueList": [{
            "controlType": "NoArrival,LeadDays"
        }

    ]
}