Skip to main content
Once a guest has picked a date and a length of stay, a side-by-side view of every bookable room and rate lets them compare prices and conditions at a glance. One Stay quotation call powers the whole showcase.

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

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

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

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

Surface unavailable rows with the right reason

For every row where status is NotAvailable, mark the entry as not bookable rather than hiding it. A row with status set to OnRequest is bookable once the hotel confirms availability: show it as an offer on request, not as unavailable. The unavailabilityReason tells you why, which lets you display a more helpful tooltip than a generic “unavailable”.

Tips

  • Ask the layout for only what you display. The layout.levels[*].properties field controls how much detail the API computes per entity. Adding Promotions or 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.

Reference

Full schema for the Stay quotation endpoint.

Best practices

Caching, performance, and resilience patterns.