Set Restrictions (Room Level)
Description
When a client application sends a correctly-formatted Set Room Restrictions message Levart will respond with a corresponding response message indicating success or failure.
During normal operation it is important that a Set Room 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 Levart to avoid an over-booking. A nightly 'full sync' of every room type is required to help with consistency.
Direction
PMS → Levart
Request
{
"Authentication" : {
"Username": "abc",
"Password": "456"
},
"MessageID": "717b3bec-5321-4bad-84c1-075bff67f92c",
"TimeStamp": "2016-09-28T15:15:00+08:00",
"MessageType": "SetRoomRestrictions",
"RoomRestrictionData": [
{
"RoomTypeCode": "2BED",
"StartDate": "2025-05-08",
"EndDate": "2025-05-10",
"Closed": true,
"CTA": true,
"CTD": true
},
{
"RoomTypeCode": "2BED",
"StartDate": "2025-05-12",
"EndDate": "2025-05-14",
"CTD": true
}
]
}
Specification JSON Set Restrictions (Room Level) Request
Element | Num | Type | Description |
---|---|---|---|
Authentication | 1 | Object | Authentication Object |
Authentication > Username | 1 | String | Unique Username for this property. |
Authentication > Password | 1 | String | Unique Password for this property. |
MessageID | 1 | String | Unique Message ID |
MessageType | 1 | String | Set to 'SetRoomRestrictions' |
TimeStamp | 1 | DateTime | Date and time of the transaction in ISO 8601 format. e.g. 2016-01-28T15:15:00+08:00 |
RoomRestrictionData | 1..n | Array | RoomRestrictionData array, contains the contents of what is required to be updated. |
RoomRestrictionData n > RoomTypeCode | 1 | String | The Room Type Code or ID for the Room to be updated |
RoomRestrictionData n > StartDate | 1 | Date | Start date in YYYY-MM-DD format. |
RoomRestrictionData n > EndDate | 1 | Date | End date in YYYY-MM-DD format (Inclusive). |
RoomRestrictionData n > Closed | 0..1 | Boolean | true or false, a value of true means room is closed for the period. |
RoomRestrictionData n > CTA | 0..1 | Boolean | true or false, a value of true means room is closed for arrival in the period. |
RoomRestrictionData n > CTD | 0..1 | Boolean | true or false, a value of true means room is closed for departure in the period. |
Note
A Set Room Restrictions message must include at least one of the following data elements: CTA,CTD
or Closed
.
Response (Success)
{
"MessageID": "717b3bec-5321-4bad-84c1-075bff67f92c",
"TimeStamp": "2016-09-28T15:15:00+08:00",
"Status": "Success",
"Messages": [
"Set availability for room 464 - from 2025-05-08 to 2025-05-10 as Open.",
"Set room 464 - from 2025-05-08 to 2025-05-10 as Closed to arrival.",
"Set room 464 - from 2025-05-08 to 2025-05-10 as Open to departure.",
"Set room 464 - from 2025-05-08 to 2025-05-10 as Closed to arrival.",
"Set room 464 - from 2025-05-08 to 2025-05-10 as Open to departure.",
"Set room 464 - from 2025-05-08 to 2025-05-10 as Closed to arrival.",
"Set room 464 - from 2025-05-08 to 2025-05-10 as Open to departure.",
"Set room 464 - from 2025-05-12 to 2025-05-14 as Closed to departure.",
"Set room 464 - from 2025-05-12 to 2025-05-14 as Closed to departure.",
"Set room 464 - from 2025-05-12 to 2025-05-14 as Closed to departure."
}
Response (Error)
{
"MessageID": "717b3bec-5321-4bad-84c1-075bff67f92c",
"TimeStamp": "2016-09-28T15:15:00+08:00",
"Status": "Error",
"ErrorMessage": "Invalid date provided."
}
ErrorMessage | Description |
---|---|
"Malformed StartDate '2018-13-02'." | The date is not in the correct format of YYYY-MM-DD |
"EndDate '2018-01-13' is before StartDate '2018-01-15'." | The end date must be the same or after the start date. |
Specification JSON Set Restrictions (Room Level) Response
Element | Num | Type | Description |
---|---|---|---|
MessageID | 1 | String | Unique Message ID (Same as the 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 | Any update messages (delta) |