Push Booking or Modification
Description
This Push Booking request message allows all booking data to be pushed from Levart to a PMS (Property Management System) system in JSON format.
The message describes a booking as a whole and may consist of a multiple of rooms that share a reference common reference number.
Generally this message is pushed in 'Real Time' as soon as it is imported into Levart.
This message is re-used for modifications, the only difference is the MessageType will be set to 'PushModification' and a 'PMSConfirmationNumber' will also be specified.
Bookings must be accepted
Levart will not allow a booking to be made if there is no inventory or there is a restriction in place etc. However if there is a descrepency between Levart and the PMS, the PMS must accept the booking and deal with it on their side (eg generate email to property etc).
The PushBooking and PushModification messages support 'multi-stays' that may contain more than one room and rate item (RoomStay) per booking. Please let Levart know if this is not possible.
Direction
Levart → PMS
Request (Where credit card details are supplied)
{
"Authentication": {
"Username": "abc",
"Password": "456"
},
"MessageID": "717b3bec-5321-4bad-84c1-075bff67f92c",
"TimeStamp": "2017-04-06T13:42:45+08:00",
"MessageType": "PushBooking",
"BookingData": {
"Reference": "93225945",
"ChannelName": "Levart",
"ChannelID": "LEV",
"Created": "2017-04-05T16:11:55+08:00",
"ArrivalDate": "2017-04-05",
"DepartureDate": "2017-04-09",
"ETA": "",
"Guest": {
"Prefix": "Dr",
"FirstName": "James",
"MiddleNames": "B",
"LastName": "Simmonds",
"Suffix": "PhD",
"Company": "Levart",
"Phone": "08 9382 8001",
"Mobile": "123234444",
"Fax":"08 9382 8001",
"Email": "andrew@levart.com.au",
"Address": "1A/18 Gibberd Road",
"City": "Perth",
"State": "WA",
"PostCode": "6021",
"Country": "Australia"
},
"RoomStays": [
{
"RoomTypeCode": "2BED",
"RoomTypeName": "Onslow Room",
"RateTypeCode": "134",
"RateTypeName": "Base Rate ABC",
"StartDate": "2017-04-05",
"EndDate": "2017-04-09",
"Adults": 2,
"Children": 0,
"Infants": 0,
"Quantity": 1,
"Total": "2400.00",
"GuestName": "James",
"DayRates": [
{
"Date": "2017-04-05",
"Rate": "600.00"
},
{
"Date": "2017-04-06",
"Rate": "600.00"
},
{
"Date": "2017-04-07",
"Rate": "600.00"
},
{
"Date": "2017-04-08",
"Rate": "600.00"
}
]
}
],
"Sundries": [
{
"Description": "Free Car Parking",
"Quantity": 1,
"TotalPrice": "0.00"
}
],
"Payment": {
"CreditCard":{
"CardType": "VI",
"CardNumber": "4444333322221111",
"CardName": "Andrew B Great",
"CardExpiry": "0519",
"CardCVV": ""
},
"Gateway": {
"GatewayName": "SecurePay",
"AmountTaken": 100.00,
"Reference": "ABC123",
}
},
"TotalPrice": "2400.00",
"PaymentTaken": "240.00",
"Currency": "AUD",
"Comments": "Payment of $240.00 was accepted by SecurePay (Reference 752014)"
}
}
Request (Where credit card details are not supplied)
The designation of "DirectBill" is not a indication as to how billing should be done, it is to indicate that credit card details are not suppled with the booking. This will occur when channels do not supply the details for various reasons.
{
"Authentication": {
"Username": "abc",
"Password": "456"
},
"MessageID": "717b3bec-5321-4bad-84c1-075bff67f92c",
"TimeStamp": "2017-04-06T13:42:45+08:00",
"MessageType": "PushBooking",
"BookingData": {
"Reference": "93225945",
"ChannelName": "Levart",
"ChannelID": "LEV",
"Created": "2017-04-05T16:11:55+08:00",
"ArrivalDate": "2017-04-05",
"DepartureDate": "2017-04-09",
"ETA": "",
"Guest": {
"Prefix": "Dr",
"FirstName": "James",
"MiddleNames": "B",
"LastName": "Simmonds",
"Suffix": "PhD",
"Company": "Levart",
"Phone": "08 9382 8001",
"Mobile": "123234444",
"Fax":"08 9382 8001",
"Email": "andrew@levart.com.au",
"Address": "1A/18 Gibberd Road",
"City": "Perth",
"State": "WA",
"PostCode": "6021",
"Country": "Australia"
},
"RoomStays": [
{
"RoomTypeCode": "2BED",
"RoomTypeName": "Onslow Room",
"RateTypeCode": "134",
"RateTypeName": "Base Rate ABC",
"StartDate": "2017-04-05",
"EndDate": "2017-04-09",
"Adults": 2,
"Children": 0,
"Infants": 0,
"Quantity": 1,
"Total": "2400.00",
"GuestName": "James",
"DayRates": [
{
"Date": "2017-04-05",
"Rate": "600.00"
},
{
"Date": "2017-04-06",
"Rate": "600.00"
},
{
"Date": "2017-04-07",
"Rate": "600.00"
},
{
"Date": "2017-04-08",
"Rate": "600.00"
}
]
}
],
"Sundries": [
{
"Description": "Free Car Parking",
"Quantity": 1,
"TotalPrice": "0.00"
}
],
"Payment":{
"DirectBill":{
"CompanyName":"Booking.com",
"CompanyCode":"BNG"
}
},
"TotalPrice": "2400.00",
"PaymentTaken": "0.00",
"Currency": "AUD",
"Comments": "High Floor Please"
}
}
Specification JSON Booking Request
Element | Num | Type | Description |
---|---|---|---|
Authentication | 1 | Object | Authentication object |
Authentication > Username | 1 | String | Unique username for the property. |
Authentication > Password | 1 | String | Unique password for the property. |
MessageID | 1 | String | Unique Message ID (UUID Format) |
TimeStamp | 1 | DateTime | Date and time of the transaction in ISO 8601 format. e.g. 2016-01-28T15:15:00+08:00 |
MessageType | 1 | String | Set to 'PushBooking' (for new Bookings) or 'PushModification' (for Modifications) |
BookingData | 1 | Object | Booking Data object. |
BookingData > Reference | 1 | String | Primary reference number for the booking. |
BookingData > ChannelName | 1 | String | Name of the channel where the booking is sourced. |
BookingData > ChannelID | 1 | String | ID code that Levart assigns to this particular channel. (Please see Appendix 2: Channel Codes) |
BookingData > Created | 1 | DateTime | Date and time when the booking was created (or modified) in ISO 8601 format. e.g. 2016-01-28T15:15:00+08:00 |
BookingData > ArrivalDate | 1 | Date | Date of arrival in YYYY-MM-DD format. |
BookingData > DepartureDate | 1 | Date | Date of departure in YYYY-MM-DD format. |
BookingData > ETA | 0..1 | String | Guest estimated time of arrival. (Free form text field) |
BookingData > Guest | 1 | Object | Primary Guest Details |
Guest > Prefix | 0..1 | String | Guest's name prefix e.g. Dr., Prof., Hon. etc. |
Guest > FirstName | 1 | String | Guest's First name |
Guest > MiddleName | 0..1 | String | Guest's Middle name |
Guest > LastName | 1 | String | Guest's Last name |
Guest > Suffix | 0..1 | String | Guest Name Suffix e.g. PhD, OBE etc. |
Guest > Company | 0..1 | String | Company name |
Guest > Phone | 0..1 | String | Guest's Phone Number |
Guest > Mobile | 0..1 | String | Guest's Mobile Phone Number |
Guest > Fax | 0..1 | String | Guest's Fax Number |
Guest > Email | 0..1 | String | Guest's Email Address |
Guest > Address | 0..1 | String | Guest's Address |
Guest > City | 0..1 | String | Guest's City |
Guest > State | 0..1 | String | Guest's state or province where applicable. |
Guest > PostCode | 0..1 | String | Guest's Post or ZIP code where applicable. |
Guest > Country | 0..1 | String | Guest's Country |
BookingData > RoomStays | 1..n | Array | Room Stay array, contains each Room Stay object. |
RoomStays n > RoomTypeCode | 1 | String | Room Type code e.g. '2BED' |
RoomStays n > RoomTypeName | 1 | String | Room Type Title e.g. '2 Bedroom Apartment' |
RoomStays n > RateTypeCode | 1 | String | Rate Type Code e.g. 1234 |
RoomStays n > RateTypeName | 1 | String | Rate Type Title e.g. 'Corporate Rate' |
RoomStays n > StartDate | 1 | Date | Start Date of Room Stay in YYYY-MM-DD format |
RoomStays n > EndDate | 1 | Date | End Date of Room Stay in YYYY-MM-DD format. (Exclusive of stay) |
RoomStays n > Adults | 1 | Integer | Number of Adults in Room |
RoomStays n > Children | 1 | Integer | Number of Children in Room |
RoomStays n > Infants | 1 | Integer | Number of Infants in Room |
RoomStays n > Quantity | 1 | Integer | Number of Room Stay |
RoomStays n > Total | 1 | Decimal | Total price of this item |
RoomStays n > GuestName | 0..1 | String | Guest associated with this particular room (Used on multi room bookings) |
RoomStays n > DayRates | 1..n | Array | DayRates array is a daily breakdown of the rates used for this room. |
DayRates n > Date | 1 | Date | Date that the rate applies for in YYYY-MM-DD format |
DayRates n > Rate | 1 | Decimal | The rate for the day e.g. '250.00' |
BookingData > Sundries | 0..n | Array | Array of sundry items |
Sundries n > Description | 1 | String | Description of the sundry item e.g. 'Champagne on Arrival', 'Secure car parking' etc |
Sundries n > Quantity | 1 | Integer | Number of items selected |
Sundries n > TotalPrice | 1 | Decimal | Total price of this sundry (all items) |
BookingData > Payment | 0..1 | Object | Payment types data object |
Payment > CreditCard | 0..1 | Object | Caredit card object |
CreditCard > CardType | 1 | String | The Card type code (Defined in Appendix 1: Credit Card Types) |
CreditCard > CardNumber | 1 | String | Credit Card number (May be hashed our or last 4 digits) |
CreditCard > CardName | 1 | String | Cardholders Name |
CreditCard > CardExpiry | 1 | String | Expiry of the credit card in MMYY format. e.g. '0920' for September 2020 |
CreditCard > CardCVV | 0..1 | String | Credit Card CVV (not often used) |
Payment > DirectBill | 0..1 | Object | Direct bill (If booking has no credit card details) |
DirectBill > CompanyName | 0..1 | String | Channel name. |
DirectBill > CompanyCode | 0..1 | String | Channel Code (See Appendix 2: Channel Codes) |
Gateway > GatewayName | 0..1 | String | Name of the Payment Gatewat i.e. SecurePay |
Gateway >AmountTaken | 0..1 | Decimal | Amount already billed. |
Gateway >Reference | 0..1 | String | Reference number or token |
BookingData > TotalPrice | 1 | Decimal | Total Price of the entire booking inclusive of all rooms, sundries, deposits and surcharges. |
BookingData > PaymentTaken | 1 | Decimal | Amount that has been secured via Payment Gateway at time of booking. |
BookingData > Currency | 1 | String | ISO 4217 Currency Code e.g. 'AUD', 'NZD', 'USD' |
BookingData > Comments | 1 | String | Free text field that may incorporate guest comments and any other relevant information. |
BookingData > PMSConfirmationNumber | 1 | String | (Modification Only) Exiting confirmation number to modify an already exported booking. |
Appendix 1: Credit Card Types
Card Name | Code |
---|---|
American Express | AX |
Carte Bleu | BL |
Carte Blanche | CB |
Diners Club | DN |
Discover Card | DS |
Eurocard | EC |
Japanese Credit Bureau Credit Card | JC |
Maestro | MA |
Master Card | MC |
Solo | SO |
Union Pay | CU |
Universal Air Travel Card | TP |
Visa Electron | VE |
VIsa | VI |
Appendix 2: Channel Codes
Channel Name | Code |
---|---|
AA Travel | AAT |
Agoda | AGO |
AOT Group | AOT |
Bed Bank | BdB |
Book It | BKIT |
BookDirect2Save | BDS |
BookEasy | ESY |
Booking.com | BNG |
BudgetPlaces | BP |
Ctrip | CTP |
Discover Australia | DW |
Entertainment Book (MyBookings) | EB |
ETourism | ET |
Expedia | EX |
Ezibed | EZ |
Genares | GRS |
Golden Chain | GC |
Gta | GTA |
Hotelbeds | HBDS |
HotelsCombined | HCB |
HotWire | HW |
Jetstar / Hooroo | JSTR |
Laterooms / Asiarooms | LRM |
LeisureCom | LC |
Levart Website Bookings | LEV |
Lido | LDO |
Need it Now | NIN |
Not1Night | N1N |
Orbitz | ORB |
OzAccom | OZAC |
Qantas ReadyRooms | QRR |
QuickBeds | QB |
Rewardscorp | RCO |
RoamFree | RF |
Stay247.com | 247 |
SynXis | SYN |
Travco | TRVCO |
TravelCLICK | TCK |
TripAdvisor | TA |
World Blue (M-Power) | WB |
Response (Success)
{
"MessageID": "717b3bec-5321-4bad-84c1-075bff67f92c",
"TimeStamp": "2017-04-06T13:42:45+08:00",
"Status": "Success",
"BookingReference": "93225945",
"PMSConfirmationNumber":"1234567"
}
Response (Error)
{
"MessageID": "717b3bec-5321-4bad-84c1-075bff67f92c",
"TimeStamp": "2017-04-06T13:42:45+08:00",
"Status": "Error",
"ErrorMessage": "Invalid username or password."
}
Specification JSON Booking 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 | The echo reply data on Success. |
BookingReference | 0..1 | String | Original Booking Reference number. |
PMSConfirmationNumber | 0..1 | String | The PMS Confirmation number. This will be used later to modify and/or cancel the booking. |