Minimum Length of Stay Rate Plan Level
1 min
Minimum Length of Stay Rate Plan Level
Pushes Length of Stay (LOS) condition updates from Bakuun to the partner system.
This action communicates minimum stay rules for one or more rooms and date ranges.
It ensures the partner system aligns with Bakuun’s restrictions when hotels define new stay-length conditions or modify existing ones.
POST
https://aggregate.bakuun.com/api/updateRates/MPBXX/invupdate
Body Parameters
- usernamestringrequiredDescription
- passwordstringrequiredDescription
- hotelIdstringrequiredDescription
- actionstringrequiredDescription
- dataobjectrequiredDescription
- startDateYmdstringrequiredDescription
- endDateYmdstringrequiredDescription
- roomCodestringrequiredDescription
- condCodestringrequiredDescription
- minMaxMessageTypestringrequiredDescription
- TimestringrequiredDescription
Response
- successboolean
json
{
"username": "string",
"password": "string",
"hotelId": "string",
"action": "SetLosCondRQ",
"data": [
{
"startDateYmd": "YYYY-MM-DD",
"endDateYmd": "YYYY-MM-DD",
"roomCode": "string",
"condCode": "string",
"minMaxMessageType": "SetMinLOS"
"Time": "1"
}
]
}curl
curl --location 'https://aggregate.bakuun.com/api/updateRates/MPBXX/invupdate' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"username": "String",
"password": "String",
"hotelId": "String",
"action": "String",
"data": {
"startDateYmd": "",
"endDateYmd": "",
"roomCode": "",
"condCode": "",
"minMaxMessageType": "",
"Time": ""
}
}'nodejs
var request = require('request');
var options = {
'method': 'POST',
'url': 'https://aggregate.bakuun.com/api/updateRates/MPBXX/invupdate',
'headers': {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"username": "String",
"password": "String",
"hotelId": "String",
"action": "String",
"data": {
"startDateYmd": "",
"endDateYmd": "",
"roomCode": "",
"condCode": "",
"minMaxMessageType": "",
"Time": ""
}
})
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
javascript
var myHeaders = new Headers();
myHeaders.append("Accept", "application/json");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"username": "String",
"password": "String",
"hotelId": "String",
"action": "String",
"data": {
"startDateYmd": "",
"endDateYmd": "",
"roomCode": "",
"condCode": "",
"minMaxMessageType": "",
"Time": ""
}
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://aggregate.bakuun.com/api/updateRates/MPBXX/invupdate", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));python
import requests
import json
url = "https://aggregate.bakuun.com/api/updateRates/MPBXX/invupdate"
payload = json.dumps({
"username": "String",
"password": "String",
"hotelId": "String",
"action": "String",
"data": {
"startDateYmd": "",
"endDateYmd": "",
"roomCode": "",
"condCode": "",
"minMaxMessageType": "",
"Time": ""
}
})
headers = {
'Accept': 'application/json',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
ruby
require "uri"
require "json"
require "net/http"
url = URI("https://aggregate.bakuun.com/api/updateRates/MPBXX/invupdate")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Accept"] = "application/json"
request["Content-Type"] = "application/json"
request.body = JSON.dump({
"username": "String",
"password": "String",
"hotelId": "String",
"action": "String",
"data": {
"startDateYmd": "",
"endDateYmd": "",
"roomCode": "",
"condCode": "",
"minMaxMessageType": "",
"Time": ""
}
})
response = https.request(request)
puts response.read_body
200
{
"success": true,
}500
{
"success": false,
"errors": [
{
"code": 500,
"message": "Internal server error"
}
]
}502
{
"success": false,
"errors": [
{
"code": 502,
"message": "Bad gateway"
}
]
}503
{
"success": false,
"errors": [
{
"code": 503,
"message": "Service unavailable"
}
]
}504
{
"success": false,
"errors": [
{
"code": 504,
"message": "Endpoint request timed-out"
}
]
}