Booking API course · updated 2026-10-05
Lesson 9: junk removal with the Booking API (/junk/*)
Junk removal has its own hosted page, its own prices (by load size), its own arrival windows and optional photos of the material. The API mirrors it under /junk/* with the same keys, the same session and the same Stripe flow, so one integration can offer both services.
Before you start
- Lessons 2, 6, 7 and 8 (the dumpster flow); the company has junk removal switched on in Online Booking
- ## GET /junk/config
Response data: junk_online, payments_ready, hosted_page (dumpstercontrols.io/junk-checkout/slug), loads [ { load_fraction, price, notes, is_default, sort_order } ] (for example 1/4, 1/2, 3/4, full, with the price in dollars), windows [ { start, end } ] (HH:MM arrival windows), same_day { enabled, cutoff }, max_advance_days, photo (off or optional), locations (curbside, inside_home, garage, construction_site), not_accepted [], extra_fee [], terms { use_standard, custom_content }, cancellation_policy, card_fee_handling. Render the load cards from loads and the window picker from windows. - ## GET /junk/availability?from&to
Response data: today, from, to, max_advance_days, same_day, days [ { date, open, windows [ { start, end } ], reason } ]. For each day you get the windows that still fit (same-day cutoff, max advance, weekly days off, holidays and blackout dates are already applied). reason, when a day is closed: past_date, same_day_closed, too_far, non_working_day, blackout or no_window. - ## POST /junk/quote
```
{ "load_fraction": "1/2", "promo_code": "SAVE10" }
```
Response data: load_fraction, currency, lines { base, promo_discount }, promo, total and total_cents, processing_fee and processing_fee_cents, card_fee_handling, gross_total and gross_total_cents, note. Junk is priced by load size at booking; the crew confirms the load on site and the company handles any difference afterwards (load adjustment), outside this API. - ## POST /junk/intents
```
{
"load_fraction": "1/2",
"job_date": "2026-11-10", "time_window_start": "08:00", "time_window_end": "12:00",
"address_line1": "123 Main St", "city": "Orlando", "state": "FL", "zip": "32801",
"job_type": "garage", "notes": "Gate code 1234", "crew_size": 2,
"placement_lat": 28.5383, "placement_lng": -81.3792,
"customer": { "name": "Jane Doe", "email": "jane@example.com", "phone": "4075550100" },
"promo_code": "SAVE10", "terms_accepted": true, "session_id": "optional"
}
```
Required: load_fraction, job_date, time_window_start and time_window_end (a window from /junk/config or /junk/availability), address_line1, zip, customer, terms_accepted = true. The response has the same shape as the dumpster /intents (session_id, payment_intent_id, client_secret, stripe, amount). Slot errors come back as 409 slot_past_date, slot_same_day_closed, slot_too_far, slot_non_working_day, slot_blackout, slot_bad_window or slot_bad_date with field job_date. - ## Card, confirm and photos
Take the card exactly as in lesson 7. Then POST /junk/confirm { session_id, payment_intent_id } creates the job: response data state confirmed, job_number, job_id, photos (a note when photos are accepted). When the company accepts photos, send up to 3 within 2 hours with POST /junk/photos { session_id, content_base64 } (JPEG, PNG or WebP, 8 MB max; the response carries the stored url). GET /sessions/:id works for junk sessions too, with job_number and job_id.
What happens next
- The job appears in Junk Removal on the dispatch board, the customer gets the confirmation, and the company's junk webhooks and messages work as for any online junk job.
Troubleshooting
/junk/quote answers not_found.
The load_fraction is not one of the company's active load prices. Use exactly the load_fraction strings from GET /junk/config.
/junk/intents answers booking_offline but dumpster /intents works.
Junk removal has its own online switch in Online Booking (the junk card). The company has to turn it on.
Related guides
- Lesson 8: POST /confirm and GET /sessions, create the order and never lose one
- How to put junk removal booking on your own website with Dumpster Controls
© 2026 Dumpster Controls. All rights reserved. Made in the USA.