Get Inventory
Description
When a client application sends a correctly-formatted Get Inventory message Levart will respond with a corresponding response message indicating success or failure.
This call is intended to be used to request a small range of data on a adhoc basis. An example would be to quote guests directly in the PMS
Direction
PMS → Levart
POST /rooms/v1/get-inventory
Endpoint
Specification JSON Request
| Element | Num | Type | Required | Description |
|---|---|---|---|---|
| MessageType | 1 | String | Yes | Set to 'GetInventory' |
| MessageID | 1 | String | Yes | Message ID (UUID) |
| pmsRoomTypeCode | 1 | String | Yes | The Room Type Code used by the PMS |
| checkIn | 1 | Date | Yes | Check In date in YYYY-MM-DD format. |
| checkOut | 1 | Date | Yes | Check Out date in YYYY-MM-DD format. |
| adults | 1 | Integer | Yes | Number of Adults |
| children | 1 | Integer | No | Number of Children (Defaults to 0) |
Request Data
{
"MessageType": "GetInventory",
"MessageID": "717b3bec-5321-4bad-84c1-075bff67f92c",
"pmsRoomTypeCode": "room2",
"checkIn": "2025-11-18",
"checkOut": "2025-11-21",
"adults": 3,
"children": 0
}Response Data (Success)
{
"MessageID": "717b3bec-5321-4bad-84c1-075bff67f92c",
"TimeStamp": "2025-11-06T16:03:08+08:00",
"InventoryData": {
"2422": [
{
"day": "2025-11-18",
"ldsRoomTypeID": "464",
"ldsRoomTypeName": "Singel Room",
"pmsRoomTypeCode": "room2",
"ldsRateName": "Clone testing",
"totalAmount": 225.5,
"cta": false,
"ctd": false,
"closed": false,
"mlos": 1
},
{
"day": "2025-11-19",
"ldsRoomTypeID": "464",
"ldsRoomTypeName": "Singel Room",
"pmsRoomTypeCode": "room2",
"ldsRateName": "Clone testing",
"totalAmount": 226.5,
"cta": false,
"ctd": false,
"closed": false,
"mlos": 1
},
{
"day": "2025-11-20",
"ldsRoomTypeID": "464",
"ldsRoomTypeName": "Singel Room",
"pmsRoomTypeCode": "room2",
"ldsRateName": "Clone testing",
"totalAmount": 251,
"cta": false,
"ctd": false,
"closed": false,
"mlos": 1
}
],
"2119": [
{
"Status": "Error",
"ErrorMessage": "No rates for 2119 Guest Rate"
}
],
"2208": [
{
"day": "2025-11-18",
"ldsRoomTypeID": "464",
"ldsRoomTypeName": "Singel Room",
"pmsRoomTypeCode": "room2",
"ldsRateName": "test1",
"totalAmount": 406.5,
"cta": false,
"ctd": false,
"closed": false,
"mlos": 1
},
{
"day": "2025-11-19",
"ldsRoomTypeID": "464",
"ldsRoomTypeName": "Singel Room",
"pmsRoomTypeCode": "room2",
"ldsRateName": "test1",
"totalAmount": 409.5,
"cta": false,
"ctd": false,
"closed": false,
"mlos": 1
},
{
"day": "2025-11-20",
"ldsRoomTypeID": "464",
"ldsRoomTypeName": "Singel Room",
"pmsRoomTypeCode": "room2",
"ldsRateName": "test1",
"totalAmount": 483,
"cta": false,
"ctd": false,
"closed": false,
"mlos": 1
}
]
}
}Response Data (Error)
{
"MessageID": "717b3bec-5321-4bad-84c1-075bff67f92c",
"TimeStamp": "2016-09-28T15:15:00+08:00",
"Status": "Error",
"ErrorMessage": "Unable to link rate codes"
}| 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 |