Recipes
Build a booking website
Mirror the listings, draw the calendar, land the form as an inquiry.
A website needs three things from Quarters: what the flats are, which days they are free, and somewhere to send the form. Each is one endpoint, and one webhook tells you when to look again. Everything here runs on your server; the browser talks to you, never to the API.
Mirror the listings
List every published listing and store the result. It is the complete set, not a delta: a listing that is no longer in the response has been unpublished, and your mirror should drop it. Render from the mirror, not from the API, so a page view never waits on us.
Request
curl "https://go.quarters.live/api/v1/listings" \
-H "Authorization: Bearer $ACCESS_TOKEN"descriptionfields are the editor’s HTML;titleis plain text.translationscarries the same six fields per language, and you fall back todescriptionfor anything missing.- Photos come in four renditions with absolute URLs. Use
regularin a grid,largeon the detail page,thumbnailin a list. bedrooms,bedsandbathroomsare already counted so a card does not reducerooms. Money is integer euro-cents; a null price is unset, not free.
Draw the calendar
Availability is the one thing you must not mirror. It is computed on request from bookings and
blocks, so a tenancy taken thirty seconds ago is already booked. Ask for the window
you are drawing, up to 1100 days, and ask again when the visitor moves.
Request
curl "https://go.quarters.live/api/v1/listings/0d6e1c2a-…/calendar?start=2026-10-01&end=2026-10-04" \
-H "Authorization: Bearer $ACCESS_TOKEN"availableis bookable.reservedis held but not firm; show it as unavailable.bookedandunavailableare taken.- Check-out is exclusive: a stay ending on the 30th leaves the 30th free, because the handover is at noon. Two stays can meet on one day.
minNightsis the listing’s floor for a stay. Enforce it in the picker so the form never asks for a stay the operator will decline.
Land the form as an inquiry
Post the form to Create an inquiry. It lands as a row
staff convert to a reservation in one click, resolved to a guest record, rather than as an email
somebody re-types. Only lastName and email are required; everything else
you collect that is not a named field travels in metadata.
Request
curl -X POST "https://go.quarters.live/api/v1/inquiries" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"propertyId": "0d6e1c2a-…",
"firstName": "Sofia",
"lastName": "Rossi",
"email": "sofia@example.com",
"phone": "+39 333 000 0000",
"checkIn": "2026-10-01",
"checkOut": "2027-04-01",
"adults": 2,
"children": 0,
"infants": 0,
"pets": false,
"message": "Two of us, relocating for a project.",
"locale": "en",
"source": "website",
"metadata": {
"page": "https://www.cityretreat.com/house/…"
}
}'The organisation has a daily allowance of inquiries (500 by default), so a form that a bot can submit needs a captcha or a rate limit on your side first.
Stay current
Subscribe to three webhooks:
listing.updated: re-fetch that listing, or the whole set, and re-render.listing.deleted: drop it from the mirror.calendar.updated: if you cache calendar windows for a few minutes, evict that listing’s.
And still re-fetch the full set on a schedule, once an hour say. Delivery is one attempt; the full read is the recovery, and for listings it is one call.