Skip to content

Prices and availability

How to show a live price, and whether rooms are free, in your site’s own HTML. Each section is one thing you may want to show, with the shortest markup that does it.

Everything here needs only the script tag. Every price comes from the same availability the booking window reads, for the same stay and party. The ids in the examples are placeholders: data-room and data-plan take the property’s own ids — see Room type and rate plan ids.

One price in a sentence

data-pms-text on any element of yours prints one live value. Name the room with data-room and the stay on the same element.

<p>
The Garden Suite this weekend:
<span data-pms-text="price" data-room="00000000-0000-0000-0000-000000000000" data-stay="weekend">from €240</span>
</p>

What you write inside is your fallback. It shows until the value arrives, and it comes back whenever there is no value for the stay the element asks for: the answer is on its way, the request failed, or the room cannot be sold for that stay. So write words that read well by themselves.

AttributeValuesWhat it does
data-pms-texta field name — see the lists belowReplaces the text of the element with one live value. What you wrote inside stays until the value arrives, and comes back whenever there is no value for the stay the element asks for now: the answer still on its way, a failed request, a room that cannot be sold.
data-roomroom type idThe room the value belongs to. Needed for a room's value.
data-stay"tomorrow" | "weekend" | "search"The stay the value is priced for. search: the dates and the party of the search form on the page — the form the element is inside, else the page's first form with a data-pms-dates or data-pms-guests button, else its first ready search form. The value is priced once the search is complete — both dates, an age for every child — and the guest has stopped changing it; until then your own text stands.
data-check-in, data-check-outYYYY-MM-DDOr exactly these dates. With neither: one night from tomorrow. With data-stay="search": the dates priced until the search is complete.
data-planrate plan idThe price of this rate plan only. Left out: the room's lowest price.

price is the room’s lowest price for the stay, over the rate plans that can be paid for online. With data-plan it is the price of that plan only.

The cheapest room for a stay

Leave data-room out and ask for fromPrice: the price of the stay in the cheapest room that can be sold. With data-plan, the cheapest on that rate plan.

<p>
Rooms this weekend
<span data-pms-text="fromPrice" data-stay="weekend">at our best rate</span> for the stay
</p>
FieldWhat it prints
fromPriceThe price of the stay in the cheapest room that can be sold, formatted: €102.00.
fromPricePerNightThat price divided by the nights.
checkInThe arrival date, YYYY-MM-DD — or as data-format says.
checkOutThe departure date, YYYY-MM-DD — or as data-format says.
nightsThe length of the stay in words: 2 nights.

checkIn, checkOut and nights are printed with no room named only when a stay is named — on the element itself, or on the data-pms-if element it sits in. A bare data-pms-text="checkIn" outside a search form is left alone.

A price per night

pricePerNight for a room, fromPricePerNight with no room named. Both are the price of the stay divided by its nights, so taxes charged on top are in them too.

<span data-pms-text="fromPricePerNight" data-stay="weekend">from €95</span> a night
<span data-pms-text="pricePerNight" data-room="00000000-0000-0000-0000-000000000000" data-stay="weekend">from €120</span> a night

For which stay and which party

A price is always for one stay and one party. Both are written on the element that prints it.

