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
Element | Num | Type | Description |
---|---|---|---|
Authentication | 1 | Object | Authentication Object |
Authentication > Username | 1 | String | Unique Username |
Authentication > Password | 1 | String | Unique Password |
MessageType | 1 | String | Set to 'SetRates' |
MessageID | 1 | String | Message ID (UUID) |
TimeStamp | 1 | DateTime | Date and time of the transaction in ISO 8601 format. e.g. 2016-01-28T15:15:00+08:00 |
RateData | 1..n | Array | RateData array, contains the contents of what is required to be updated. |
RateData n > RoomTypeCode | 1 | String | The Room Type Code or ID for the Room to be updated. |
RateData n > RateTypeCode | 1 | String | The Rate Type Code or ID that us used by your system for this Rate Type |
RateData n > StartDate | 1 | Date | Start date in YYYY-MM-DD format. |
RateData n > EndDate | 1 | Date | End date in YYYY-MM-DD format (Inclusive). |
RateData n > RateValue | 1 | Decimal | Integer >= 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
Element | Num | Type | Description |
---|---|---|---|
MessageID | 1 | String | Unique Message ID (Same as 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 | Messages array of any updates performed (usually in delta format). |