Passenger and cabin examples
Family groups, lap and seated infants, adult-senior-young mixes and cabin-class searches, with real request and response examples.
Search examples for every kind of traveler and cabin. The rules are in Flight passengers & ages; the response fields are in Search flights. Every response on this page was captured from the sandbox on 2026-11-01 and trimmed. The counts in a search must match the passenger objects you send later to book_flight.
Family: adults, child, lap infant
curl https://api.fx-port.com/api/v1/get_flights \
-H "Authorization: Bearer fxp_test_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"origin": "ALG",
"destination": "CDG",
"departure_date": "2026-12-15",
"cabin_class": "economy",
"passengers": {
"adults": 2,
"children": 1,
"child_ages": [
8
],
"infants": 1,
"infant_ages": [
1
]
},
"supplier_id": "duffel_1"
}'Response example
travelerPricing has one entry per traveler, grouped by type (adults, then children, then infants), not in the order you would list the family. The type of a lap infant is HELD_INFANT:
{
"pricing": {
"supplierCurrency": "USD",
"agencyCurrency": "DZD",
"finalPrice": 64971.32
},
"travelerPricing": [
{ "travelerType": "ADULT", "price": { "base": 12994.26, "total": 16242.83 } },
{ "travelerType": "ADULT", "price": { "base": 12994.26, "total": 16242.83 } },
{ "travelerType": "CHILD", "price": { "base": 12994.26, "total": 16242.83 } },
{ "travelerType": "HELD_INFANT", "price": { "base": 12994.26, "total": 16242.83 } }
]
}Complete mix with a seated infant
Two adults, two children, one lap infant and one seated infant. The payload is the same for every supplier; a supplier that cannot serve the mix is skipped.
curl https://api.fx-port.com/api/v1/get_flights \
-H "Authorization: Bearer fxp_test_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"origin": "ALG",
"destination": "CDG",
"departure_date": "2026-12-15",
"cabin_class": "economy",
"passengers": {
"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
]
},
"supplier_ids": [
"amadeus_aqc_dz_1",
"duffel_1"
]
}'Both suppliers answered with six travelerPricing entries: ADULT ×2, CHILD ×2, SEATED_INFANT and HELD_INFANT. Amadeus Algeria returned 59 offers and priced the entries 29,856.00 (adult), 23,495.24 (child), 23,495.24 (seated infant) and 4,205.82 (lap infant) in DZD.
One adult with two infants
Some suppliers need one adult or senior for each passenger under two years old, seated and lap infants together. An adult with one seated and one lap infant is valid at the FX-Port level:
curl https://api.fx-port.com/api/v1/get_flights \
-H "Authorization: Bearer fxp_test_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"origin": "ALG",
"destination": "CDG",
"departure_date": "2026-12-29",
"cabin_class": "economy",
"passengers": {
"adults": 1,
"seated_infants": 1,
"seated_infant_ages": [
0
],
"infants": 1,
"infant_ages": [
0
]
}
}'Do not force a supplier. FX-Port skips the suppliers that cannot serve the mix and returns the others: here only Amadeus Algeria answered (three travelerPricing entries: ADULT, SEATED_INFANT, HELD_INFANT) and Duffel was left out without a warning. When no supplier is left (the same search on LHR to CDG, where only Duffel can fly), the answer is 400 supplier_passenger_combination_unsupported:
{
"environment": "sandbox",
"success": false,
"requestId": "3ead8580",
"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,
"description": "Some providers require one adult or senior for each passenger under age 2. Children aged 2-11 are not subject to this limit."
}
}A traveler who is already two years old belongs in children, not in seated_infants: children aged 2 to 11 do not use an infant-host slot.
Adult, senior and young adult
curl https://api.fx-port.com/api/v1/get_flights \
-H "Authorization: Bearer fxp_test_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"origin": "ALG",
"destination": "CDG",
"departure_date": "2026-12-15",
"cabin_class": "economy",
"passengers": {
"adults": 1,
"seniors": 1,
"young_adults": 1,
"young_adult_ages": [
16
]
},
"supplier_id": "duffel_1"
}'The travelerPricing entries are ADULT, SENIOR and YOUNG. A supplier can price a senior or a young adult as an adult internally; FX-Port keeps the type you asked for in the response. The type names in the response are ADULT, SENIOR, YOUNG, CHILD, SEATED_INFANT and HELD_INFANT; the type you send when booking is lower case (adult, senior, young_adult, child, seated_infant, infant).
The ages decide the traveler
The ages are what a supplier prices, so they win over the counts. The API does not reject a mismatch: it changes the search the way the table says and, in the new release, tells you in a coerced_value warning. Check travelerPricing on the first offer.
| You send | You get (observed) |
|---|---|
"children": 2, "child_ages": [8] | One child. The count is cut to the number of ages. |
"children": 1, "child_ages": [1] | No child: an age under 2 is not a child. One adult is priced. |
"children": 1, "child_ages": [15] | A YOUNG, not a CHILD. |
"infants": 1, "infant_ages": [3] | A CHILD, not an infant. |
"children": 2 with no ages | Two children aged 11, with a coerced_value warning. |
"adults": 2, "infants": 1 with no ages | One lap infant aged 0, no warning: age 0 is the default that is almost always right. |
"adults": "2" or 2.0 (text or a float instead of an integer) | Read as 2, with a coerced_value warning that asks for a JSON integer. Words, fractions, negatives and numbers above 99 stay 400 invalid_passenger_count. |
"child_ages": "7,9" or "child_ages": 7 | Read as [7, 9] and [7], with a warning. A fractional age (0.5) counts as the years completed (0). |
Send the real age at departure of each traveler, and compare travelerPricing with the travelers you meant before you show a price.
Cabin classes
cabin_class is economy (default), premium_economy, business, first or any. Case, spaces, dashes and underscores do not matter (Premium Economy and premium-economy are premium_economy); premium and business_class-style names are read with a coerced_value warning. A value that is not one of these (coach, Y) is rejected with 400 invalid_cabin_class. See Search flights.
curl https://api.fx-port.com/api/v1/get_flights \
-H "Authorization: Bearer fxp_test_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"origin": "DXB",
"destination": "BOM",
"departure_date": "2026-12-15",
"cabin_class": "business",
"passengers": {
"adults": 1
},
"supplier_id": "duffel_1"
}'The sandbox returned 39 offers; the segments have cabin: "BUSINESS".
curl https://api.fx-port.com/api/v1/get_flights \
-H "Authorization: Bearer fxp_test_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"origin": "DXB",
"destination": "BOM",
"departure_date": "2026-12-15",
"cabin_class": "premium_economy",
"passengers": {
"adults": 1
},
"supplier_id": "duffel_1"
}'16 offers; cabin: "PREMIUM_ECONOMY".
curl https://api.fx-port.com/api/v1/get_flights \
-H "Authorization: Bearer fxp_test_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"origin": "DXB",
"destination": "BOM",
"departure_date": "2026-12-15",
"cabin_class": "first",
"passengers": {
"adults": 1
},
"supplier_id": "duffel_1"
}'One offer on this route; cabin: "FIRST".
curl https://api.fx-port.com/api/v1/get_flights \
-H "Authorization: Bearer fxp_test_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"origin": "DXB",
"destination": "BOM",
"departure_date": "2026-12-15",
"cabin_class": "any",
"passengers": {
"adults": 1
},
"supplier_id": "duffel_1"
}'any sends no cabin restriction: 102 offers here, in different cabins. Read cabin on each segment.
Related
- Flight passengers & ages: types, ages and the capacity rules.
- Search flights and Basic routes.