Prerequisites
Before building the showcase, make sure you have:- A working Quotation call. If not, follow the Quick start first.
- A hotel ID and a group ID for the property you display.
- An arrival date and a night count, picked by the guest earlier in the funnel.
How it works
The Stay quotation endpoint returns every room and rate combination available for the requested stay, grouped by rate plan, then by hotel, then by entity. Each entity carries the price, the availability count, the included articles, and any restriction or cancellation condition. You map the array of entities directly onto your comparison table: one entity, one row. A single call covers the whole catalogue. No iteration per room, no per-rate request.Build the showcase
The examples below assume the OAuth signing setup from the Quick start.
Request the quote for the chosen stay
Call the Stay quotation endpoint once with the arrival date, night count, and party. Use the
layout field to ask for only the properties your table displays. The example below covers a typical comparison view: status, availability, total price, included articles, and cancellation condition.Flatten the response into rows
The response nests entities under
ratePlans[*].hotels[*].entities[*]. Walk the tree once and collect every entity into a flat array. Each entity becomes one row in your comparison table.Render the available offers
For each row where
status is Available, display the room, rate, total price, and currency. The availability field tells you how many units remain, useful for a low-stock badge. The articles.includedArticles array lists meal plans and other mandatory services included in totalPrice.Tips
- Ask the layout for only what you display. The
layout.levels[*].propertiesfield controls how much detail the API computes per entity. AddingPromotionsor daily breakdowns inflates the payload and the processing time. Keep the list to the columns your interface actually shows. - Cache by quote key. The natural cache key is
(arrivalDate, nightCount, guests, hotelId, currency). A short cache cuts response time on repeat views, and the key changes the moment the guest picks new dates or a different party.
Related
Reference
Full schema for the Stay quotation endpoint.
Best practices
Caching, performance, and resilience patterns.