API referenceshop
Flight returns
POST
/v1/flights/returnsAccepts X-Api-Key · oauthClientCredentials · bearer
FLT two-step round trip: list the returns of a chosen outbound, or choose one
The second step of a round trip or multi-city search made with FlightSearchIntent.journeyMode OUTBOUND_FIRST.Show more
The second step of a round trip or multi-city search made with FlightSearchIntent.journeyMode OUTBOUND_FIRST. A per-vertical FLT route in the style of the /v1/hotels/search alias: the unified envelope, context.domain FLT, the same credentials, permission (search:flights) and tenant scoping as an FLT search; a foreign tenant's offerRef is 404 NOT_FOUND. Read-only: no Idempotency-Key, safe to retry; it never mints a repriceRef. LIST: message.intent {offerRef} of an offer whose extension.air.journey.complete is false. The platform asks the supplier for the options of slice journey.nextSliceIndex that go WITH this outbound and answers 200 with message.offer (the outbound offer as it stands), message.returnOptions (AirReturnOption[], in the supplier's order), message.returnOptionsComplete and message.warnings. The list is the supplier's answer for THIS outbound; each price is the total journey price for the party after the tenant's pricing rules, never a supplier net, and priceDelta is against the outbound's "from" price. A key is valid only for this offerRef, only until the offer's expiresAt, and only from the latest listing: listing again may answer other keys and prices. When the supplier says there are no options for this outbound the answer is 200 with an empty list, returnOptionsComplete true and a warning NO_RETURN_OPTIONS; choose another outbound. CHOOSE: message.intent {offerRef, returnOption}. 200 with message.offer narrowed under the SAME offerRef, as the HTL room-rate narrowing keeps its offerRef; expiresAt is not extended. It carries every chosen slice in segments and slices and the journey price the supplier states for the combination (equal to the option's price, pricing.indicative false). Once every slice is chosen journey.complete is true and nextSliceIndex is absent, and /v1/reprice and /v1/orders treat the offer like a COMPLETE one; on a multi-city journey with slices left, complete stays false, nextSliceIndex moves on and the client lists again. Choosing again with another key of the latest listing replaces the choice; the last choice is what reprice prices. Errors use only the frozen codes, the reason in details.reason: 400 VALIDATION NOT_FLT_OFFER (the offerRef is not an FLT offer, or context.domain is not FLT); 404 NOT_FOUND RETURN_OPTION_UNKNOWN (a key this offer's latest listing did not answer, or one from before it expired; an unknown offerRef is the plain 404 NOT_FOUND); 409 OFFER_EXPIRED details.reason OFFER_EXPIRED (the offer is past expiresAt; search again); 409 CONFLICT JOURNEY_COMPLETE_ALREADY (the offer is complete: a COMPLETE search offer, or every slice already chosen; reprice it). Until the journey is complete, /v1/reprice and /v1/orders answer 409 CONFLICT details.reason JOURNEY_INCOMPLETE with details.nextSliceIndex.Headers
- TeststringOptional
Sandbox scenario simulation: price_changed | sold_out | ambiguous | hold_expired | payment_declined | supplier_timeout | partial_search | duplicate_order (case-insensitive).Show more
Sandbox scenario simulation: price_changed | sold_out | ambiguous | hold_expired | payment_declined | supplier_timeout | partial_search | duplicate_order (case-insensitive). Read on every travel verb before the permission wall and idempotency; a scenario sent on a verb it does not apply to has no effect. Every simulated error carries details.simulated true and details.scenario. price_changed (reprice, hold, orders) → 409 PRICE_CHANGED; sold_out → 422 SOLD_OUT; hold_expired (orders) → 409 HOLD_EXPIRED; duplicate_order (orders) → 409 DUPLICATE_ORDER existingOrderRef MO-SIM-DUPLICATE; payment_declined (orders, POST /v1/payments/{paymentId}/confirm) → 402 PAYMENT_FAILED; supplier_timeout → 502 UPSTREAM_UNAVAILABLE; partial_search (search) → two SUPPLIER_DROPPED warnings; ambiguous (orders) → 202 PENDING_RECONCILIATION on an MO-SIM- ref. wallet_insufficient → 402 PAYMENT_FAILED details.reason WALLET_INSUFFICIENT.
Request body
- contextMondeeContextRequiredRequest context envelope. domain selects the product; URL carries the verb.
13 child attributes
- domainstringRequired
Canonical code or alias per the domain registry; unknown = 400 UNKNOWN_DOMAIN.Show more
Canonical code or alias per the domain registry; unknown = 400 UNKNOWN_DOMAIN. APTSVC (airport services: meet and assist, porter, buggy, wheelchair, concierge bundles) is registered by this release beside FASTTRK. FNB (dining: restaurant reservations; aliases REST, DINING, RESTAURANT, RESTAURANTS; category DO, money model FREE, artifact CONF_NUMBER, served under the dining service key with base path /v1/dining) is registered since v1.7.0. GIFT (gift cards; category SUPPORT, money model MERCHANT, artifact VOUCHER, served under the gift-cards service key with base path /v1/gift-cards) is described from v1.31.0: until the backend seam change merges, domain GIFT answers 400 UNKNOWN_DOMAIN. AICONT (the Example Content experience-scraping service's operations; category DO, money model MERCHANT, artifact NONE, served under the aicont service key with base path /v1/aicont; a content supplier) has its typed intent from v1.39.0; it answers only where its supplier set is landed and ACTIVE. PARK (airport and cruise-port parking; aliases PRK and PARKING; category SUPPORT, money model MERCHANT, artifact CONF_NUMBER — the supplier's gate barcode is the order's BARCODE document — served under the parking service key with base path /v1/parking) has its typed intent and its verb book from v1.55.0. - actionstringOptionalMirrors the verb; optional (server sets from route)
- enricharray of stringOptional
Opt-in enrichment on shopping answers: EMISSIONS | RATINGS | AMENITIES | ROUTE.Show more
Opt-in enrichment on shopping answers: EMISSIONS | RATINGS | AMENITIES | ROUTE. Absent = the tenant's configured default. Decoration reads cache or the pre-warmed store only and never delays the verb. - session_idstringOptionalYour own id for the user session the call belongs to.
- transaction_idstringOptionalConstant across one shop-to-book journey
- currencystringOptionalISO-4217; absent = tenant default; blank/invalid = 400
- localestringOptionalThe language and region for text in the answer, as a BCP 47 tag (for example en-US).
- posstringOptionalPoint-of-sale market, orthogonal to tenant
- clientReferencestringOptionalCaller's own id; searchable; the reconciliation primitive
- fareSourcePolicystringOptionalBYOC tenants only; narrows, never widens, the configured strategy
- DEFAULT
- OWN_ONLY
- MONDEE_ONLY
- BLEND
- includeUpstreambooleanOptionalDefault false
Ask for the supplier's own answer, verbatim, beside what the platform read from it: Offer.upstream on every offer of a search, poll, detail or flight-returns answer, AirReturnOption.upstream on each…Show more
Ask for the supplier's own answer, verbatim, beside what the platform read from it: Offer.upstream on every offer of a search, poll, detail or flight-returns answer, AirReturnOption.upstream on each listed return, RepriceResponse.message.upstream and OrderItem.upstream. Served only where the deployment enables upstream pass-through; elsewhere a true value is 400 VALIDATION details.reason UPSTREAM_PASS_THROUGH_DISABLED, details.field context.includeUpstream, before any supplier call. Absent or false, nothing changes. The block is informational: offerRef, repriceRef and price stay the only handles and the only price of record. - selectionSelectionPreferencesOptional
context.selection: the caller's offer-selection preferences for this search.Show more
context.selection: the caller's offer-selection preferences for this search. Each field set here replaces the tenant's and the platform's for this search, within the caller's entitlements and the platform's ceilings, unless the tenant has locked request overrides. It never widens reach: a preferred supplier the caller may not reach is ignored with context.warnings[] SELECTION_PREFERENCE_IGNORED. Ignored where selection is off.4 child attributes
- viewstringOptionalSELECTED (one entry per item, alternatives under the winner) or ALL (the flat list, tagged)
- SELECTED
- ALL
- objectivestringOptional
How the winner of an item is picked. CHEAPEST is the lowest comparison total; REFUNDABLE_FIRST the lowest total among offers free to cancel now (else CHEAPEST); PREFERRED_SUPPLIERS the first of…Show more
How the winner of an item is picked. CHEAPEST is the lowest comparison total; REFUNDABLE_FIRST the lowest total among offers free to cancel now (else CHEAPEST); PREFERRED_SUPPLIERS the first of preferSuppliers with an offer inside the tenant's preference band (else CHEAPEST); PLATFORM_DEFAULT defers to the tenant and platform policies. Any other value is 400 VALIDATION details.field context.selection.objective.- CHEAPEST
- REFUNDABLE_FIRST
- PREFERRED_SUPPLIERS
- PLATFORM_DEFAULT
- preferSuppliersarray of stringOptionalSupplier codes as in fareSource.supplier, most preferred first (PREFERRED_SUPPLIERS)
- excludeSuppliersarray of stringOptionalSupplier codes whose offers this search does not show; narrows only
- onBehalfOfOnBehalfOfOptional
Who a desk or agent books FOR: stamped into the audit actor and the clientReference lineage of the order.Show more
Who a desk or agent books FOR: stamped into the audit actor and the clientReference lineage of the order. Send customerId (a customer or traveller id the tenant knows) or traveler (a free-text identity), or both. Attribution only: it grants nothing, and the credential's own actor is still what authorises the call. Audit mapping: the audit actor.onBehalfOf (a string) is customerId when present, otherwise "traveler:<redacted-hash>" (a stable hash of traveler, never the text).2 child attributes
- customerIdstringOptionalA customer or traveller id your own system knows.
- travelerstringOptional
Free-text traveller identity when there is no customer id.Show more
Free-text traveller identity when there is no customer id. Personal data: it is logged redacted, never in clear. A card number in it is 400 VALIDATION details.reason INSTRUMENT_DATA_REFUSED.
- messageobjectRequiredThe request: `message.intent` names the outbound offer and, to choose one, the return.
1 child attribute
- intentobjectRequiredSend offerRef alone to list the returns of that outbound; add returnOption to choose one.
2 child attributes
- offerRefstringRequiredAn OUTBOUND_FIRST FLT offer whose journey is not complete (OF-F-...)
- returnOptionstringOptional
A key from the latest listing of this offer (AirReturnOption.key).Show more
A key from the latest listing of this offer (AirReturnOption.key). Absent: list the options. Present: choose it.
Responses
- 200FlightReturnsResponse
Listing: the outbound offer with returnOptions and returnOptionsComplete.Show more
Listing: the outbound offer with returnOptions and returnOptionsComplete. Choosing: the offer narrowed under the same offerRef (FlightReturnsResponse). - 400VALIDATION — a bad intent shape (BadRequest), or details.reason NOT_FLT_OFFER: the offerRef is not an FLT offer, or context.domain is not FLTApiErrorResponse
- 401ApiErrorResponse
UNAUTHENTICATED — missing or expired token.Show more
UNAUTHENTICATED — missing or expired token. Declared on every operation because `security` is declared globally at the document root: every route is authenticated, so every route can answer 401. - 403ApiErrorResponse
PERMISSION_DENIED | TAB_DISABLED | OUT_OF_SCOPE | TENANT_MISMATCH, exactly as Forbidden, plus TENANT_SUSPENDED — declared on the verbs that start new business: search and poll, detail, schedules,…Show more
PERMISSION_DENIED | TAB_DISABLED | OUT_OF_SCOPE | TENANT_MISMATCH, exactly as Forbidden, plus TENANT_SUSPENDED — declared on the verbs that start new business: search and poll, detail, schedules, seatmap, ancillaries, rules, reprice, hold and order create, and on the payments routes (intent, confirm, 3ds-callback, checkout-session). While the caller's tenant is SUSPENDED every such request is refused TENANT_SUSPENDED, except an idempotent replay of an answer completed before the suspension (see hold / createOrder), before the entitlement and permission checks, and it is not retryable: the answer changes only when platform ops reinstates the tenant. The post-booking verbs (cancel-quote, cancel, amend), the order reads, and capture and refund on an existing payment intent (whose 403 is PaymentForbidden) stay up, so no traveller is stranded. On the production deployment the same requests are refused PERMISSION_DENIED with details.reason TENANT_NOT_LIVE while the tenant's production activation has not been approved, whichever credential is presented, console session or API key; use the sandbox deployment until activation. Not retryable; the post-booking verbs stay up. - 404NOT_FOUND — an unknown offerRef (also another tenant's), or details.reason RETURN_OPTION_UNKNOWN: a returnOption key the latest listing of this offer did not answerApiErrorResponse
- 405ApiErrorResponse
VALIDATION — the public edge serves GET, POST, PUT, PATCH and DELETE only; any other method is refused before the platform sees it (details.reason METHOD_NOT_ALLOWED, details.source edge).Show more
VALIDATION — the public edge serves GET, POST, PUT, PATCH and DELETE only; any other method is refused before the platform sees it (details.reason METHOD_NOT_ALLOWED, details.source edge). Not retryable as sent. - 409ApiErrorResponse
OFFER_EXPIRED (details.reason OFFER_EXPIRED) — the offer is past expiresAt; search again.Show more
OFFER_EXPIRED (details.reason OFFER_EXPIRED) — the offer is past expiresAt; search again. Or CONFLICT details.reason JOURNEY_COMPLETE_ALREADY — the offer's journey is complete; reprice it - 413ApiErrorResponse
VALIDATION — the request body is larger than the surface's limit.Show more
VALIDATION — the request body is larger than the surface's limit. Not retryable as sent: shrink the body. Declared on every operation that takes a request body. details carries exactly one key, maxBodyBytes (integer): the limit that applies to this surface, in bytes. - 414ApiErrorResponse
VALIDATION — the request URI (path and query string) is longer than 8 KiB; the public edge refuses it before the platform sees it (details.reason URI_TOO_LONG, details.source edge).Show more
VALIDATION — the request URI (path and query string) is longer than 8 KiB; the public edge refuses it before the platform sees it (details.reason URI_TOO_LONG, details.source edge). Not retryable as sent: send long input in the body of a POST. - 415ApiErrorResponse
VALIDATION — a request body that is not JSON (application/json or application/*+json; a form body only on the OAuth token routes).Show more
VALIDATION — a request body that is not JSON (application/json or application/*+json; a form body only on the OAuth token routes). The public edge refuses it before the platform sees it (details.reason UNSUPPORTED_MEDIA_TYPE, details.source edge). Not retryable as sent: send Content-Type application/json. Declared on every operation that takes a JSON request body. - 422ApiErrorResponse
SOLD_OUT with details.reason OFFER_UNSELLABLE — a drill-down (detail, rules) of an offer the tenant's pricing rules cannot sell.Show more
SOLD_OUT with details.reason OFFER_UNSELLABLE — a drill-down (detail, rules) of an offer the tenant's pricing rules cannot sell. A drill-down shows one offer, so it cannot drop and count it as search does; it is refused, never answered at the supplier's net. - 429ApiErrorResponse
RATE_LIMITED — the API key or its tenant is over a rate limit; wait for Retry-After, then retry.Show more
RATE_LIMITED — the API key or its tenant is over a rate limit; wait for Retry-After, then retry. Every routed request is counted against two token buckets, the key's and the tenant's (all its keys together): 50 requests a second with a burst of 100 on the standard plan. Every travel verb except polling a search also spends from a supplier budget, per key and per tenant: 10 requests a second with a burst of 20, and a plan may add a daily quota of supplier calls. Answers carry the IETF RateLimit header fields for the tightest bucket consulted (RateLimit-Limit, RateLimit-Remaining, RateLimit-Reset, RateLimit-Policy); a refusal adds Retry-After and details.scope (KEY or TENANT), details.budget (PLATFORM or SUPPLIER), details.reason (RATE or DAILY_QUOTA), details.tier and details.retryAfterMs. A sandbox may run with the limiter off, in which case none of these headers is sent. A search that is still warming is a different answer with a different meaning (keep polling). with the key-velocity check on, also details.reason VELOCITY_LIMIT, a soft breach of the API key's own scope (components/responses/VelocityLimited), nextAction slow_down. - 500INTERNAL — a bug, and traceId is the support handle.ApiErrorResponse
- 501ApiErrorResponse
NOT_IMPLEMENTED — honest fallback; every production 501 is a capabilities-doc bug.Show more
NOT_IMPLEMENTED — honest fallback; every production 501 is a capabilities-doc bug. Also the order read routes (getOrder, listOrderDocuments, listOrderEvents, searchOrders) on a deployment with no order reader assembled; not retryable. - 502Also the order read routes (getOrder, listOrderDocuments, listOrderEvents, searchOrders) when the order store times out: details.store names the store, retryable true.ApiErrorResponse
- 503ApiErrorResponse
Errors you should handle
Branch on code and honour retryable — never on the HTTP status alone.
| 400 | VALIDATION offerRef OF-H-00000001 is not a flight offer; /v1/flights/returns takes an FLT offer. | not retryable |
| 401 | UNAUTHENTICATED The bearer token is expired. Re-authenticate and retry. | not retryable |
| 403 | PERMISSION_DENIED Role lacks the required scope: booking:write | not retryable |
| 403 | TAB_DISABLED Tenant acme-travel is not entitled to sell CRU | not retryable |
| 403 | OUT_OF_SCOPE The token's scope ladder does not reach this customer subtree | not retryable |
| 403 | TENANT_MISMATCH orderRef MO-8KD-2FQ-9XT does not belong to tenant acme-travel | not retryable |
| 403 | TENANT_SUSPENDED This tenant is suspended: new searches, quotes, holds, orders and payments are refused until it is reinstated. Existing orders can still be read, cancelled and amended. | not retryable |
| 404 | NOT_FOUND returnOption ro_00000101_9 is not one the latest listing of this offer answered; list the returns again. | not retryable |
| 405 | VALIDATION This method is not served. | not retryable |
| 409 | CONFLICT Every slice of this offer is already chosen; reprice it. | not retryable |
| 409 | OFFER_EXPIRED | not retryable |
| 413 | VALIDATION The request body is larger than this API accepts (262144 bytes). | not retryable |
| 414 | VALIDATION The request URI is longer than 8 KiB. | not retryable |
| 415 | VALIDATION Send application/json. | not retryable |
| 422 | SOLD_OUT This offer cannot be sold at a price within this tenant's pricing rules. Choose another offer. | not retryable |
| 429 | RATE_LIMITED Too many requests for this key on the supplier budget. Wait for the Retry-After interval before trying again. | retryable |
| 500 | INTERNAL An unexpected error occurred. Quote the traceId to support. | retryable |
| 501 | NOT_IMPLEMENTED seatmap is NOT_APPLICABLE for HTL; GET /v1/capabilities says so | not retryable |
| 502 | UPSTREAM_UNAVAILABLE Every supplier for HTL is circuit-open; no fan-out was attempted | retryable |
| 503 | PROVIDER_DOWN EXAMPLEHOTELS is unavailable; the order was not attempted and nothing was captured | retryable |