e5d7af502419
Build a fare's wego.com booking link
Builds the wego.com booking deep-link for a chosen Book-on-Wego fare, with one fare option pre-selected PER LEG. A pure, stateless URL build from the caller-supplied search context - no upstream call, no booking, no payment. The caller passes back the trip/leg/passenger context.
Path parameters
The Book-on-Wego fare id from a flight-search trip detail.
Query parameters
The trip the fare belongs to, from a flight-search result. Shaped {searchId}:{tripCode}.
Optional cross-check. When supplied it must equal the tripId's first :-segment; a mismatch is rejected.
The fare option(s) to pre-select, from GET /v1/flights/fares/{fareId}/options. Required: without it the booking page has no fare to open and dead-ends. When that read reported price.covers=leg, pass ONE id per trip leg as a comma-separated list, in any order: a single id then prices only its own leg while the page still presents the whole round trip. A whole-trip fare (price.covers=trip) takes exactly one id. At most 8, and no id twice.
Origin airport or city code, as sent to the flight search.
Destination airport or city code, as sent to the flight search.
Whether from is a city code rather than an airport code.
Whether to is a city code rather than an airport code.
Outbound departure date, YYYY-MM-DD, as sent to the flight search.
Return date, YYYY-MM-DD. Omit for a one-way handoff.
Cabin class, as sent to the flight search.
Adult passengers (1-9).
Child passengers (0-8).
Infant passengers (0-8). Must not exceed adults.
Wego market (point of sale) as a 2-letter code, e.g. AE. Optional: if omitted the API defaults to US. A client that knows the user's market (the wego CLI derives it from the id_token) passes it as an explicit siteCode.
Pricing currency as a 3-letter ISO 4217 code (e.g. AED). Optional: when omitted the built URL carries NO currency parameter – it is not defaulted to USD, so wego.com shows the market's own default. Pass it to pin the handoff to a currency.
Response language tag for the wego.com page (e.g. en, ar). Defaults to en.
Response
The booking handoff URL.