Breadcrumb
- Stay Controls
- Product Level
Product Level
Manage Stay Controls - Product Level
The following examples show how to Create, Retrieve and Delete Stay Controls at the Product level
For the complete list of Stay Controls Click Here.
Create/Update stay controls
Create/Update Product level stay controls for SellLimit and MaximumStayThrough.
{
"criteria": {
"startDate": "2023-06-01",
"endDate": "2023-06-07",
"Hotel": {
"id": 100319
},
"ChannelList": [{
"code": "ALL"
}]
},
"valueList": [{
"product": {
"rateCode": "BAR",
"roomCode": "LUXQ"
},
"controlType": "SellLimit",
"dayofWeek": "M,Tu,W,Th,F,Sa,Su",
"value": "9",
"valueType": "Number"
},
{
"product": {
"rateCode": "BAR",
"roomCode": "LUXQ"
},
"controlType": "MaximumStayThrough",
"dayofWeek": "Su",
"value": "3",
"valueType": "Number"
}
]
}
Retrieve all stay controls
Return a list of all Product level stay controls.
GET /v1/api/admin/product/stayControls?rateCode=BAR&roomCode=LUXQ&level=Product&hotelId=100319&startDate=2023-06-01&endDate=2023-06-07
Response
{
"paging": {
"Size": 8,
"Start": 0,
"Total": 8
},
"StayControlList": [{
"Hotel": {
"Id": 100319
},
"Channel": {
"Code": "ALL"
},
"Rate": {
"Code": "BAR"
},
"Room": {
"Code": "LUXQ"
},
"StartDate": "2023-06-01T00:00:00",
"EndDate": "2023-06-07T00:00:00",
"DayofWeek": "Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday",
"Level": "Product",
"Type": "SellLimit",
"Value": "9",
"ValueType": "Number"
},
{
"Hotel": {
"Id": 100319
},
"Channel": {
"Code": "ALL"
},
"Rate": {
"Code": "BAR"
},
"Room": {
"Code": "LUXQ"
},
"StartDate": "2023-06-01T00:00:00",
"EndDate": "2023-06-07T00:00:00",
"DayofWeek": "Sunday",
"Level": "Product",
"Type": "MaximumStayThrough",
"Value": "3",
"ValueType": "Number"
}
],
"ContentList": {
"ChannelList": [{
"Code": "ALL",
"Name": "Channel Independent"
}],
"RoomList": [{
"Code": "LUXQ",
"Name": "Deluxe Room Queen Beds"
}],
"RateList": [{
"Code": "BAR",
"Name": "Best Available Rate"
}],
"ChainList": [],
"HotelList": [{
"Code": "LOYAL1",
"ID": 100319,
"Name": "SynXis Hotel"
}]
}
}
Retrieve a specified stay control
Return SellLimit Product level stay control.
GET /v1/api/admin/product/stayControls?controlType=SellLimit&rateCode=BAR&roomCode=LUXQ&level=Product&hotelId=100319&startDate=2023-06-01&endDate=2023-06-07
Response
{
"paging": {
"Size": 8,
"Start": 0,
"Total": 8
},
"StayControlList": [{
"Hotel": {
"Id": 100319
},
"Channel": {
"Code": "ALL"
},
"Rate": {
"Code": "BAR"
},
"Room": {
"Code": "LUXQ"
},
"StartDate": "2023-06-01T00:00:00",
"EndDate": "2023-06-07T00:00:00",
"DayofWeek": "Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday",
"Level": "Product",
"Type": "SellLimit",
"Value": "9",
"ValueType": "Number"
}
],
"ContentList": {
"ChannelList": [{
"Code": "ALL",
"Name": "Channel Independent"
}],
"RoomList": [{
"Code": "LUXQ",
"Name": "Deluxe Room Queen Beds"
}],
"RateList": [{
"Code": "BAR",
"Name": "Best Available Rate"
}],
"ChainList": [],
"HotelList": [{
"Code": "LOYAL1",
"ID": 100319,
"Name": "SynXis Hotel"
}]
}
}
Delete a stay control
Delete the SellLimit stay control.
{
"criteria": {
"hotel": {
"id": 100319
},
"startDate": "2023-06-01",
"endDate": "2023-06-07",
"channelList": [{
"code": "ALL"
}],
"controlType": "SellLimit"
},
"valueList": [{
"product": {
"rateCode": "BAR",
"roomCode": "LUXQ"
}
}]
}
Delete stay controls for multiple products
Delete multiple stay controls by using a comma separated list.
{
"criteria": {
"hotel": {
"id": 100319
},
"startDate": "2023-06-01",
"endDate": "2023-06-07",
"channelList": [{
"code": "ALL"
}],
"controlType": "SellLimit,MaximumLeadDays,NoArrival"
},
"valueList": [{
"Product": {
"rateCode": "CHAIN_RATE",
"roomCode": "LUXQ"
}
},
{
"Product": {
"rateCode": "BAR",
"roomCode": "LUXQ"
}
}
]
}
Delete multiple stay controls
Delete multiple stay controls by using a comma separated list.
{
"criteria": {
"hotel": {
"id": 100319
},
"startDate": "2023-06-01",
"endDate": "2023-06-07",
"channelList": [{
"code": "ALL"
}],
"controlType": "SellLimit,MaximumLeadDays,NoArrival"
},
"valueList": [{
"Product": {
"rateCode": "BAR",
"roomCode": "LUXQ"
}
}]
}
Delete all product level stay controls
Delete all product level stay controls by ommiting @controlType.
{
"criteria": {
"hotel": {
"id": 100319
},
"startDate": "2023-06-01",
"endDate": "2023-06-07",
"channelList": [{
"code": "ALL"
}]
},
"valueList": [{
"Product": {
"rateCode": "BAR",
"roomCode": "LUXQ"
}
}]
}