<!-- a named stay, counted from the visitor's today -->
<span data-pms-text="fromPrice" data-stay="tomorrow">ask us</span>
<span data-pms-text="fromPrice" data-stay="weekend">ask us</span>
<!-- exact dates; check-out is the day of departure -->
<span data-pms-text="fromPrice" data-check-in="2026-12-24" data-check-out="2026-12-27">ask us</span>
<!-- two adults and two children, aged 6 and 9 -->
<span data-pms-text="fromPrice" data-stay="weekend" data-adults="2" data-child-ages="6,9">ask us</span>
AttributeValuesWhat it does
data-stay"tomorrow" | "weekend" | "search"The stay the value is priced for. search: the dates and the party of the search form on the page — the form the element is inside, else the page's first form with a data-pms-dates or data-pms-guests button, else its first ready search form. The value is priced once the search is complete — both dates, an age for every child — and the guest has stopped changing it; until then your own text stands.
data-check-in, data-check-outYYYY-MM-DDOr exactly these dates. With neither: one night from tomorrow. With data-stay="search": the dates priced until the search is complete.
data-adults1–20 — default 2The party it is priced for.
data-child-agesages 0–17, comma-separatedThe children it is priced for, one age per child. The list counts only whole: with an entry that is not a whole number from 0 to 17, with more than eight ages, or with a child the property books as an adult, it is ignored and the party is the adults alone.
  • With no stay named, the price is for one night from tomorrow.
  • With no party named, it is for two adults.
  • A fixed date in markup goes stale. Prefer a named stay, or follow the search form.
  • A child is priced by its real age. A list of ages counts only whole: one bad entry, or one child the property books as an adult, drops every child, and the price is for the adults alone — see Children.
  • When a stay attribute changes while the page is open — a framework swaps data-check-in, say — the value is priced again by itself. The old value is removed at once; your own text stands until the new one arrives.

A price that follows the search form

data-stay="search" on a value, a rooms repeat or a data-pms-book link takes the dates and the party from the search form on the page.

<form class="stay-search" method="get" action="/booking">
<button type="button" class="stay-field" data-pms-dates>
<span data-pms-text="checkIn">Check-in</span> –
<span data-pms-text="checkOut">Check-out</span>
</button>
<button type="button" class="stay-field" data-pms-guests>
<span data-pms-text="guests">2 adults</span>
</button>
<button class="stay-go">Search</button>
</form>
<p class="rate">
The Garden Suite for your dates:
<span data-pms-text="price" data-room="00000000-0000-0000-0000-000000000000" data-stay="search">pick your dates</span>
<a href="/booking" data-pms-book data-room="00000000-0000-0000-0000-000000000000" data-stay="search">Book it</a>
</p>
<div class="rooms">
<template data-pms-each="rooms" data-stay="search">
<a class="room" href="{{bookUrl}}">
<h3>{{name}}</h3>
<p data-pms-if="available">{{price}} for {{nights}}</p>
<p data-pms-if="!available">Not on these dates</p>
</a>
</template>
</div>
AttributeValuesWhat it does
data-stay"tomorrow" | "weekend" | "search"The stay the value is priced for. search: the dates and the party of the search form on the page — the form the element is inside, else the page's first form with a data-pms-dates or data-pms-guests button, else its first ready search form. The value is priced once the search is complete — both dates, an age for every child — and the guest has stopped changing it; until then your own text stands.
data-check-in, data-check-outYYYY-MM-DDOr exactly these dates. With neither: one night from tomorrow. With data-stay="search": the dates priced until the search is complete.
data-stay"tomorrow" | "weekend" | "search"The stay the rooms are priced for. search: the dates and the party of the search form on the page, chosen as for a value; every bookUrl carries them. No card is drawn until the search is complete.
data-stay"tomorrow" | "weekend" | "search"A stay counted from the visitor's today. tomorrow: one night from tomorrow. weekend: the coming Friday to Sunday — on a Saturday, that Saturday to Sunday. search: the dates and the party of the search form on the page — the form the link is inside, else the page's first form with a data-pms-dates or data-pms-guests button, else its first ready search form. The address follows every pick; while the search is not complete it carries no dates.
data-pms-loadingno valuePresent on a value, a rooms template or an element with data-pms-if while its answer is on the way. Removed when the answer has landed or the request has failed.
data-pms-texta field name — see the lists belowReplaces the text of the element with one live value. What you wrote inside stays until the value arrives, and comes back whenever there is no value for the stay the element asks for now: the answer still on its way, a failed request, a room that cannot be sold.
data-roomroom type idThe room the value belongs to. Needed for a room's value.
data-pms-bookno valueMakes the element a way into the booking. An <a> gets its href; any other element goes there on click.
data-pms-each"rooms"Repeats what is inside the template once per room type, right after the template.
data-pms-if"available" | "scarce" | a field | field=text — with "!" in front for the oppositeKeeps the element only when the room can be sold for the stay (available), when 1 to 3 are left (scarce), or when the named field has a value. One comparison is allowed, equality: reasonKind=min-stay holds when the field prints exactly that text. With ! in front: the opposite of the whole test. Inside a list, a field of that row counts too. Otherwise the element is left out — inside a template it is removed, not hidden.
data-pms-datesno value | "check-out"Opens our calendar when pressed. With the value check-out it opens on the check-out date.
data-pms-guestsno valueOpens our guests panel under the element.
  • Which form. The form the element is inside; else the page’s first form with a data-pms-dates or data-pms-guests button; else its first ready search form. With no search form on the page the element keeps your own text.
  • When it is priced. Only for a complete search — both dates, and an age for every child — and about half a second after the guest stops changing it.
  • Until then. Your own text stands, a repeat draws no card and a link carries no dates. If the element also has data-check-in and data-check-out, those dates are priced meanwhile, with the element’s own party.
  • When the search changes. The price before is removed at once — never the last stay’s price under new dates — and the element carries data-pms-loading until the new one is in.
  • The party is the form’s. data-adults and data-child-ages on the element are not read once the search is complete. data-plan stays the element’s own.
  • The link. Its address follows every pick. A card’s bookUrl and a following link carry exactly the stay and party the price was asked for.

