特价查询-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"
            }
          }
        }
      ]
    },"OriginDestination@R_415_4045@ion": [
      {
        "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
            }
          ]
        }
      ],"PriceRequest@R_415_4045@ion": {
        "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” 不是必填字段,即。 >

搜索可用性时无需使用此属性。