latestOpenAPI 3.1.02026-08-21211181.8 KB

e5d7af502419

Flights

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.

get/v1/flights/fares/{fareId}/booking-link

Path parameters

fareIdstring required

The Book-on-Wego fare id from a flight-search trip detail.

Query parameters

tripIdstring required

The trip the fare belongs to, from a flight-search result. Shaped {searchId}:{tripCode}.

searchIdstring

Optional cross-check. When supplied it must equal the tripId's first :-segment; a mismatch is rejected.

fareOptionIdstring required

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.

fromstring required
Example:DXB

Origin airport or city code, as sent to the flight search.

tostring required
Example:LHR

Destination airport or city code, as sent to the flight search.

boolean
OR
'0' | '1' | 'true' | 'false'

Whether from is a city code rather than an airport code.

boolean
OR
'0' | '1' | 'true' | 'false'

Whether to is a city code rather than an airport code.

fromDatestring required

Outbound departure date, YYYY-MM-DD, as sent to the flight search.

toDatestring

Return date, YYYY-MM-DD. Omit for a one-way handoff.

cabin'economy' | 'premium_economy' | 'business' | 'first'

Cabin class, as sent to the flight search.

adultsinteger

Adult passengers (1-9).

childreninteger

Child passengers (0-8).

infantsinteger

Infant passengers (0-8). Must not exceed adults.

siteCodestring

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.

currencystring
Example:AED

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.

localestring
Example:en

Response language tag for the wego.com page (e.g. en, ar). Defaults to en.

Response

The booking handoff URL.

bookingUrlstring required

A wego.com booking deep-link with the chosen fare pre-selected.

expirestrue required

Always true: this link is bound to a live search and stops working with it, in about five to seven minutes. To send someone a link that lasts, use GET /v1/flights/search-link.