data-stay="search" works on your own elements only. The ready book button and offer table do not take it, and neither does rooms(): from JavaScript, read the form with getSearch() and pass its dates on — see JavaScript.

A card per room, with its rate plans

A <template data-pms-each="rooms"> is repeated once per room type, right after itself. Inside it, <template data-pms-each="plans"> repeats over that room’s rate plans.

<div class="rooms">
<template data-pms-each="rooms" data-stay="weekend">
<article class="room">
<h3>{{name}}</h3>
<p data-pms-if="available">from {{pricePerNight}} a night · {{price}} for {{nights}}</p>
<p data-pms-if="!available">{{reason}}</p>
<ul>
<template data-pms-each="plans">
<li>{{name}} — {{price}} <a href="{{bookUrl}}">Book</a></li>
</template>
</ul>
</article>
</template>
</div>
AttributeValuesWhat it does
data-pms-each"rooms"Repeats what is inside the template once per room type, right after the template.
data-stay"tomorrow" | "weekend" | "search"The stay the rooms are priced for. search: the dates and the party of the search form on the page, chosen as for a value; every bookUrl carries them. No card is drawn until the search is complete.
data-check-in, data-check-outYYYY-MM-DDOr exactly these dates. With neither: one night from tomorrow. With data-stay="search": the dates priced until the search is complete.
data-adults1–20 — default 2The party they are priced for.
data-child-agesages 0–17, comma-separatedThe children they are priced for, one age per child; every bookUrl carries them. The list counts only whole: with an entry that is not a whole number from 0 to 17, with more than eight ages, or with a child the property books as an adult, it is ignored and the party is the adults alone.
data-planrate plan idPrices of this rate plan only; rooms it does not sell are left out.
data-roomsroom type ids, comma-separatedOnly these rooms, in this order.
data-limita whole number above 0At most this many rooms.
{{field}}a room fieldReplaced by the room's value, in text and in attribute values; a name that is not a field is left as written. Never filled, braces left as you wrote them: an event handler (onclick and every other on…), style, srcdoc, and anything in a <script> or <style> element. An address (href, src, srcset, action, formaction, poster, data, ping) is filled, and removed if it would then be anything but a relative or http(s) address.
data-pms-if"available" | "scarce" | a field | field=text — with "!" in front for the oppositeKeeps the element only when the room can be sold for the stay (available), when 1 to 3 are left (scarce), or when the named field has a value. One comparison is allowed, equality: reasonKind=min-stay holds when the field prints exactly that text. With ! in front: the opposite of the whole test. Inside a list, a field of that row counts too. Otherwise the element is left out — inside a template it is removed, not hidden.
data-pms-each="plans"Repeats over the room's rate plans — only the named one when the rooms template has data-plan.
data-pms-itemno valueMarks every element a repeat added.
data-pms-available"true" | "false"Whether that room can be sold for the stay: it has a rate plan for it that can be paid for online.
  • Inside a template data-pms-if removes the element when the test does not hold. It does not use hidden there, so do not write hidden on it: an element that is kept stays hidden.
  • A room that cannot be sold still gets a card, with data-pms-available="false", an empty price and a reason. With data-plan on the rooms template, rooms that plan does not sell are left out.
  • The cards are drawn again when a stay attribute of the template changes; the cards of the stay before are removed at once.
  • If the prices cannot be read, no card is drawn. Put your own fallback beside the template.

The full worked card — photographs, amenities, a badge — is on Offer prices.

Fields of a room

For {{…}}, data-pms-if and data-pms-text in a rooms template, and for data-pms-text or data-pms-if together with data-room anywhere.

FieldWhat it prints
nameThe room type's name, in the page's language.
descriptionIts description as the hotel wrote it. It may hold Markdown marks.
photoThe address of its first photograph. Empty when it has none.
amenitiesIts amenities' names, comma-separated.
areaIts size in m², as a number. Empty when not set.
maxGuestsThe most guests it takes.
leftHow many of this room are left for the stay. Empty when the room cannot be sold.
minStayThe minimum stay in nights — known only when the room is refused for this stay for being too short. Empty otherwise: a room on sale states none.
reasonKindWhy the room cannot be sold for the stay, as one word for your CSS and for data-pms-if: party (more guests than it takes), sold-out, closed, no-arrival, no-departure, min-stay, max-stay, stay-length, min-advance, max-advance, or other. Empty when it can be sold.
reasonThe same, as the sentence the booking window shows for it, in the page's language: Minimum stay 4 nights for these dates. Empty when the room can be sold.
maxStayThe maximum stay in nights — known only when the room is refused for this stay for being too long. Empty otherwise.
minAdvanceHow many days ahead the room must be booked — known only when it is refused for being booked too late. Empty otherwise.
maxAdvanceHow many days ahead at most the room can be booked — known only when it is refused for being booked too early. Empty otherwise.
stayLengthsThe only lengths of stay the room takes from this arrival, in nights, comma-separated: 3, 5, 7 — known only when it is refused for that. Empty otherwise.
priceThe price of the stay, formatted in the property's currency — the whole price the booking page charges: VAT and city tax charged on top of the room rate are already in it. Empty when the room cannot be sold.
pricePerNightThat price divided by the nights.
priceAmountThat price as a plain number in the property's currency: 306. Empty when the room cannot be sold. Do not convert it: the guest is charged in that currency.
vatAddedThe VAT charged on top of the room rate, formatted — on the rate plan the price is for. It is already inside price: never add it. Empty when the rate includes VAT.
cityTaxThe city tax collected on top of the room rate, formatted. It is already inside price: never add it. Empty when the rate includes it or there is none.
taxesThe one line the booking window prints about taxes charged on top: VAT added · + €6.00 city tax. Empty when nothing is charged on top.
depositPercentThe percent of the booking that rate plan asks for at booking, as a number: 30. Empty when its deposit is not a percent — a fixed amount, a number of nights, or none.
currencyThe currency code: EUR.
nightsThe length of the stay in words: 2 nights.
checkInThe arrival date, YYYY-MM-DD — or as data-format says.
checkOutThe departure date, YYYY-MM-DD — or as data-format says.
checkInDayThe day of the month, with no leading zero: 8.
checkInMonthThe month's name: December.
checkInMonthShortThe month's short name: Dec.
checkInWeekdayThe weekday's name: Tuesday.
checkInYearThe year: 2026.
checkOutDayThe day of the month, with no leading zero: 8.
checkOutMonthThe month's name: December.
checkOutMonthShortThe month's short name: Dec.
checkOutWeekdayThe weekday's name: Tuesday.
checkOutYearThe year: 2026.
bookUrlThe address of your booking page with this stay and room — and the priced rate plan, when the room can be sold.
idThe room type's id.
roomIdThe room type's id — the same as id, and still the room's inside a list of plans.
roomNameThe room type's name — the same as name, and still the room's inside a list of plans.

