Travel routing

Plan a multi-provider flight search without dispatching

Feature-gated Locus Travel planning route. It validates the normalized search, applies credential and catalog restrictions, selects eligible providers, and returns the aggregate estimated charge. It does not contact travel providers or burn credits. estimateExact is false when at least one selected provider has a live or otherwise variable price.

post/wrapped/credits/locus-travel/flight-search/preview

Request

  • Base URL
    https://api.paywithlocus.com/api
  • URL
    https://api.paywithlocus.com/api/wrapped/credits/locus-travel/flight-search/preview
  • Auth
    • HTTP bearer
    • or HTTP bearer
    • or HTTP bearer
    • or HTTP bearer

Headers

X-Locus-Session-Idstring

Required only when the end-user JWT carries sid. Send the original high-entropy session value; sid is its SHA-256 fingerprint. Ignored for secret-key authentication.

X-Locus-End-Userstring

Case-sensitive immutable ID in the tenant namespace. Prefer an identity-provider subject, not an email address.

Optional end-user identity for a tenant secret or sandbox key. It must agree with body externalUserId when both are present.

Request body

originstring required

IATA code or place name. Three-letter codes are normalized to uppercase.

destinationstring required

Must differ from origin.

departureDatestring date required

Real calendar date in YYYY-MM-DD form.

returnDatestring date

Optional return date on or after departureDate.

adultsinteger
childreninteger
infantsinteger

Cannot exceed adults. Total travelers cannot exceed nine.

cabinClass'economy' | 'premium_economy' | 'business' | 'first'
currencystring
optimizestring[]

Cost favors fewer inexpensive sources, quality increases depth, and context favors compact agent-readable output.

preferredAirlinesstring[]
excludedAirlinesstring[]
preferredAirportsstring[]
excludedAirportsstring[]
maxStopsinteger
minLayoverMinutesinteger
maxLayoverMinutesinteger
maxDurationMinutesinteger
maxPricenumber

Maximum itinerary price in currency.

departAfterstring
departBeforestring
arriveAfterstring
arriveBeforestring
maxResultsinteger
maxProvidersinteger
providersstring[]

Optional explicit provider selection, still narrowed by credential, catalog, availability, and request compatibility.

externalUserIdstring

Case-sensitive immutable ID in the tenant namespace. Prefer an identity-provider subject, not an email address.

attributionobject

Optional JSON attribution copied to child calls.

Response

No-dispatch provider plan and aggregate estimate

object'locus.travel_flight_search.preview' required
capability'travel.flight_search' required
estimatedCostCreditsstring required

Non-negative exact decimal string with at most six fractional digits. Endpoint-specific positivity and amount limits still apply.

estimateExactboolean required
estimatedCostUsdnumber

Shown only to secret-key and dashboard principals.

Changes

No recorded changes to this operation across all 1 revision of this API.