You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

使用Sabre BFM REST API重验行程时遇无可用舱位错误求助

问题:调用Sabre航班重验接口返回NAV错误(No Availability)

使用Sabre BFM REST API获取航班详情后,调用https://api.platform.sabre.com/v5/shop/flights/revalidate接口进行往返行程重验,无论往返地如何,均返回含NAV错误码的"No Availability"响应。

请求体

{
  "OTA_AirLowFareSearchRQ": {
     "Version": "4.1.0",
     "ResponseType": "OTA",
     "POS": {
        "Source": [
            {
                "PseudoCityCode": "xxxx",
                "RequestorID": {
                    "Type": "1",
                    "ID": "1",
                    "CompanyName": {
                        "Code": "TN",
                        "content": "TN"
                    }
                }
            }
        ]
    },
    "AvailableFlightsOnly": true,
    "OriginDestinationInformation": [
        {
            "RPH": "1",
             "DepartureDateTime": "2025-08-01T06:30:00",
            "OriginLocation": {
                "LocationCode": "YYZ"
            },
            "DestinationLocation": {
                "LocationCode": "PEK"
            },
            "TPA_Extensions": {
                "SegmentType": { 
                    "Code": "X"
                },
                "Flight": [
                    {
                        "Number": 181,
                       "DepartureDateTime": "2025-08-01T06:30:00",
                  "ArrivalDateTime": "2025-08-01T08:21:00",
                        "Type": "A",
                        "ClassOfService": "L",
                        "OriginLocation": {
                            "LocationCode": "YYZ"
                        },
                        "DestinationLocation": {
                            "LocationCode": "YVR"
                        },
                        "Airline": {
                            "Operating": "AC",
                            "Marketing": "AC"
                        }
                    },
                    {
                        "Number": 29,
                        "DepartureDateTime": "2025-08-01T12:20:00",
                  "ArrivalDateTime": "2025-08-02T16:10:00",

                        "Type": "A",
                        "ClassOfService": "L",
                        "OriginLocation": {
                            "LocationCode": "YVR"
                        },
                        "DestinationLocation": {
                            "LocationCode": "PEK"
                        },
                        "Airline": {
                            "Operating": "AC",
                            "Marketing": "AC"
                        }
                    }
                  

                ]
            }
        },

        {
            "RPH": "2",
            "DepartureDateTime": "2025-08-15T18:05:00",
                                        
            "OriginLocation": {
                "LocationCode": "PEK"
            },
            "DestinationLocation": {
                "LocationCode": "YYZ"
            },
            "TPA_Extensions": {
                "SegmentType": {
                    "Code": "X"
                },
                "Flight": [
                    {
                        "Number": 30,
                        "DepartureDateTime": "2025-08-15T18:05:00",
                        "ArrivalDateTime": "2025-08-15T14:10:00",
                        
                        "Type": "A",
                        "ClassOfService": "L",
                        "OriginLocation": {
                            "LocationCode": "PEK"
                        },
                        "DestinationLocation": {
                            "LocationCode": "YVR"
                        },
                        "Airline": {
                            "Operating": "AC",
                            "Marketing": "AC"
                        }
                    },
                    {
                        "Number": 186,
                        "DepartureDateTime": "2025-08-15T16:30:00",
                        "ArrivalDateTime": "2025-08-16T00:05:00",
                        "Type": "A",
                        "ClassOfService": "L",
                        "OriginLocation": {
                            "LocationCode": "YVR"
                        },
                        "DestinationLocation": {
                            "LocationCode": "YYZ"
                        },
                        "Airline": {
                            "Operating": "AC",
                            "Marketing": "AC"
                        }
                    }
                   
                ]
            }
        }
    ],
    "TravelPreferences": {
        "Baggage": {
            "RequestType": "A",
            "Description": true
        },
        
        "TPA_Extensions": {
           
    "DataSources": {
      "NDC": "Disable",
      "ATPCO": "Enable",
      "LCC": "Disable"
    },
    "PreferNDCSourceOnTie": {
      "Value": true
    }
        }
    },
    "TravelerInfoSummary": {
        "SeatsRequested": [
            2
        ],
        "AirTravelerAvail": [
            {
                "PassengerTypeQuantity": [
                    {
                        "Quantity": 1,
                        "Code": "ADT",
                        "TPA_Extensions": {
                            "VoluntaryChanges": {
                                "Match": "Info"
                            }
                        }
                    },
                    {
                        "Quantity": 1,
                        "Code": "C07",
                        "TPA_Extensions": {
                            "VoluntaryChanges": {
                                "Match": "Info"
                            }
                        }
                    }
                ]
            }
        ],
        "PriceRequestInformation": {
            "CurrencyCode": "CAD",
            "TPA_Extensions": {
                 "BrandedFareIndicators": {
                    "MultipleBrandedFares": true,
                    "ItinParityBrandlessLeg": false
                },
                 "PrivateFare": {
                            "Ind": true
                        },
                "Priority": {
                    "Price": {
                        "Priority": 2
                    },
                    "DirectFlights": {
                        "Priority": 1
                    },
                    "Time": {
                        "Priority": 3
                    },
                    "Vendor": {
                        "Priority": 4
                    }
                }
            }
        }
    },
    "TPA_Extensions": {
        "IntelliSellTransaction": {
            "RequestType": {
                "Name": "50ITINS"
            }
        }
    }
  }
}