Fields of a rate plan

Inside <template data-pms-each="plans">. The room’s own fields stay readable there; a plan’s field of the same name wins, and roomName and roomId always mean the room.

FieldWhat it prints
nameThe rate plan's name.
descriptionThe plan's own description. Empty when it has none.
priceThe stay's price on this plan, formatted — the whole price the booking page charges, taxes charged on top included.
pricePerNightThat price divided by the nights.
priceAmountThat price as a plain number in the property's currency. Do not convert it.
depositWhat is paid at booking, formatted. Empty when the plan asks for nothing up front. When and how the rest is paid is in the plan's terms — do not state it yourself.
depositPercentThe percent of the booking the plan asks for at booking, as a number: 30. Empty when its deposit is not a percent.
vatAddedThe VAT charged on top of the room rate, formatted. It is already inside price: never add it. Empty when the rate includes VAT.
cityTaxThe city tax collected on top of the room rate, formatted. It is already inside price: never add it. Empty when the rate includes it or there is none.
taxesThe one line the booking window prints about taxes charged on top: VAT added · + €6.00 city tax. Empty when nothing is charged on top.
cancellationThe cancellation terms in one line — dated for this arrival when the engine dates them. Empty when the plan states none.
includesWhat the rate includes, the names joined with commas. Empty when it states none.
bookUrlThe address of your booking page with this stay, this room and this plan.
idThe rate plan's id.
indexThe row's number in the list, from 1.

Show something only when rooms are free

data-pms-if on any element of yours shows or hides it by the live answer for the stay written on it. It sets and removes the hidden attribute; it never removes the element.

HTML
<p class="banner" data-pms-if="available" data-room="00000000-0000-0000-0000-000000000000" data-stay="weekend" hidden>
The Garden Suite is free this weekend:
<span data-pms-text="price">ask us</span> for <span data-pms-text="nights">the stay</span>.
<a href="/booking" data-pms-book>Book it</a>
</p>
<p class="banner" data-pms-if="!available" data-stay="weekend" hidden>
We are full this weekend.
</p>
AttributeValuesWhat it does
data-pms-if"available" | "scarce" | a field | field=text — with "!" in front for the oppositeShows the element when the test holds and hides it when it does not. available: with data-room, that room can be sold for the stay; with none, some room can. With data-room also scarce (1 to 3 left) and any field of a room — it holds when the field has a value. With no data-room, the fields of a stay. One comparison is allowed, equality: reasonKind=min-stay holds when the field prints exactly that text. With ! in front: the opposite of the whole test.
data-roomroom type idThe room the test is about. Left out: the test is about the stay as a whole.
data-stay"tomorrow" | "weekend" | "search"The stay the test is asked for. search: the dates and the party of the search form on the page, chosen as for a value — until that search is complete the element stays as you wrote it.
data-check-in, data-check-outYYYY-MM-DDOr exactly these dates. With neither: one night from tomorrow. With data-stay="search": the dates asked for until the search is complete.
data-adults1–20 — default 2The party it is asked for.
data-child-agesages 0–17, comma-separatedThe children it is asked for, one age per child. The list counts only whole: with an entry that is not a whole number from 0 to 17, with more than eight ages, or with a child the property books as an adult, it is ignored and the party is the adults alone.
data-planrate plan idAsks about this rate plan only: available means the room is sold on it.
data-pms-texta field name — see the lists belowReplaces the text of the element with one live value. What you wrote inside stays until the value arrives, and comes back whenever there is no value for the stay the element asks for now: the answer still on its way, a failed request, a room that cannot be sold.
data-pms-bookno valueMakes the element a way into the booking. An <a> gets its href; any other element goes there on click.
data-pms-loadingno valuePresent on a value, a rooms template or an element with data-pms-if while its answer is on the way. Removed when the answer has landed or the request has failed.

