Parse hotel cancellation policies and distinguish guarantee vs deposit semantics

domain: hotel-apis · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Locate the cancellation policy object in the rate/offer response — field names vary by API (e.g. cancellationPolicies[], policies.cancellations[], cancel_penalties[]); always read API-specific docs for structure.
  2. Parse each policy rule: extract the deadline (ISO 8601 datetime), the penalty_amount or penalty_percentage, and the currency; convert the deadline to UTC for internal logic and to hotel-local time for user display.
  3. A 'free cancellation until' date means the guest can cancel with no charge before that datetime — after the deadline, the penalty applies; model this as a sorted list of deadline/penalty pairs.
  4. Guarantee means the hotel will hold the room but charge the card only at check-in (or no-show/late cancel); deposit means a partial or full charge is taken immediately at booking — check the rate's guarantee_type or deposit_policy fields.
  5. For non-refundable rates, the full amount may be charged at booking — confirm this with a user-facing warning before completing the order; do not treat non-refundable the same as a penalized cancellation.
  6. Store the raw policy string alongside your parsed version — hotels sometimes update policies and your parsed snapshot is the legally relevant one at time of booking.

Known gotchas

Related routes

Parse and apply hotel cancellation penalty windows from the Expedia Rapid cancel_penalties object to drive real-time refund decisions
developers.expediagroup.com · 6 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans