Create an accommodation order via Booking.com's Demand API using the preview-token-create flow, and correctly handle order-creation errors/retries.

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

Steps

  1. Call POST /orders/preview with booker, accommodation.id/checkin/checkout, and accommodation.products[].id + allocation (guest counts) to validate guest allocation, get the final price breakdown, and receive an order_token — note this token expires after 15 minutes.
  2. Show the traveller a preview page (price, cancellation policy, payment options) from the /orders/preview response before proceeding.
  3. Call POST /orders/create with the order_token plus required booker, accommodation.products[].guests[], and payment fields; all Demand API v3.x endpoints only accept POST (a GET returns HTTP 405).
  4. If /orders/create returns HTTP 409 with id 'order_unavailable', it means the product became unavailable between preview and create — re-check via /accommodations/availability and offer the traveller an alternative rather than retrying the same payload.
  5. If the order_token has expired (create fails referencing an expired token), repeat /orders/preview to obtain a fresh token rather than reusing the old one.
  6. On HTTP 429, back off exponentially (e.g. 1s, 2s, 4s, 8s, 16s) rather than retrying immediately or on a fixed interval.

Known gotchas

Related routes

Handle a hotel booking cancellation via the Booking.com Demand API and interpret the penalty response
developers.booking.com · 6 steps · unrated
Integrate HotelBeds API to search availability and create a hotel booking with cancellation handling
developer.hotelbeds.com · 6 steps · unrated
Search for hotel availability and understand the Booking.com Demand API booking fundamentals
developers.booking.com · 5 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