Dumpster Controls · agent page

This is the agent-optimized version of https://dumpstercontrols.io/help/booking-api/lesson-4-availability-closed-days-and-the-service-area: the same content as the human page, without scripts, styles, animations or navigation. People should open the full page.

Canonical page
https://dumpstercontrols.io/help/booking-api/lesson-4-availability-closed-days-and-the-service-area
Last updated
2026-10-05
Tokens
787 tokens (cl100k_base), within the 2,500-token budget for a help page
Size
7.7 KB for this page, against 27 KB for the human page (71% smaller)
Markdown
https://dumpstercontrols.io/help/booking-api/lesson-4-availability-closed-days-and-the-service-area.md, or send Accept: text/markdown to the canonical URL
Cite as
Lesson 4: GET /availability, closed days and the service area. Dumpster Controls. https://dumpstercontrols.io/help/booking-api/lesson-4-availability-closed-days-and-the-service-area (accessed 2026-11-20).
More for agents
Facts sheet · llms.txt · llms-full.txt · All agent pages · Product manual

Booking API course · updated 2026-10-05

Lesson 4: GET /availability, closed days and the service area

A good date picker never offers a day the company cannot deliver. This lesson gives you the closed days (holidays, blackout dates, weekly days off, past days) and explains the service area rule so the customer learns early, not at the card step.

Before you start

  • Lesson 3
  1. ## GET /availability?from=YYYY-MM-DD&to=YYYY-MM-DD
    Defaults: from = today in the company's timezone, to = from plus 59 days. At most 120 days per call. Response data: today, min_date (today), from, to, max_days, closed [ { date, reason } ] where reason is past, holiday_or_blackout or non_working_day. Grey out every date in closed; everything else is open. The hosted page asks for tomorrow onward; the server accepts today onward, so you may offer today if the company handles same-day deliveries by phone.
  2. ## Where the rules come from
    Holidays (US or Canadian, by the company's country) with one switch, custom blackout dates and weekly days off are set by the company in Online Booking, Holidays and Appearance. The API reflects them live. The same rules are enforced again by the server at POST /intents, so a stale picker cannot create an order on a closed day.
  3. ## Service area
    ```
    GET /company returns booking.service_area { zip, max_miles } when the company set a delivery radius: the straight-line distance between the company's ZIP and the delivery ZIP must be at or under max_miles. Validate early with POST /check (lesson 5) and show a clear message with the company's phone when the address is outside. If service_area is null, every address is accepted.
    ```

What happens next

  • Re-fetch availability when the customer navigates to a month beyond the loaded range.

Troubleshooting

A day shows open in my picker but /intents answers date_closed.

Your availability data is older than a settings change, or your picker ignored the timezone. Re-fetch /availability and compare dates as plain YYYY-MM-DD strings, never through the browser's local Date.

Related guides

© 2026 Dumpster Controls. All rights reserved. Made in the USA.