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

ElementNumTypeDescription
Authentication1ObjectAuthentication object
Authentication > Username1StringUnique username for the property.
Authentication > Password1StringUnique password for the property.
MessageID1StringUnique Message ID (UUID Format)
TimeStamp1DateTimeDate and time of the transaction in ISO 8601 format. e.g. 2016-01-28T15:15:00+08:00
MessageType1StringSet to 'PushBooking' (for new Bookings) or 'PushModification' (for Modifications)
BookingData1ObjectBooking Data object.
BookingData > Reference1StringPrimary reference number for the booking.
BookingData > ChannelName1StringName of the channel where the booking is sourced.
BookingData > ChannelID1StringID code that Levart assigns to this particular channel. (Please see Appendix 2: Channel Codes)
BookingData > Created1DateTimeDate and time when the booking was created (or modified) in ISO 8601 format. e.g. 2016-01-28T15:15:00+08:00
BookingData > ArrivalDate1DateDate of arrival in YYYY-MM-DD format.
BookingData > DepartureDate1DateDate of departure in YYYY-MM-DD format.
BookingData > ETA0..1StringGuest estimated time of arrival. (Free form text field)
BookingData > Guest1ObjectPrimary Guest Details
Guest > Prefix0..1StringGuest's name prefix e.g. Dr., Prof., Hon. etc.
Guest > FirstName1StringGuest's First name
Guest > MiddleName0..1StringGuest's Middle name
Guest > LastName1StringGuest's Last name
Guest > Suffix0..1StringGuest Name Suffix e.g. PhD, OBE etc.
Guest > Company0..1StringCompany name
Guest > Phone0..1StringGuest's Phone Number
Guest > Mobile0..1StringGuest's Mobile Phone Number
Guest > Fax0..1StringGuest's Fax Number
Guest > Email0..1StringGuest's Email Address
Guest > Address0..1StringGuest's Address
Guest > City0..1StringGuest's City
Guest > State0..1StringGuest's state or province where applicable.
Guest > PostCode0..1StringGuest's Post or ZIP code where applicable.
Guest > Country0..1StringGuest's Country
BookingData > RoomStays1..nArrayRoom Stay array, contains each Room Stay object.
RoomStays n > RoomTypeCode1StringRoom Type code e.g. '2BED'
RoomStays n > RoomTypeName1StringRoom Type Title e.g. '2 Bedroom Apartment'
RoomStays n > RateTypeCode1StringRate Type Code e.g. 1234
RoomStays n > RateTypeName1StringRate Type Title e.g. 'Corporate Rate'
RoomStays n > StartDate1DateStart Date of Room Stay in YYYY-MM-DD format
RoomStays n > EndDate1DateEnd Date of Room Stay in YYYY-MM-DD format. (Exclusive of stay)
RoomStays n > Adults1IntegerNumber of Adults in Room
RoomStays n > Children1IntegerNumber of Children in Room
RoomStays n > Infants1IntegerNumber of Infants in Room
RoomStays n > Quantity1IntegerNumber of Room Stay
RoomStays n > Total1DecimalTotal price of this item
RoomStays n > GuestName0..1StringGuest associated with this particular room (Used on multi room bookings)
RoomStays n > DayRates1..nArrayDayRates array is a daily breakdown of the rates used for this room.
DayRates n > Date1DateDate that the rate applies for in YYYY-MM-DD format
DayRates n > Rate1DecimalThe rate for the day e.g. '250.00'
BookingData > Sundries0..nArrayArray of sundry items
Sundries n > Description1StringDescription of the sundry item e.g. 'Champagne on Arrival', 'Secure car parking' etc
Sundries n > Quantity1IntegerNumber of items selected
Sundries n > TotalPrice1DecimalTotal price of this sundry (all items)
BookingData > Payment0..1ObjectPayment types data object
Payment > CreditCard0..1ObjectCaredit card object
CreditCard > CardType1StringThe Card type code (Defined in Appendix 1: Credit Card Types)
CreditCard > CardNumber1StringCredit Card number (May be hashed our or last 4 digits)
CreditCard > CardName1StringCardholders Name
CreditCard > CardExpiry1StringExpiry of the credit card in MMYY format. e.g. '0920' for September 2020
CreditCard > CardCVV0..1StringCredit Card CVV (not often used)
Payment > DirectBill0..1ObjectDirect bill (If booking has no credit card details)
DirectBill > CompanyName0..1StringChannel name.
DirectBill > CompanyCode0..1StringChannel Code (See Appendix 2: Channel Codes)
Gateway > GatewayName0..1StringName of the Payment Gatewat i.e. SecurePay
Gateway >AmountTaken0..1DecimalAmount already billed.
Gateway >Reference0..1StringReference number or token
BookingData > TotalPrice1DecimalTotal Price of the entire booking inclusive of all rooms, sundries, deposits and surcharges.
BookingData > PaymentTaken1DecimalAmount that has been secured via Payment Gateway at time of booking.
BookingData > Currency1StringISO 4217 Currency Code e.g. 'AUD', 'NZD', 'USD'
BookingData > Comments1StringFree text field that may incorporate guest comments and any other relevant information.
BookingData > PMSConfirmationNumber1String(Modification Only) Exiting confirmation number to modify an already exported booking.

Appendix 1: Credit Card Types

Card NameCode
American ExpressAX
Carte BleuBL
Carte BlancheCB
Diners ClubDN
Discover CardDS
EurocardEC
Japanese Credit Bureau Credit CardJC
MaestroMA
Master CardMC
SoloSO
Union PayCU
Universal Air Travel CardTP
Visa ElectronVE
VIsaVI

Appendix 2: Channel Codes

Channel NameCode
AA TravelAAT
AgodaAGO
AOT GroupAOT
Bed BankBdB
Book ItBKIT
BookDirect2SaveBDS
BookEasyESY
Booking.comBNG
BudgetPlacesBP
CtripCTP
Discover AustraliaDW
Entertainment Book (MyBookings)EB
ETourismET
ExpediaEX
EzibedEZ
GenaresGRS
Golden ChainGC
GtaGTA
HotelbedsHBDS
HotelsCombinedHCB
HotWireHW
Jetstar / HoorooJSTR
Laterooms / AsiaroomsLRM
LeisureComLC
Levart Website BookingsLEV
LidoLDO
Need it NowNIN
Not1NightN1N
OrbitzORB
OzAccomOZAC
Qantas ReadyRoomsQRR
QuickBedsQB
RewardscorpRCO
RoamFreeRF
Stay247.com247
SynXisSYN
TravcoTRVCO
TravelCLICKTCK
TripAdvisorTA
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

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..1StringThe echo reply data on Success.
BookingReference0..1StringOriginal Booking Reference number.
PMSConfirmationNumber0..1StringThe PMS Confirmation number. This will be used later to modify and/or cancel the booking.