In Amedeus Api call, I'm passing an infant with an Adult but it return the below error.
I'm not getting the actual mistake that how to pass an infant with an adult.
{
"errors": [
{
"code": 32171,
"title": "MANDATORY DATA MISSING",
"detail": "Missing associated Adult Id for HELD_INFANT",
"source": {
"pointer": "/travelers[2]"
},
"status": 400
}
]
}
You have to define in the JSON body of the request the associatedAdultId
which is to the adult traveler id who will share the seat with the held infant.
{
"originDestinations": [
{
"id": "1",
"originLocationCode": "BCN",
"destinationLocationCode": "MAD",
"departureDateTimeRange": {
"date": "2022-05-01",
"time": "10:00:00"
}
},
{
"id": "2",
"originLocationCode": "MAD",
"destinationLocationCode": "ATH",
"departureDateTimeRange": {
"date": "2022-05-11",
"time": "10:00:00"
}
}
],
"travelers": [
{
"id": "1",
"travelerType": "ADULT",
"fareOptions": [
"STANDARD"
]
},
{
"id": "2",
"travelerType": "HELD_INFANT",
"associatedAdultId": "1",
"fareOptions": [
"STANDARD"
]
}
],
"sources": [
"GDS"
]
}
You can check out the specification of the Flight Offers Search API for more details.