Sabre REST API OTA_AirLowFareSearchRQ获得不间断航班

时间:2016-02-10 14:56:50

标签: api rest sabre

我正在使用SABRE REST API中的BFM服务。我正在尝试使用对象:TPA_Extensions.DiversityParameters.AdditionalNonStopsPercentage TravelPreferences.FlightTypePref.FlightType

获得直飞航班(Non Stops Flights)

但答案总是:400 Bad Request

{
"status": "NotProcessed",
"type": "Validation",
"errorCode": "ERR.RAF.VALIDATION",
"timeStamp": "2016-02-10T14:24:13+00:00",
"message": "[{\"level\":\"error\",\"schema\":{\"loadingURI\":\"#\",\"pointer\":\"/definitions/org.opentravel.ota._2003._05.OTAAirLowFareSearchRQ.TPAExtensions\"},\"instance\":{\"pointer\":\"/OTA_AirLowFareSearchRQ/TPA_Extensions\"},\"domain\":\"validation\",\"keyword\":\"additionalProperties\",\"message\":\"object instance has properties which are not allowed by the schema: [\\\"DiversityParameters\\\"]\",\"unwanted\":[\"DiversityParameters\"]}]"

}

有人有同样的问题吗? 提前谢谢

2 个答案:

答案 0 :(得分:1)

如果您想添加nonnumstop,则必须添加到OTA_AirLowFareSearchRQ,如下面的xml所示:

<PriceRequestInformation xmlns="http://webservices.sabre.com/sabreXML/2011/10">
<OptionalQualifiers>
  <FlightQualifiers NumStops="0" />
  <PricingQualifiers CurrencyCode="VND">
    <PassengerType Code="ADT" Quantity="1" />
  </PricingQualifiers>
</OptionalQualifiers>

答案 1 :(得分:0)

试试这个

"DiversityParameters" : {
    "AdditionalNonStopsPercentage" : 20
}

"DiversityParameters" : {
    "AdditionalNonStopsNumber" : 5
}

此代码用于平衡BFM结果。