Description
When a client application sends a correctly-formatted Get Inventory message Levart will respond with a corresponding response message indicating success or failure.
Direction
PMS → Levart
Request
{
"Authentication" : {
"Username": "abc",
"Password": "456"
},
"MessageType": "GetInventory",
"MessageID": "450c34c3-94bb-47a2-8f7c-8b866605da4e",
"pmsRoomTypeCode": "1BD",
"checkIn": "2020-01-30",
"checkOut": "2020-02-02",
"adults": 3,
"children": 0
}
Specification JSON Get Inventory 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 'GetInventory' |
MessageID | 1 | String | Message ID (UUID) |
pmsRoomTypeCode | 1 | String | The Room Type Code used by the PMS |
checkIn | 1 | Date | Check In date in YYYY-MM-DD format. |
checkOut | 1 | Date | Check Out date in YYYY-MM-DD format. |
adults | 1 | Integer | Number of Adults |
children | 1 | Integer | Number of Children |
Response (Success)
{
"822":[
{
"day":"2020-01-30",
"ldsRoomTypeID":"335",
"ldsRoomTypeName":"1 Bedroom Spa Apartment",
"pmsRoomTypeCode":"1BD",
"ldsRateName":"internet rate",
"totalAmount":"0.00",
"cta":false,
"ctd":false,
"closed":true,
"mlos":1
},
{
"day":"2020-01-31",
"ldsRoomTypeID":"335",
"ldsRoomTypeName":"1 Bedroom Spa Apartment",
"pmsRoomTypeCode":"1BD",
"ldsRateName":"internet rate",
"totalAmount":"250.50",
"cta":true,
"ctd":true,
"closed":false,
"mlos":3
},
{
"day":"2020-02-01",
"ldsRoomTypeID":"335",
"ldsRoomTypeName":"1 Bedroom Spa Apartment",
"pmsRoomTypeCode":"1BD",
"ldsRateName":"internet rate",
"totalAmount":"0.00",
"cta":false,
"ctd":false,
"closed":true,
"mlos":1
}
],
"823":[
{
"day":"2020-01-30",
"ldsRoomTypeID":"335",
"ldsRoomTypeName":"1 Bedroom Spa Apartment",
"pmsRoomTypeCode":"1BD",
"ldsRateName":"Minimum 2 nights",
"totalAmount":"0.00",
"cta":false,
"ctd":false,
"closed":true,
"mlos":1
},
{
"day":"2020-01-31",
"ldsRoomTypeID":"335",
"ldsRoomTypeName":"1 Bedroom Spa Apartment",
"pmsRoomTypeCode":"1BD",
"ldsRateName":"Minimum 2 nights",
"totalAmount":"0.00",
"cta":true,
"ctd":true,
"closed":true,
"mlos":2
},
{
"day":"2020-02-01",
"ldsRoomTypeID":"335",
"ldsRoomTypeName":"1 Bedroom Spa Apartment",
"pmsRoomTypeCode":"1BD",
"ldsRateName":"Minimum 2 nights",
"totalAmount":"0.00",
"cta":false,
"ctd":false,
"closed":true,
"mlos":2
}
],
"MessageID":"450c34c3-94bb-47a2-8f7c-8b866605da4e",
"TimeStamp":"2020-01-30T14:21:27+08:00"
}
Specification JSON Get Inventory Response (Success)
Element | Num | Type | Description |
---|
Array of Rates | 1..n | Object | Rate Object |
Rate > day | 1 | Date | Check In date in YYYY-MM-DD format. |
Rate > ldsRoomTypeID | 1 | String | Levart Internal id for the Room |
Rate > ldsRoomTypeName | 1 | String | Levart Room Name |
Rate > pmsRoomTypeCode | 1 | String | The Room Type Code used by the PMS |
Rate > ldsRateName | 1 | String | Levart Rate Name |
Rate > totalAmount | 1 | float | The Total amount for the day, including any extra guest charges, 0 if the Room or Rate is closed out |
Rate > cta | 1 | Boolean | true if this date is set to Closed to Arrival |
Rate > ctd | 1 | Boolean | true if this date is set to Closed to Departure |
Rate > closed | 1 | Boolean | True if the Room is closed out |
Rate > mlos | 1 | integer | Minimum length of stay for this day |
MessageID | 1 | string | Message ID (UUID) |
TimeStamp | 1 | date | TimeStamp of Response |
Response (Error)
{
"MessageID": "717b3bec-5321-4bad-84c1-075bff67f92c",
"TimeStamp": "2016-09-28T15:15:00+08:00",
"Status": "Error",
"ErrorMessage": "Unable to link rate codes"
}
Specification JSON Get Inventory Response (Error)
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). |
ErrorMessage | Description |
---|
Unable to link rate codes | The pmsRoomTypeCode specified in the Request is not linked to any rates in Levart |
Too few or too many adults | The number of Adults in the Request is outside the minimum and maximum that has been set on the rate in Levart |
Too many children | The number of Children in the Request is more than the minimum ser on the rate in Levart |
No rates for 822 internet rate | There is no rate setup in Levart for this rate type and the specified period in the Request |