FX-Port API
Flights

Flight passengers & ages

Flight passenger types, age rules evaluated at departure, seated vs lap infants, required age arrays, and capacity limits.

These rules are specific to flights. Hotels and eSIMs have their own passenger/guest requirements, documented under their own sections as those products launch.

Ages are evaluated at the departure date of the first flight segment, not the booking date. A passenger who turns 12 on/before departure must be ticketed as an adult; an infant who turns 2 on/before departure must be ticketed as a child (and given a seat). The wrong type causes check-in rejection and possible rebooking fees.

Passenger types

Search count fieldBooking typeAge at departureSeatAge array (search)
adultsadult18+own
seniorssenior60+own
young_adultsyoung_adult12–17ownyoung_adult_ages
childrenchild2–11ownchild_ages (required)
infantsinfantunder 2lap (on an adult)infant_ages (required)
seated_infantsseated_infantunder 2own seatseated_infant_ages (required)
  • Lap infant (infants): sits on an adult's lap, no seat, no separate ticket in most markets.
  • Seated infant (seated_infants): occupies a full seat and needs a ticket. Use this when the family wants a dedicated seat for an under-2, or when the infant will turn 2 before travel.
  • Child age 2+ (children): is a regular seated child. One adult may travel with multiple children, and an age-2 child can travel alongside one lap infant.

Search — passengers object

Pass counts plus a parallel _ages array for every type that requires one. Array length must equal the count.

The following is a valid six-passenger request: two adults, two children, one lap infant, and one seated infant.

{
  "adults": 2,
  "seniors": 0,
  "young_adults": 0,
  "children": 2,
  "child_ages": [10, 6],
  "infants": 1,
  "infant_ages": [1],
  "seated_infants": 1,
  "seated_infant_ages": [1]
}
ArrayRequired whenValue range (years at departure)
child_ageschildren > 02–11
infant_agesinfants > 00–1
seated_infant_agesseated_infants > 00–1
young_adult_agesyoung_adults > 012–17

Passenger limits can be supplier-specific. Some suppliers require one distinct adult or senior for every under-2 passenger across seated and lap infants. During automatic or multi-supplier searches, FX-Port silently skips any incompatible supplier and returns results from the compatible suppliers. HTTP 400 is returned only when no selected supplier can serve the passenger mix. This restriction does not apply to normal children aged 2–11.

Capacity constraints

RuleLimit
Maximum seated passengers9 (adults + seniors + young_adults + children + seated_infants)
Lap infants (infants)Cannot exceed adults + seniors (each lap infant needs a lap)
Under-2 seated infants (seated_infants)Cannot exceed adults + seniors; children aged 2–11 are unrestricted by this rule
Supplier-specific under-2 ruleSome suppliers require seated_infants + infants <= adults + seniors
Accompanying travelerStandard online bookings should include at least 1 adult or senior. Unaccompanied-minor availability is airline-specific.

When no selected supplier is compatible, the API returns:

{
  "success": false,
  "error": "SUPPLIER_PASSENGER_COMBINATION_UNSUPPORTED",
  "message": "No available flight provider supports this passenger combination. Some providers require one adult or senior for each passenger under age 2.",
  "limitation": {
    "scope": "supplier_specific",
    "code": "UNDER_TWO_HOST_RATIO",
    "underTwoPassengers": 2,
    "adultSeniorHosts": 1
  }
}

Common mistakes

These are the most frequent errors that cause bookings to fail, get rejected at check-in, or misprice.

// ❌ children count without ages → validation error / wrong price
{
  "adults": 1,
  "children": 2
}

// ✅
{
  "adults": 1,
  "children": 2,
  "child_ages": [8, 5]
}

// ❌ infant turning 2 before departure booked as lap "infant"
//    → airline rejects at check-in; they need their own seat
{
  "adults": 1,
  "infants": 1
}

// ✅ classify a passenger who is 2 at departure as a child
{
  "adults": 1,
  "children": 1,
  "child_ages": [2]
}

// ❌ more lap infants than adults
{
  "adults": 1,
  "infants": 2,
  "infant_ages": [0, 1]
}

// ❌ 10 seated passengers (exceeds the 9-seat limit)
{
  "adults": 5,
  "children": 5,
  "child_ages": [4, 5, 6, 7, 8]
}

// ✅ split into two separate bookings (max 9 seated each)

Booking — passenger object

When building the passengers array for book_flight, each object must have:

FieldTypeRequiredDescription
typestringYesadult, senior, young_adult, child, infant, or seated_infant
genderstringYesMALE or FEMALE
first_namestringYesGiven name as on passport
last_namestringYesFamily name as on passport
date_of_birthstringYesYYYY-MM-DD — used to verify age at departure
identity_documentsarrayYesOne passport per passenger

Names must use plain Latin (ASCII) letters only. Airlines and GDS systems reject accents and non-Latin scripts. Romanize before sending: Jose not José, Muller not Müller; transliterate Arabic/Cyrillic/Chinese (Mohammed, Ivanov, Wang). Allowed: A–Z, a–z, spaces, hyphens.

This name rule applies to all bookings (flights, hotels, transfers, eSIMs) — the hotels and eSIMs sections will restate it as those products launch.

Identity document object

FieldTypeRequiredDescription
typestringYespassport
numberstringYesDocument number
issuing_countrystringYesISO 3166-1 alpha-2 (e.g. DZ, EG, FR)
expiry_datestringYesYYYY-MM-DD
nationalitystringNoISO 3166-1 alpha-2

Always supply a passport — it is accepted for both domestic and international travel.

On this page