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

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

ElementNumTypeDescription
Authentication1ObjectAuthentication Object
Authentication > Username1StringUnique Username
Authentication > Password1StringUnique Password
MessageType1StringSet to 'GetInventory'
MessageID1StringMessage ID (UUID)
pmsRoomTypeCode1StringThe Room Type Code used by the PMS
checkIn1DateCheck In date in YYYY-MM-DD format.
checkOut1DateCheck Out date in YYYY-MM-DD format.
adults1IntegerNumber of Adults 
children1IntegerNumber 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)

ElementNumTypeDescription
Array of Rates1..nObjectRate Object
Rate > day1DateCheck In date in YYYY-MM-DD format.
Rate > ldsRoomTypeID1StringLevart Internal id for the Room
Rate > ldsRoomTypeName1StringLevart Room Name
Rate > pmsRoomTypeCode1StringThe Room Type Code used by the PMS
Rate > ldsRateName1StringLevart Rate Name
Rate > totalAmount1floatThe Total amount for the day, including any extra guest charges, 0 if the Room or Rate is closed out
Rate > cta1Booleantrue if this date is set to Closed to Arrival
Rate > ctd1Booleantrue if this date is set to Closed to Departure
Rate > closed1BooleanTrue if the Room is closed out
Rate > mlos1integerMinimum length of stay for this day
MessageID1stringMessage ID (UUID)
TimeStamp1dateTimeStamp 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)

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



ErrorMessageDescription
Unable to link rate codesThe pmsRoomTypeCode specified in the Request is not linked to any rates in Levart
Too few or too many adultsThe number of Adults in the Request is outside the minimum and maximum that has been set on the rate in Levart
Too many childrenThe number of Children in the Request is more than the minimum ser on the rate in Levart
No rates for 822 internet rateThere is no rate setup in Levart for this rate type and the specified period in the Request