/v2/flight/init-searchStart a search
Fire-and-forget. You get a searchId immediately; fares arrive when you poll.
A 200 means the search started, not that results exist. Providers are queried in the background. The storefront agency is attached server-side from the principal so rows are priced with your markup — a client cannot influence that.
cURL
curl -X POST https://booking.aerolink.dev/v2/flight/init-search \
-H "Authorization: Bearer eyJ..." \
-H "Content-Type: application/json" \
-d '{"originDest":[{"departure":"DAC","arrival":"DXB","date":"2026-10-15"}],"travellers":{"adults":1,"children":0,"kids":0,"infants":0},"tripType":"ONE_WAY","cabinClass":"ECONOMY"}'Headers
AuthorizationBearerCustomer access token
Content-Typeapplication/jsonJSON body
AuthorizationBearer required | Customer access token |
Content-Typeapplication/json required | JSON body |
Request
{
"originDest": [
{ "departure": "DAC", "arrival": "DXB", "date": "2026-10-15" }
],
"travellers": { "adults": 1, "children": 0, "kids": 0, "infants": 0 },
"tripType": "ONE_WAY",
"cabinClass": "ECONOMY",
"preferredAirlines": ["EK"],
"isStudentFare": false,
"isOmrahFare": false,
"directFlight": false,
"radiusSearch": { "enabled": false, "miles": 50, "allowBorderCross": true }
}Body fields
originDestarrayOne entry per leg. Must be non-empty.
originDest[].departurestringOrigin IATA. Trimmed and upper-cased.
originDest[].arrivalstringDestination IATA
originDest[].datestringJourney date
travellers.adultsnumberMust be ≥ 1
travellers.childrennumberAged 8 when childAges is absent
travellers.kidsnumberAged 5 when childAges is absent
travellers.infantsnumberAged 1 when childAges is absent
travellers.childAgesnumber[]When present, replaces children, kids and infants entirely.
tripTypeenumONE_WAY, RETURN, …
cabinClassenumECONOMY, PREMIUM_ECONOMY, BUSINESS, PREMIUM_BUSINESS, FIRST_CLASS
preferredAirlinesstring[]Restricts which PCC sources are queried
isStudentFarebooleanSabre pax type STU
isOmrahFarebooleanSabre pax type ADR
directFlightbooleanNonstop only. Connecting itineraries are dropped after merge.
radiusSearchobjectSabre nearby-airport shop. BdFare ignores it. miles is 1–100 when enabled.
originDestarray required | One entry per leg. Must be non-empty. |
originDest[].departurestring required | Origin IATA. Trimmed and upper-cased. |
originDest[].arrivalstring required | Destination IATA |
originDest[].datestring required | Journey date |
travellers.adultsnumber required | Must be ≥ 1 |
travellers.childrennumber optional | Aged 8 when childAges is absent |
travellers.kidsnumber optional | Aged 5 when childAges is absent |
travellers.infantsnumber optional | Aged 1 when childAges is absent |
travellers.childAgesnumber[] optional | When present, replaces children, kids and infants entirely. |
tripTypeenum optional | ONE_WAY, RETURN, … |
cabinClassenum optional | ECONOMY, PREMIUM_ECONOMY, BUSINESS, PREMIUM_BUSINESS, FIRST_CLASS |
preferredAirlinesstring[] optional | Restricts which PCC sources are queried |
isStudentFareboolean optional | Sabre pax type STU |
isOmrahFareboolean optional | Sabre pax type ADR |
directFlightboolean optional | Nonstop only. Connecting itineraries are dropped after merge. |
radiusSearchobject optional | Sabre nearby-airport shop. BdFare ignores it. miles is 1–100 when enabled. |
Response
{
"message": "Success",
"data": {
"searchId": "9f2c...",
"initiatedAt": "2026-09-02T15:30:00"
},
"error": null
}Response fields
searchIdstringPoll results with this
initiatedAtdatetimeWhen the search started
searchIdstring | Poll results with this |
initiatedAtdatetime | When the search started |
Business rules
- The agency is part of the itinerary cache key, so two storefronts with different markups never share cached prices.
- IATA codes are trimmed and upper-cased for you.
Errors
Empty originDest, missing leg fields, no travellers, adults < 1, negative child counts, or both student and omrah fares.
Missing token or missing B2C_FLIGHT_SEARCH
| HTTP | message | When |
|---|---|---|
| 400 | validation failed | Empty originDest, missing leg fields, no travellers, adults < 1, negative child counts, or both student and omrah fares. |
| 401 / 403 | UNAUTHORIZED | Missing token or missing B2C_FLIGHT_SEARCH |