Skip to content
This page is available in Markdown format. Markdown is recommended for AI consumption. See /api/conventions/index.md for this page, or/llms.txt for the full documentation index.

Conventions

Query-parameter casing, default sort, and entity-read shapes.

Updated
View as MarkdownView this page as plain text

Query-parameter casing

One rule: a parameter that mirrors a create-body or search-context field keeps that field’s camelCase (pageSize, searchId, siteCode), while a net-new filter knob that exists only as a query parameter is kebab-case (min-price, max-star, booking-types, stopover-airports). A single results query mixes the two by design: ?pageSize=20&min-price=100 is one author following the rule, not two.

Default sort

Default sort differs per vertical for historical reasons and is kept stable: flights default to score_desc, hotels to relevance. Both mean the metasearch ranking. The names diverged before launch, and renaming either now would break the live contract for no functional gain, so they stay as-is.

Ambiguous places

getPlaces resolves free text to cities, airports, states, districts and hotels. When more than one place is a plausible reading of the query it sets metadata.hasAmbiguity, which is the signal to ask the traveler which one they meant rather than to take the top row. An agent that resolves silently books the wrong Cambridge.

Entity reads

Entity reads are asymmetric on purpose. A hotel is a stable entity at the vertical root, so GET /v1/hotels/{hotelId} needs no search context. A flight trip is a snapshot inside one search, so GET /v1/flights/trips/{tripId}?searchId=... resolves only with the searchId it came from (trip ids are context bound and expire). Each shape fits its domain.

FORM WG-REF · SEQ 004821The API and the ways in to it are early and may change.

Navigation

Type to search…

↑↓ navigate↵ selectEsc close