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

POST  /rates/v1/push

Endpoint


Specification JSON Request

ParameterNumTypeRequiredDescription
MessageID1StringYesMessage ID (UUID)
TimeStamp1DateTimeYesDate and time of the transaction in ISO 8601 format. e.g. 2016-01-28T15:15:00+08:00
MessageType1StringYesSet to 'SetRates'
RateData1..nArrayYesRateData array, contains the contents of what is required to be updated.
RateData n > RoomTypeCode1StringYesThe Room Type Code or ID for the Room to be updated.
RateData n > RateTypeCode1StringYesThe Rate Type Code or ID that us used by your system for this Rate Type
RateData n > StartDate1DateYesStart date in YYYY-MM-DD format.
RateData n > EndDate1DateYesEnd date in YYYY-MM-DD format (Inclusive).
RateData n > RateValue1DecimalYesInteger >= 0, a value of 0 means the rate is closed out.

Request Data

{
  "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"
    }
  ]
}

Response Data (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 Data (Error)

{
  "MessageID": "717b3bec-5321-4bad-84c1-075bff67f92c",
  "TimeStamp": "2016-09-28T15:15:00+08:00",
  "Status": "Error",
  "ErrorMessage": "Invalid date provided."
}


Specification JSON 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).