Set Restrictions (Rate Level)
Description
When a client application sends a correctly-formatted Set Rate Restrictions message Levart will respond with a corresponding response message indicating success or failure.
During normal operation it is important that a Set Rate Restrictions message only contains the changes (delta) that have occurred on the PMS. It is imperative that these changes are pushed as soon as possible to ensure the correct rates are booked. A nightly 'full sync' of every rate type is ideal to help with consistency.
Note
It is a requirement that update messages are constructed in the most efficient manner. This means that from/to date periods are used where the rates will be the same. Also the minimal amount of messages should be sent.
Direction
PMS → Levart
Request
{
"Authentication" : {
"Username": "abc",
"Password": "456"
},
"MessageID": "717b3bec-5321-4bad-84c1-075bff67f92c",
"TimeStamp": "2016-09-28T15:15:00+08:00",
"MessageType": "SetRateRestrictions",
"RateRestrictionData": [
{
"RoomTypeCode": "2BED",
"RateTypeCode": "134",
"StartDate": "2025-05-08",
"EndDate": "2025-05-10",
"MinLOS": 5
},
{
"RoomTypeCode": "2BED",
"RateTypeCode": "134",
"StartDate": "2025-05-12",
"EndDate": "2025-05-14",
"MinLOS": 5
},
{
"RoomTypeCode": "2BED",
"RateTypeCode": "134",
"StartDate": "2025-05-15",
"EndDate": "2025-05-15",
"Closed": false
}
]
}
Specification JSON Set Restrictions (Rate Level) Request
Element | Num | Type | Description |
---|---|---|---|
Authentication | 1 | Object | Authentication Object |
Authentication > Username | 1 | String | Unique Username |
Authentication > Password | 1 | String | Unique Password |
MessageType | 1 | String | Set to 'SetRates' |
MessageID | 1 | String | Message ID (UUID) |
TimeStamp | 1 | DateTime | Date and time of the transaction in ISO 8601 format. e.g. 2016-01-28T15:15:00+08:00 |
RateRestrictionData | 1..n | Array | RateRestrictionData array, contains the contents of what is required to be updated. |
RateRestrictionData n > RoomTypeCode | 1 | String | The Room Type Code or ID for the Room to be updated. |
RateRestrictionData n > RateTypeCode | 1 | String | The Rate Type Code or ID that us used by your system for this Rate Type |
RateRestrictionData n > StartDate | 1 | Date | Start date in YYYY-MM-DD format. |
RateRestrictionData n > EndDate | 1 | Date | End date in YYYY-MM-DD format (Inclusive). |
RateRestrictionData n > MinLOS | 0..1 | Integer | Integer >= 0, a value of 0 means no minimum length of stay. |
RateRestrictionData n > Closed | 0..1 | Boolean | true or false, a value of true means rate is closed for the period. |
Note
A Set Rate Restrictions message must include at least one of the following data elements: MinLOS
or Closed
.
Response (Success)
{
"MessageID": "717b3bec-5321-4bad-84c1-075bff67f92c",
"TimeStamp": "2016-09-28T15:15:00+08:00",
"Status": "Success",
"Messages": [
"Set availability for rate 134 - from 2025-05-08 to 2025-05-10 as Open.",
"Set MinLOS for rate 134 - from 2025-05-08 to 2025-05-10 as 5.",
"Set availability for rate 134 - from 2025-05-12 to 2025-05-14 as Open.",
"Set MinLOS for rate 134 - from 2025-05-12 to 2025-05-14 as 3."
]
}
Response (Error)
{
"MessageID": "717b3bec-5321-4bad-84c1-075bff67f92c",
"TimeStamp": "2016-09-28T15:15:00+08:00",
"Status": "Error",
"ErrorMessage": "Invalid date provided."
}
Specification JSON Set Restrictions (Rate Level) Response
Element | Num | Type | Description |
---|---|---|---|
MessageID | 1 | String | Unique Message ID (Same as Request Message ID) |
TimeStamp | 1 | DateTime | Date and time of the transaction in ISO 8601 format. e.g. 2016-01-28T15:15:00+08:00 |
Status | 1 | String | Element contains either Error or Success |
ErrorMessage | 0..1 | String | Error message (on error only). |
Messages | 0..n | Array | Messages array of any updates performed (usually in delta format). |