带婴儿的 Amadeus 多城市航班搜索请求
Amadeus multicity flight-search request with infants
在 Amedeus Api 调用中,我正在传递一个婴儿和一个成人,但它 return 出现以下错误。
我没有弄清楚如何让婴儿与成人一起传递的实际错误。
{
"errors": [
{
"code": 32171,
"title": "MANDATORY DATA MISSING",
"detail": "Missing associated Adult Id for HELD_INFANT",
"source": {
"pointer": "/travelers[2]"
},
"status": 400
}
]
}
您必须在请求的 JSON 正文中定义 associatedAdultId
这是与婴儿共享座位的成人旅客 ID。
{
"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"
]
}
您可以查看航班优惠搜索 API 的 specification 了解更多详情。
在 Amedeus Api 调用中,我正在传递一个婴儿和一个成人,但它 return 出现以下错误。
我没有弄清楚如何让婴儿与成人一起传递的实际错误。
{
"errors": [
{
"code": 32171,
"title": "MANDATORY DATA MISSING",
"detail": "Missing associated Adult Id for HELD_INFANT",
"source": {
"pointer": "/travelers[2]"
},
"status": 400
}
]
}
您必须在请求的 JSON 正文中定义 associatedAdultId
这是与婴儿共享座位的成人旅客 ID。
{
"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"
]
}
您可以查看航班优惠搜索 API 的 specification 了解更多详情。