How the Worker turns the Rates page into the price a guest sees, where the open dates come from, and what the pricing agent adds.
The condo rents either as a Two Bedroom (sleeps four) or as a One Bedroom (sleeps two, the second bedroom locked). Lodgify has a single listing for it — the Two Bedroom — and the One Bedroom is sold from that same listing (decision 0025). A night booked either way is gone for both.
The Worker works out every price itself, on every quote, from rows in D1 that the owners edit on the Rates page. Nothing about a price is cached from Lodgify or from a spreadsheet.
The Rates page can also block the One Bedroom over a date range, and it sets each window’s minimum stay. Website guests cannot start a stay sooner than two days from today (a Settings value); the owners can place any dates from admin.
A switch in Settings can hand the Two Bedroom’s nightly price back to Lodgify’s own rates. It is off: both units are priced from the Rates page (decision 0060), and the Rates page’s Compare with Lodgify card shows where the two differ.
Lodgify is the one calendar every channel shares. The Worker asks it which
nights are closed and shows only open ones; the answer is kept for a short
while so a busy calendar does not ask Lodgify on every click. Lodgify’s key and
its exact User-Agent string are both required on every request — Lodgify
allow-lists that string at its edge — and the site is the only thing that
calls Lodgify’s API. /api/health reports whether the last calls succeeded.
The pricing agent is a separate Python tool in the same repository, run on GitHub. It reads competitors’ prices on Airbnb and keeps the history. The site tells it which stays to search: it works them out from the date windows on Rates (holidays on their own dates, seasons at 3 or 5 nights, six months ahead) and publishes that list, which the run fetches before it starts. The agent’s prices reach admin as a file the site bundles. Price Check turns them into one suggestion per date window, aimed at the highest-priced similar place, and never below the floor. Nothing changes a price until an owner presses Apply there. The agent has its own card on this shelf.