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

ElementNumTypeDescription
Authentication1ObjectAuthentication Object
Authentication > Username1StringUnique Username for this property.
Authentication > Password1StringUnique Password for this property.
MessageID1StringUnique Message ID
MessageType1StringSet to 'SetRoomRestrictions'
TimeStamp1DateTimeDate and time of the transaction in ISO 8601 format. e.g. 2016-01-28T15:15:00+08:00
RoomRestrictionData1..nArrayRoomRestrictionData array, contains the contents of what is required to be updated.
RoomRestrictionData n > RoomTypeCode1StringThe Room Type Code or ID for the Room to be updated
RoomRestrictionData n > StartDate1DateStart date in YYYY-MM-DD format.
RoomRestrictionData n > EndDate1DateEnd date in YYYY-MM-DD format (Inclusive).
RoomRestrictionData n > Closed0..1Booleantrue or false, a value of true means room is closed for the period.
RoomRestrictionData n > CTA0..1Booleantrue or false, a value of true means room is closed for arrival in the period.
RoomRestrictionData n > CTD0..1Booleantrue 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."
}



ErrorMessageDescription
"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

ElementNumTypeDescription
MessageID1StringUnique Message ID (Same as the Request Message ID)
TimeStamp1DateTimeDate and time of the transaction in ISO 8601 format. e.g. 2016-01-28T15:15:00+08:00
Status1StringElement contains either 'Error' or 'Success'
ErrorMessage0..1StringError message (on error only).
Messages0..nArrayAny update messages (delta)