Write hidden on it. The script acts only on a definite answer. While the answer is on its way, when the request fails, when the search it follows is not complete, or when data-room names a room the property does not list, the element stays exactly as you wrote it. So an element written hidden appears only on a definite yes, and “We are full” is never shown because of an error.

Your CSS can defeat hidden. The browser hides a hidden element with a weak rule of its own. Any rule of your site that sets display on the element — .banner { display: flex; } — wins over it, and the banner shows whatever the script decided. Add this once to your stylesheet:

[hidden] {
display: none !important;
}

What the test may be:

  • available — with data-room, that room can be sold for the stay; with no room, some room can. A room can be sold when it has a rate plan for the stay that can be paid for online.
  • With data-room: scarce (1 to 3 left), or any field of a room — it holds when the field has a value.
  • With no data-room: the fields of a stay — fromPrice, fromPricePerNight, checkIn, checkOut, nights.
  • One comparison, equality: data-pms-if="reasonKind=min-stay". No quotes around the text.
  • ! in front for the opposite of the whole test.
  • A name that is not a field does nothing: the element stays as written, and the console says so once.

A data-pms-text or a data-pms-book inside the element uses its stay and party, its data-room and its data-plan, unless it names its own. One that names any of data-stay, data-check-in, data-check-out, data-adults or data-child-ages uses all five of its own.

With data-stay="search" the line follows your search form:

<p data-pms-if="available" data-stay="search" hidden>
Rooms for your dates from <span data-pms-text="fromPrice">our best rate</span>
</p>
<p data-pms-if="!available" data-stay="search" hidden>Nothing is free for these dates.</p>

Why a room cannot be booked

A room that cannot be sold for the stay says why, in two fields:

  • reason — the sentence the booking window shows for it, in the page’s language: “Minimum stay 4 nights for these dates”.
  • reasonKind — the same as one word, for your CSS and for data-pms-if: party, sold-out, closed, no-arrival, no-departure, min-stay, max-stay, stay-length, min-advance, max-advance or other.

Both are empty when the room can be sold.

<template data-pms-each="rooms" data-stay="search">
<article class="room {{reasonKind}}">
<h3>{{name}}</h3>
<p data-pms-if="available">{{price}} for {{nights}}</p>
<p data-pms-if="!available">
{{reason}}<span data-pms-if="reasonKind=min-stay"> — add nights to make it {{minStay}}</span>
</p>
</article>
</template>

Outside a template, for one room:

<p data-pms-if="reasonKind=sold-out" data-room="00000000-0000-0000-0000-000000000000" data-stay="weekend" hidden>
The Garden Suite is taken this weekend.
</p>
  • The figures — minStay, maxStay, minAdvance, maxAdvance, stayLengths — are filled only for the restriction that refused this stay. A room on sale states none of them.
  • The comparison is exact, against what the field prints: reasonKind=min-stay, minStay=4. Spaces around = are ignored. nights prints words, so it is nights=3 nights, not nights=3.
  • other covers everything without a kind of its own — a room with no rate plan that can be paid for online, or a named data-plan the room is not sold on.
  • Prefer {{reason}} to a sentence of your own: it is the booking window’s wording, so the two pages agree.

Taxes and what is paid at booking

price is already the whole price: the VAT and the city tax charged on top of the room rate are inside it.

