referenceRateCode set returns only the rate the code unlocks, ready to render.
Prerequisites
Before building the landing page, 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 the campaign points at.
- An arrival date and a night count, supplied by the campaign URL or a small form on the page.
- A rate code or private offer code (for example
AUTUMN2026), shared by the revenue manager who set the offer up.
How it works
The Stay quotation endpoint accepts areferenceRateCode filter on the ratePlans entry. With it set, the API restricts the quote to the matching rate plan or private offer code: a public rate code like BAR returns the public offer, a private code like AUTUMN2026 returns the campaign-only or negotiated offer. Without it, the endpoint returns the whole catalogue, which is the Bookable offers showcase pattern.
Two outcomes worth handling on the page:
- Code applies: the response carries one rate plan with one or more entities. Render the offer.
- Code does not apply (expired, restricted to other dates, wrong hotel, wrong party): the response is a
200 OKwith emptyratePlansor noAvailableentity. Show a fallback explaining the code is not valid for the chosen stay, rather than a generic error.
TaxesAndFees to the layout brings the tax breakdown with them, so the page stays one round trip away from the conversion CTA.
Build the landing page
The examples below assume the OAuth signing setup from the Quick start.
Quote the stay with the code applied
Call the Stay quotation endpoint once with the chosen stay and the rate code on
ratePlans[].referenceRateCode. Keep layout.levels[*].properties to the columns the landing page actually displays.Detect a missing or invalid code
A
200 OK with no rate plan, or a rate plan with no Available entity, means the code does not apply to the chosen stay. Treat it as a UX state, not an error: explain that the code is not valid for these dates or this hotel, and offer the public catalogue as a fallback.Tips
- Pass the code through the URL, not a form. A campaign link like
https://book.example.com/offer?code=AUTUMN2026&arrival=2026-12-07&nights=3lets the page render the offer in one round-trip with no friction. Reserve a form for cases where the guest types a code into an existing booking funnel. - Log the code use even when no offer comes back. Marketing teams need both numbers: how many people landed on the page with a given code, and how many of those got a valid offer. The gap surfaces an expired or misconfigured offer faster than a help ticket.
Related
Reference
Full schema for the Stay quotation endpoint.
Best practices
Caching, performance, and resilience patterns.