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

ElementNumTypeDescription
Authentication1ObjectAuthentication Object
Authentication > Username1StringUnique Username
Authentication > Password1StringUnique Password
MessageType1StringSet to 'SetRates'
MessageID1StringMessage ID (UUID)
TimeStamp1DateTimeDate and time of the transaction in ISO 8601 format. e.g. 2016-01-28T15:15:00+08:00
RateRestrictionData1..nArrayRateRestrictionData array, contains the contents of what is required to be updated.
RateRestrictionData n > RoomTypeCode1StringThe Room Type Code or ID for the Room to be updated.
RateRestrictionData n > RateTypeCode1StringThe Rate Type Code or ID that us used by your system for this Rate Type
RateRestrictionData n > StartDate1DateStart date in YYYY-MM-DD format.
RateRestrictionData n > EndDate1DateEnd date in YYYY-MM-DD format (Inclusive).
RateRestrictionData n > MinLOS0..1IntegerInteger >= 0, a value of 0 means no minimum length of stay.
RateRestrictionData n > Closed0..1Booleantrue 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

ElementNumTypeDescription
MessageID1StringUnique Message ID (Same as 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..nArrayMessages array of any updates performed (usually in delta format).