It is important that the initial selections in the bookprocess, represent the item shown to the user in the search process. It is therefor important to understand how the Booking-Service determines its ‘packagePriceIndication’ and how to display prices for other selections.

When a packageCode is available, units and transports should have the same packageCode. All units from a single package code are grouped in a BookableAccommodation in the getBookableUnits response.

In this document we are going to assume you are working a single BookableAccommodation, the first, as they represent the cheapest.

.

PackagePriceIndication

The package price indication is always based on the cheapest possible units within the cheapest bookable accommodation using the cheapest possible flights. Exceptions to this rule is, when you provide a preferredTransportCode, that flight will be used instead of the cheapest, when you provide a preferredPackage code, the bookableAccommodation (and units) of that package-code will be used instead of the cheapest ones.

Make sure you selected the cheapest (or preferred) BookableAccommodation and its cheapest units, and the cheapest (or preferred) Transport (within the selected packageCode).

Presorted result

The first BookableAccommodation in the getBookableUnitsResponse, will be the one to select, it will either be the cheapest or will have the selectedPackageCode when provided. The first BookableTransport in the getBookableTransportResponse, will be the one to select, it will either be the cheapest or will have the selectedTransportCode. Note that the transportCode and packageCode from the DynpaxSearch/TravelSearch 3 will usally be the cheapest. In case of future updates where multiple flight or package options may be in the search result, this will prevent the wrong one to be selected.

Except for the preferred item being on top, all other accommodations and transports SHOULD be sorted on price. This includes the ‘fromTransports’. However the folowing logic should also work if the rest items weren’t sorted.

Displaying delta prices

Although all items returned by the getBookableUnits and getBookableTransports are prices, those prices are not meant to be shown to the user. Sometimes items are priced seperately, sometimes a flights base price is already included in unit prices. Always use delta prices.

Unit delta pricing

The PackagePriceIndication contains your base price, for your base selections. If your unit response contains for instance:

  • Unit A: €400,-
  • Unit B: €500,-
  • Unit C: €700,-

Then your selection options are for instance:

  • Unit A : selected
  • Unit B : + € 100,-
  • Unit C : + € 300,- Delta prices are calculated against the default (cheapest or preferred) options on which the packagePriceIndication is build.

Use the units from the first BookableAccommodation, if your interface supplies a package selection, you can work with an alternate BookableAccommodation.

Transport delta pricing

The PackagePriceIndication contains your base price, for your base selections. This includes transports. Delta prices, again are calculated against the default (cheapest or preferred) options on which the packagePriceIndication is build. When calculating delta’s keep in mind, that fromTransport have prices too, and the cheapest isn’t necessarily 0. If your transport response contains for instance:

  • to Flight A: €200,- , from Flight A1: €50,-, Flight A2: €150,-
  • to Flight B: €250,- , from Flight B1: €75,-, Flight B2: €100,-
  • to Flight C: €300,- , from Flight C1: €25,-, Flight C2: €50,-

With B and B1 being the preferred flight(s)

Then your initial to-transport selection is:

  • Flight B : selected
  • Flight A : – €75,-
  • Flight C : + €0,-
Selected base-flight (B/B1) = €250,- + €75,- = €325,-
Cheapest Flight A = €200,- + €50,- = €250,- (75 less than default)
Cheapest Flight C = €300,- + €25,- = €325,- (same as default)

And your initial from-transport selections is:

  • Flight B1 : selected
  • Flight B2 : + €25,- (B2:100 – B1:75)

It is up to you in which order you wish to offer these choices, whether you want to keep prefered items on top, or re-order on prices.

Use the transports with the same packageCode as the first one, as that represents the cheapest one and the same as the first BookableAccommodation. If your interface supplies a package selection, you can work with an alternate packageCode.

Package delta pricing

Sometimes the result of a getBookableUnits comes from multiple package for the same accomodation. In these case multiple BookableAccommodations will be returned, each with items from a unique packageCode. A BookableAccommodation contains some information on a package which can help to offer the users a choice.

It is advised not to mix units and transports from different packages, to make them bookable to you may offer a Package selection when applicable. In order to offer delta pricing here, you need the base prices of each BookableAccommodation and the cheapest Bookable Transports with the same packageCode.

As the base flight for packaged-products usally don’t come with a preferredTransport and are more often than not the cheapest packaged flights are set at €0,- for the first from and to transports, you can get away with using only the information in the getBookableUnitsResponse.

Use all BookableAccommodation objects to find all your packages. For instance your bookableUnitOccupations contain the following BookableAccommodations and BookableUnits: We have request 2 rooms for 2 adults:

 "bookableUnitOccupations" : [ {
    "sequence" : 0,
    "bookableAccommodations" : [ {
      "bookableUnits" : 
       [{"unitName" : "2-kamer appartement, Terras", "price" : 143600 }, 
        {"unitName" : "2-kamer appartement, Balkon", "price" : 144800}, 
        {"unitName" : "2-kamer appartement, Premium", "price" : 161600} ],
      "packageInfo" : {"code" : "AR00X2LPA0189402", "name" : "Gran Amadores,inclusief transfers, vanaf Amsterdam", "flags" : [ ] }
       [{"unitName" : "2-kamer appartement, Terras", "price" : 167600 }, 
        {"unitName" : "2-kamer appartement, Balkon", "price" : 168800}, 
        {"unitName" : "2-kamer appartement, Premium", "price" : 185600} ],
      "packageInfo" : {"code" : "AR2LPA01050094","name" : "Gran Amadores,incl. transfer, met Transavia (afw.","flags" : [ ]}
    } ],
    "sequence" : 1,
    "bookableAccommodations" : [ {
      "bookableUnits" : 
       [{"unitName" : "2-kamer appartement, Terras", "price" : 143600 }, 
        {"unitName" : "2-kamer appartement, Balkon", "price" : 144800}, 
        {"unitName" : "2-kamer appartement, Premium", "price" : 161600} ],
      "packageInfo" : {"code" : "AR00X2LPA0189402", "name" : "Gran Amadores,inclusief transfers, vanaf Amsterdam", "flags" : [ ] }
       [{"unitName" : "2-kamer appartement, Terras", "price" : 167600 }, 
        {"unitName" : "2-kamer appartement, Balkon", "price" : 168800}, 
        {"unitName" : "2-kamer appartement, Premium", "price" : 185600} ],
      "packageInfo" : {"code" : "AR2LPA01050094","name" : "Gran Amadores,incl. transfer, met Transavia (afw.","flags" : [ ]}
    } ],
  ]

The default package AR00X2LPA0189402 costs, cheapest units: 143600 + 143600 = € 2872,-; The second package, AR2LPA01050094 costs, cheapest units: € 3352,- You could now offer a select:

  • Package Gran Amadores,inclusief transfers, vanaf Amsterdam : selected
  • Package Gran Amadores,incl. transfer, met Transavia (afw. : + € 480,-;

Note that this package has a package indication price of €2.250,50, far less than the cheapest room, a further indication that you should NOT use the unit/transport prices as is, but only for their delta properties.