<template data-pms-each="plans">
<li>
{{name}} — <strong>{{price}}</strong>
<small data-pms-if="taxes">The price includes: {{taxes}}</small>
<small data-pms-if="deposit">{{deposit}} due at booking</small>
</li>
</template>
  • vatAdded and cityTax are a breakdown of price. Never add them to it. Each is filled only when that tax is charged on top of the room rate, and empty otherwise.
  • taxes is the one line the booking window prints about them — “VAT added · + €6.00 city tax” — and empty when nothing is charged on top.
  • deposit is what is paid at booking, formatted; empty when the plan asks for nothing up front. depositPercent is the percent as a number, filled only when the deposit is a percent.
  • priceAmount is the price as a plain number in the property’s currency. Do not convert it, and do not do arithmetic with it to print another price.
  • On a room, vatAdded, cityTax, taxes and depositPercent are those of the rate plan its price is for.

Do not say when or where the rest is paid. That is in the plan’s terms, and it is not the same for every plan — see What is not available.

While the answer is on the way

A value, a rooms template and an element with data-pms-if carry data-pms-loading while their answer is on the way. It is removed when the answer has landed or the request has failed. A value shows your own text meanwhile, so the page always reads.

/* a price on its way: your own words, quieter */
[data-pms-loading] {
opacity: 0.5;
}
/* a value still in your own words */
[data-pms-text]:not([data-pms-filled]) {
color: #9b9484;
}
AttributeValuesWhat it does
data-pms-loadingno valuePresent on a value, a rooms template or an element with data-pms-if while its answer is on the way. Removed when the answer has landed or the request has failed.
data-pms-filledno valuePresent while a value the script wrote stands in the element; never while your own text does. It is removed again when your own words come back.
data-pms-itemno valueMarks every element a repeat added.
data-pms-available"true" | "false"Whether that room can be sold for the stay: it has a rate plan for it that can be paid for online.
data-pms-readyno valueSet once, when the script has bound the page for the first time. Never removed.

Read these attributes in your CSS; never write them. A rooms template is not drawn by the browser, so data-pms-loading on it serves a sibling selector — template[data-pms-loading] + .rooms-waiting, say.

What a price means

  • It is the total the booking page charges for that stay and party: every night, with the VAT and the city tax charged on top of the room rate already in it.
  • It is in the property’s currency, the one the guest is charged in. A guest who picks another display currency in our account menu still sees the property’s currency in your own HTML.
  • It is for a room that can be paid for. A room is available only when it has a rate plan for the stay that can be paid for online — the rule of the booking window’s Book button.
  • An answer is kept for 60 seconds. Within a minute, elements that ask for the same stay, party and plan share one request. After it the next ask goes to the server again, so “Only 3 left” is true when it is shown.
  • A value is asked again when what it asks for changes — a stay attribute, the search it follows, the page’s language. It is not refreshed on a timer while the page stays open.
  • It is filled in the visitor’s browser. A search engine, and a visitor without scripts, read the text you wrote. Never compute a price in your own page or on your server: print the fields.

What is not available

What a site cannot get from the script today, and why.

  • The lowest price in a month, or the next free date. A value is priced for one stay and one party. calendar() gives a lowest price per night, but that is one night taken alone, not the price of a stay for a party, so “December from €82” built from it could be a price the booking page never charges.
  • A balance, or “the rest at the hotel”. There is deposit, and no field for what remains. The rest is not always paid at the hotel, and when it is due is in the plan’s terms. Do not subtract deposit from price yourself.
  • A price per person, in your own HTML. There is no such field. Children are priced by age, so the total divided by the heads is not a price anyone is charged. Do not divide priceAmount yourself. Only the ready offer table has a per-person view, data-per="person".
  • A “was” price. The script knows no earlier price, so there is nothing to strike through.
  • Repeats over days, nights or extras. A repeat is over rooms, and inside a room over its photographs, amenities and rate plans — one level deep. For a day-by-day view use calendar(); for anything else draw from rooms() in your own code — see JavaScript.