Skip to content

Booking Engine — subdomain only (draft) ​

Proposed winner host: https://{HotelName}.com-bookdirect.com/

HotelName = PascalCase (or alias) matching the property direct-link field — e.g. TsaraLagos.com-bookdirect.com.

v1 Direct Booking (/book/[directSlug]) stays implemented until 301s exist. Same Middleware booking + pay + availability APIs. No second inventory store.

Out of scope as primary (legacy → 301) ​

LegacyAction
hotel-name.com-bookdirect.com (dashed)301 → Pascal alias
com-bookdirect.com/hotel-name301 → subdomain
com-bookdirect.com/hotel/slug301 → subdomain
com-bookdirect.com/HotelName301 → subdomain
Alias apexes (directbooking.ng, …)Retire after DNS plan

MelonQ “copy booking link” emits only the subdomain form.

How to build ​

  1. Wildcard *.com-bookdirect.com + TLS on the FE host
  2. Edge: reject reserved labels (www, api, admin); set x-property-slug, x-booking-source=DIRECT_LINK_1_GFBL
  3. Resolve: GET https://middleware-dev.bookdirect.live/api/v1/bookdirect/properties/slug/{alias} (live explorer already has slug GET)
  4. Rooms → rates → POST .../availability/check → POST .../bookings → POST .../payments/initialize
  5. Branding from the same property GET. Missing media → placeholders
  6. Confirmation stays on the direct host when the session started there
  7. Google POS / metasearch landing URLs = subdomain only

Apex com-bookdirect.com home redirects to Marketplace. Do not compete on SEO.

IDOR ​

Same as Marketplace checkout. Public browse for the resolved active property. Writes need guest JWT. Availability returns counts only.

API-first. Middleware Backend wins over Core Backend when both exist.