Quote single
Get every room combination of one hotel. Use it for a hotel page, or when Quote marked a hotel quoteSingleNeeded. Never call it in parallel for many hotels.
When to use it
| Situation | Why Quote single |
|---|---|
A Quote result has quoteSingleNeeded: true | A supplier returned a partial set. The combinations you have are bookable; Quote single shows the rest. |
| The guest lands on a hotel page directly | The flow starts from one known hotel, so there is nothing to search. |
| A key expired during checkout | Re-quote the same hotel. See Re-quote after a key expires. |
It is not a search tool. For a list, a map or a destination, use Quote.
Hotel detail page
For a "see all rooms" page, group the combinations for display by room type, meal plan and refundability: rooms[].groupingRoomType, mealPlan.type and currentCancellationType.type. Show mealPlan.description as the label, because mixed plans collapse to one type.
type Combo = (typeof combinations)[number];
const groups = new Map<string, Combo[]>();
for (const c of combinations) {
const room = c.rooms.map((r) => r.groupingRoomType ?? r.description).join(' + ');
const k = [room, c.mealPlan.type, c.currentCancellationType?.type ?? 'UNKNOWN'].join(' | ');
groups.set(k, [...(groups.get(k) ?? []), c]);
}
// Show the cheapest combination of each group first.
for (const list of groups.values()) list.sort((a, b) => a.price.amount - b.price.amount);Re-quote after a key expires
A key expires 40 minutes after a quote response and 60 minutes after Confirm or Prebook. The token expires after 120 minutes. Guests who take their time over the guest form run into this. Show a countdown, and when the next step fails on an expired key or token:
Get a new token. A new token means a new flow.
Call Quote single for the same hotel, dates and rooms.
Find the same room, meal plan and refundability among the new combinations.
If the price or policy differs, show the change and get the guest's consent, as for a Confirm warning.
Continue with Confirm, using the new key.
Gotchas
tripTypeandfilterare optional, as in Quote. Without them you get a hotel-only search with the default filter.- Set your HTTP timeout as for Quote: at least
timeoutplus 30 seconds. - The response has no
remarks[]. Confirm returns the authoritative remarks. - Keys from Quote single are handled like Quote keys: opaque, server-side only, never stored long term.
Related
- Quote
- Confirm, the next step
- The booking flow
- Playbooks
Quote
Search up to 3,000 hotel codes or one destination for available rooms. Each combination in the response carries the combinationKey you send to Confirm.
Confirm
Lock the offer the guest picked. Confirm returns the first authoritative price and cancellation policy, the guest fields Prebook needs, and a new combinationKey.