Skip to main content

Search hotel chains (typeahead catalog over provider_chains)

POST 

/content/hotels/v1/chains/search

Typeahead search over the provider_chains catalog (one row per (providerCode, chainCode)). Returns exact, prefix, contains and fuzzy (pg_trgm) matches in a single call, grouped by canonical chain name so each item lists all (providerCode, chainCode) pairs that map to the same chain.

The client sends any Unicode form (case, diacritics). The server canonicalizes q using the same pipeline as the stored column (NFD -> drop combining marks -> NFC -> lowercase) so Hôtel and hotel match the same rows.

When mode=suggest and items is empty the response includes a low-threshold suggestions[] ("did you mean?") computed with a 0.15 trigram similarity cutoff.

Response is cacheable: ETag + Cache-Control: private, max-age=60. Clients can send If-None-Match to get 304 Not Modified.

After getting the chainCode for a provider, call POST /content/hotels/v1/hotels/search with providerCode + chainCode to list hotels for that chain.

Request

Responses

Successful response