响应体

{
    "groupedItineraryResponse": {
        "version": "6.7.2",
        "messages": [
            {
                "severity": "Info",
                "type": "SERVER",
                "code": "GCB15-ISELL-TN-00-2025-01-00-6514",
                "text": "27131"
            },  
            {
                "severity": "Info",
                "type": "WORKERTHREAD",
                "code": "TRANSACTIONID",
                "text": "6961607691376984146"
            },
            {
                "severity": "Info",
                "type": "DRE",
                "code": "RULEID",
                "text": "24113"
            },
            {
                "severity": "Info",
                "type": "DEFAULT",
                "code": "RULEID",
                "text": "24111"
            },
            {
                "severity": "Error",
                "type": "ERR",
                "code": "NAV",
                "text":"No Availability"
            }
        ],
        "statistics": { "itineraryCount": 0 }
    }
}

C#调用代码

string requestContent = data; //Json Request Data 
string strUrl = "https://api.platform.sabre.com/v5/shop/flights/revalidate";
string authtoken="Auth token here";

 using (var httpClient = new System.Net.Http.HttpClient())
{
    ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;
    reqSendTime = DateTime.Now.ToString();
    httpClient.DefaultRequestHeaders.Accept.Clear();
    httpClient.DefaultRequestHeaders.Add("Cache-control", "no-cache");
    httpClient.DefaultRequestHeaders.Add("Accept", "application/json");
    httpClient.DefaultRequestHeaders.Add("Authorization", "Bearer " + authtoken);
    System.Net.Http.HttpContent content = new System.Net.Http.StringContent(requestContent, System.Text.Encoding.UTF8, "application/json");
    RequestRespanceData = httpClient.PostAsync(strUrl, content).Result;
    
}

排查及解决建议

  • 修正行程时间逻辑:返程段中AC30到达YVR的时间为2025-08-15T14:10:00,后续AC186的出发时间为2025-08-15T16:30:00,虽时区差异导致时间数值上合理,但建议统一使用UTC格式时间避免系统解析错误;同时检查是否存在输入笔误,比如AC186的出发时间应为18:30而非16:30。
  • 验证舱位与日期有效性:测试的2025年8月属于远期航班,部分航司可能未开放该时段舱位;L舱为低价舱,大概率已售罄。建议改为Y舱(全价经济舱),或选择1-2个月内的近期日期进行测试。
  • 调整请求体参数:
    • 将AvailableFlightsOnly设为false,获取更详细的错误诊断信息,而非直接返回无可用。
    • 移除PrivateFare的Ind: true配置,若当前账号无私有运价权限,该参数会过滤所有公开舱位。
    • 修改SegmentType.Code为"S":Sabre文档中指定航班重验需使用该代码,"X"会导致接口无法正确识别行程类型。
  • 确认乘客类型合法性:C07属于自定义乘客类型,需确认当前PseudoCityCode支持该类型,否则替换为标准代码如CNN(儿童)测试。
  • 检查权限与环境一致性:验证Auth Token是否包含Shop Flights Revvalidate权限;确认PseudoCityCode对应正确的环境(测试/生产),不同环境的航班数据相互隔离。
  • 手动验证行程可用性:在Sabre Red或官方测试工具中查询该往返行程的L舱是否存在,排除真实无舱位的场景。

内容的提问来源于stack exchange,提问作者Heemanshu Bhalla

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.14 13:40:55