2016-02-10 53 views
0

我在SABRE REST API中使用BFM服務。我試着只得到直航(非停止航班)使用對象:TPA_Extensions.DiversityParameters.AdditionalNonStopsPercentage TravelPreferences.FlightTypePref.FlightTypeSaber REST API OTA_AirLowFareSearchRQ獲取不間斷航班

但答案是永諾: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\"]}]" 

}

有別人有同樣的問題?
thanx提前

+0

你可以發佈你的請求和你用來測試的端點嗎? – fcarreno

回答

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> 

0

試試這個

"DiversityParameters" : { 
    "AdditionalNonStopsPercentage" : 20 
} 

"DiversityParameters" : { 
    "AdditionalNonStopsNumber" : 5 
} 

此代碼用於平衡BFM結果。

+1

請詳細說明並解釋爲什麼這是一個有用的答案。 – herrbischoff