Modes
Stay — POST /stay
A 2–14 night stay shopped as one, each night priced alone, and whether a split booking is cheaper — or even allowed.
Request
curl -s https://api.directrate.dev/v1/stay \
-H "x-api-key: $DIRECTRATE_API_KEY" \
-H "content-type: application/json" \
-d '{
"chain": "choice",
"hotel_code": "IL263",
"checkin": "2026-11-10",
"los": 3
}'import os
import requests
r = requests.post(
"https://api.directrate.dev/v1/stay",
headers={"x-api-key": os.environ["DIRECTRATE_API_KEY"]},
json={
"chain": "choice",
"hotel_code": "IL263",
"checkin": "2026-11-10",
"los": 3,
},
)
r.raise_for_status()
print(r.headers.get("x-credits-charged"), r.json())const res = await fetch("https://api.directrate.dev/v1/stay", {
method: "POST",
headers: {
"x-api-key": process.env.DIRECTRATE_API_KEY,
"content-type": "application/json",
},
body: JSON.stringify({
"chain": "choice",
"hotel_code": "IL263",
"checkin": "2026-11-10",
"los": 3
}),
});
if (!res.ok) throw new Error(`HTTP ${res.status}`);
console.log(res.headers.get("x-credits-charged"), await res.json());los is 2 to 14. occupancy, currency and max_age as /shop.
Response
StayResponse:
stay— the los-night shop:status,min_los,lowest(nightly figures, averaged where the chain prices nights differently),lowest_points,rates,source.nights[]— each night priced on its own, as/calendaratlos: 1, withmin_loswhere the chain states one.totals—stay_bar(stay × los, native basis) againstnightly_bar(the nights added up; null when any night lacks a public rate), the same for member and after tax.split—bookable(every night available alone with no minimum stay above 1),blocked_nights[]with the reason,cheaper(stay/nightly/equal),saving(positive when night-by-night wins),saving_pct.credits { stay, nights }.
{ "totals": { "stay_bar": 317.04, "nightly_bar": 373, "stay_member": 285.33, "nightly_member": 354.35 },
"split": { "bookable": true, "blocked_nights": [], "cheaper": "stay", "saving": -55.96, "saving_pct": -17.65 },
"credits": { "stay": 1, "nights": 0.3 } }
A hotel with a minimum stay on Saturday will not sell Friday alone; that night appears in
blocked_nights and bookable is false.
Billing
Billed as the two calls would be: the shop weight (cached 0.25×) plus the calendar nights (0.1 per
night on native-calendar chains, the shop weight per live night elsewhere), under one usage line
stay. The example above cost 1.3 credits.
A caveat on Hilton
Hilton’s native calendar reports the member plan as its cash lowest, so nights[] on Hilton carry
the member rate and totals.nightly_bar is null; compare on nightly_member.