Dumpster Controls · agent page

This is the agent-optimized version of https://dumpstercontrols.io/help/booking-api/lesson-5-check-and-quote-before-the-card: 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-5-check-and-quote-before-the-card
Last updated
2026-10-17
Tokens
1,198 tokens (cl100k_base), within the 2,500-token budget for a help page
Size
9.2 KB for this page, against 31 KB for the human page (70% smaller)
Markdown
https://dumpstercontrols.io/help/booking-api/lesson-5-check-and-quote-before-the-card.md, or send Accept: text/markdown to the canonical URL
Cite as
Lesson 5: POST /check and POST /quote, validate and price before the card. Dumpster Controls. https://dumpstercontrols.io/help/booking-api/lesson-5-check-and-quote-before-the-card (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-17

Lesson 5: POST /check and POST /quote, validate and price before the card

Two calls make your checkout feel finished: /check tells the customer right away whether the date, the ZIP and the promo code work; /quote shows the exact money, line by line, that the server will charge.

Before you start

  • Lessons 3 and 4
  1. ## POST /check
    ```
    { "delivery_date": "2026-11-10", "zip": "32801", "promo_code": "SAVE10" }
    ```
    Only the fields you send are evaluated. Response data: date { ok, code?, message? } (codes date_past, date_closed), service_area { ok, code?, message?, unverified? } (code out_of_service_area; unverified says why the server could not verify, for example no_coverage when the company has no radius), promo { ok, discount_type, discount_percent, discount_amount } or { ok: false, code: promo_invalid, reason: not_found | inactive | expired | exhausted }, booking_online, payments_ready. Call it when the customer leaves the date field, the ZIP field and the promo field.
  2. ## POST /quote
    ```
    { "size_id": "<uuid from /sizes>", "rental_days": 7, "promo_code": "SAVE10" }
    ```
    Response data: size_id, rental_days, tier (h24 for a 1 day rental at the 24 hour price, d3, d5, d7, d10, d14, d30, the longest tier plus extra such as d14+extra, or base_price+extra), currency, lines { base, extra_days, fuel_environmental_fee, promo_discount, subtotal, tax_percent, tax }, promo { code, applied } or null, total and total_cents (what the company invoices), processing_fee and processing_fee_cents (what the customer pays on top under card_fee_handling), card_fee_handling, gross_total and gross_total_cents. Call it every time the size, the rental length or the promo code changes, and show the lines. rental_days is an integer from 1 to 365.
  3. ## How the promo discount works
    A percentage promo applies to the rental price the server charges for the rental length (the duration tier, or price_from when the size has no tier), never to extra days, fees or tax; a fixed promo subtracts dollars from that same rental price. Both are capped by the server. This mirrors the hosted page exactly, so a customer who compares your site with the hosted link sees the same number.
  4. ## Money fields
    Every amount comes twice: in dollars (total) and in integer cents (total_cents). Use the cents for arithmetic and the dollars for display. Never round on your side; the server already did.
  5. ## Quote with a material
    ```
    { "size_id": "<uuid>", "rental_days": 7, "material": "clean_concrete" }
    ```
    Response data gains pricing ("material" or "general") and material { slug, label, price, max_weight_tons, overage_mode, overage_per_ton, requires_ack }. With pricing material, lines.base is the material price for 7 days; days beyond 7 use the size's extra day rate; fees and tax are unchanged. A percentage promo applies to the material price. 409 material_not_allowed means the material is not available in that size: details.allowed_sizes lists the sizes that take it. Only companies that price by material are affected; send nothing and you get the general price as before.

What happens next

  • A quote is not a reservation: nothing is held until POST /intents succeeds and the card is confirmed.

Troubleshooting

/quote answers 404 not_found with field size_id.

The size_id belongs to another company or is inactive. Use the ids from GET /sizes of the same key.

Related guides

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