Set Rates

Description

When a client application sends a correctly-formatted Set Rates message Levart will respond with a corresponding response message indicating success or failure.

During normal operation it is important that a Set Rates 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": "SetRates",
  "RateData": [
    {
      "RoomTypeCode": "2BED",
      "RateTypeCode": "134",
      "StartDate":    "2017-03-14",
      "EndDate":      "2018-03-14",
      "RateValue":    "600.00"
    },
    {
      "RoomTypeCode": "2BED",
      "RateTypeCode": "134",
      "StartDate":    "2017-03-15",
      "EndDate":      "2017-03-15",
      "RateValue":    "500.00"
    }
  ]
}

Specification JSON Set Rates 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
RateData1..nArrayRateData array, contains the contents of what is required to be updated.
RateData n > RoomTypeCode1StringThe Room Type Code or ID for the Room to be updated.
RateData n > RateTypeCode1StringThe Rate Type Code or ID that us used by your system for this Rate Type
RateData n > StartDate1DateStart date in YYYY-MM-DD format.
RateData n > EndDate1DateEnd date in YYYY-MM-DD format (Inclusive).
RateData n > RateValue1DecimalInteger >= 0, a value of 0 means the rate is closed out.

Response (Success)

{
  "MessageID": "717b3bec-5321-4bad-84c1-075bff67f92c",
  "TimeStamp": "2016-09-28T15:15:00+08:00",
  "Status":    "Success",
  "Messages"   "Successfully updated Super Rate to $500"
}

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 Rates 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).