问题描述
我们正在使用航班优惠搜索 API 并准备转移到 prod。但是,当我们搜索经济舱的航班时,价格甚至与“amadeus.net”搜索引擎结果或 TK(土耳其航空公司)网站的价格相差甚远。如果我们使用 BUSInesS 类作为参数,则 api 结果更接近实际价格。我们如何解决这个问题?
示例查询是:(IST - CGN 25th May ECONOMY and TK Opearated flight offsets 16:05 )
/v2/shopping/flight-offers?originLocationCode=IST&destinationLocationCode=CGN&departureDate=2021-05-25&adults=1&travelClass=ECONOMY&includedAirlineCodes=TK&nonStop=true&max=250
api 结果是:€206.55
传统知识网站:121 欧元
Amadeus.net 103 欧元
详细的API结果:
{
"Meta": {
"count": 2,"links": {
"self": "https://test.api.amadeus.com/v2/shopping/flight-offers?originLocationCode=IST&destinationLocationCode=CGN&departureDate=2021-05-25&adults=1&travelClass=ECONOMY&includedAirlineCodes=TK&nonStop=true&max=250"
}
},"data": [
{
"type": "flight-offer","id": "2","source": "GDS","instantTicketingrequired": false,"nonHomogeneous": false,"oneWay": false,"lastTicketingDate": "2021-05-25","numberOfBookableSeats": 9,"itineraries": [
{
"duration": "PT3H20M","segments": [
{
"departure": {
"iataCode": "IST","at": "2021-05-25T16:05:00"
},"arrival": {
"iataCode": "CGN","terminal": "2","at": "2021-05-25T18:25:00"
},"carrierCode": "TK","number": "1675","aircraft": {
"code": "321"
},"operating": {
"carrierCode": "TK"
},"duration": "PT3H20M","numberOfStops": 0,"blacklistedInEU": false
}
]
}
],"price": {
"currency": "EUR","total": "206.55","base": "134.00","fees": [
{
"amount": "0.00","type": "supplier"
},{
"amount": "0.00","type": "TICKETING"
}
],"grandTotal": "206.55"
},"pricingOptions": {
"fareType": [
"PUBLISHED"
],"includedCheckedBagsOnly": true
},"validatingAirlineCodes": [
"TK"
],"travelerPricings": [
{
"travelerId": "1","fareOption": "STANDARD","travelerType": "ADULT","price": {
"currency": "EUR","base": "134.00"
},"fareDetailsBySegment": [
{
"segmentId": "2","cabin": "ECONOMY","fareBasis": "QT2PXOW","class": "Q","includedCheckedBags": {
"weight": 30,"weightUnit": "KG"
}
}
]
}
]
}
],"dictionaries": {
"locations": {
"SAW": {
"cityCode": "IST","countryCode": "TR"
},"CGN": {
"cityCode": "CGN","countryCode": "DE"
},"IST": {
"cityCode": "IST","countryCode": "TR"
}
},"aircraft": {
"321": "AIRBUS A321","738": "BOEING 737-800"
},"currencies": {
"EUR": "EURO"
},"carriers": {
"TK": "TURKISH AIRLInes"
}
}
}
提前致谢
解决方法
您看到不同价格的原因有两个:
- 自助服务 API 返回来自 GDS 的已发布机票价格,而不是任何协商好的机票价格。这意味着 API 返回的航班可能比您在 OTA 或航空公司网站上找到的航班更贵。
- 在您使用的测试环境中,您可以访问缓存的航班数据,这些数据可能与实时价格不同。