如何解决特价查询-CVC枚举有效错误
尝试将请求发送到Bargain Finder API时出现错误。似乎它与“ SegmentType”结构中的“ Code”变量有关,我想知道是什么导致了此错误,以及如何解决此问题,以及希望成功完成响应的最小/必需值是什么。(“ https ://api.sabre.com/v4.3.0/shop/altairports/flights?mode = live“)。我非常感谢您的帮助?
JSON请求:
{
"OTA_AirLowFareSearchRQ": {
"TravelPreferences": {
"VendorPref": [
{
"Code": "YY","PreferLevel": "Unacceptable"
}
]
},"TPA_Extensions": {
"IntelliSellTransaction": {
"RequestType": {
"Name": "200ITINS"
}
}
},"POS": {
"Source": [
{
"PseudoCityCode": "XXXX","RequestorID": {
"Type": "0.AAA.X","ID": "REQ.ID","CompanyName": {
"Code": "TN"
}
}
}
]
},"OriginDestinationInformation": [
{
"RPH": "1","DepartureDateTime": "2020-10-16T11:27:00","OriginLocation": {
"LocationCode": "ATL"
},"DestinationLocation": {
"LocationCode": "BOS"
},"TPA_Extensions": {
"SegmentType": {
"Code": "o"
},"Flight": [
{
"Number": 1200,"DepartureDateTime": "2020-12-16T11:27:00","ArrivalDateTime": "2020-12-16T13:58:00","Type": "A","ClassOfService": "Y","BookingDateTime": "2020-11-01T10:03:00","OriginLocation": {
"LocationCode": "ATL"
},"DestinationLocation": {
"LocationCode": "BOS"
},"Airline": {
"Operating": "K0","Marketing": "K0"
}
}
]
}
}
],"TravelerInfoSummary": {
"SeatsRequested": [
1
],"AirTravelerAvail": [
{
"PassengerTypeQuantity": [
{
"Code": "ADT","Quantity": 1
}
]
}
],"PriceRequestInformation": {
"NegotiatedFaresOnly": false,"Reprice": false,"ProcessThruFaresOnly": false,"TPA_Extensions": {
"Priority": {
"Price": {
"Priority": 1
},"DirectFlights": {
"Priority": 2
},"Time": {
"Priority": 3
},"Vendor": {
"Priority": 4
}
}
}
}
}
}
}
回复:
{
"status": "Unknown","reportingSystem": "RAF","timeStamp": "2020-09-23T17:50:41+00:00","type": "Application","errorCode": "ERR.RAF.APPLICATION","instance": "raf-darhlc005.sabre.com-8080","message": "{\"OTA_AirLowFareSearchRS\":{\"Version\":\"4.3.0\",\"Errors\":{\"Error\":[{\"Type\":\"SERVER\",\"ShortText\":\"80\",\"Code\":\"ase032lpscil7c6\",\"content\":\"TOMCAT\"},{\"Type\":\"ERR\",\"ShortText\":\"Schema Validation Failed\",\"Code\":\"INVALIDREQ\",\"content\":\"cvc-enumeration-valid: Value 'o' is not facet-valid with respect to enumeration '[ARUNK,O,X]'. It must be a value from the enumeration.\"},\"content\":\"cvc-attribute.3: The value 'o' of attribute 'Code' on element 'ns0:SegmentType' is not valid with respect to its type,'null'.\"}]}},\"Links\":[{\"rel\":\"self\",\"href\":\"https://api-crt.cert.havail.sabre.com/v4.3.0/shop/flights?mode=live\"},{\"rel\":\"linkTemplate\",\"href\":\"https://api-crt.cert.havail.sabre.com/<version>/shop/flights?mode=<mode>&limit=<limit>&offset=<offset>&enabletagging=<enabletagging>\"}]}"
}
解决方法
@塞缪尔,
分析您的请求后,我发现服务 $。OriginDestinationInformation.TPA_Extensions.SegmentType.code =“ 0” 不是必填字段,即。 >
搜索可用性时无需使用此属性。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。