我正在尝试使用Sabre提供的REST Revalidate Itinerary服务。如果您有权访问saber开发者网站,可以在此处找到详细信息: https://developer.sabre.com/docs/read/rest_apis/air/search/revalidate_itinerary
我按照指示发布到api.sabre.com/v3.3.0/shop/flights/revalidate,但我收到的是404,并在该网址上显示“没有服务”的消息。
有没有人能够让这个工作,或者有人知道正确的网址吗?
使用Fiddler获得的原始响应更新:
HTTP/1.1 404 Not Found
date: Wed, 21 Feb 2018 17:05:39 GMT
EnvType: production
message-id: EogQto
singularityheader: appId=1448*ctrlguid=1516860998*acctguid=9e6c885b-de5c-4175-ac13-773e8d4b7ab2*ts=1519232739414*btid=16580*guid=5daa09fd-ca10-4c8b-b35c-968a410d211e*exitguid=1|1*unresolvedexitid=49225*tcop=1:2058128*cidfrom=171608*etypeorder=JMS*esubtype=JMS*cidto={[UNRESOLVED][49225]}*tcop=1:2058128
x-provider-instance-id: raf-darhlp010-8080
Content-Type: application/json;charset=UTF-8
Content-Length: 255
Server: Sabre Gateway
{"status":"Complete","reportingSystem":"RAF","timeStamp":"2018-02-21T17:05:39+00:00","type":"Application","errorCode":"WARN.RAF.APPLICATION","instance":"raf-darhlp010-8080","message":"No service exists for: /cto-darwin-raf/v3.4.0/shop/flights/revalidate"}
这是我的有效载荷:
POST https: //api.havail.sabre.com/v3.4.0/shop/flights/revalidate?mode=live HTTP/1.1
Authorization: Bearer T1RLAQJ940LxYe01yXkBtjZ6g6PEJkjPfxDiW51CX1eYL52BV7ZR+vuQAACw70cYo2xd9slV8ZA8cpJFXg+4qGrxxg83PFKleE3Vm7AHTbrztkg3aHccOVLazItRcJmtR/Ohz96mz +em96HYv2n8SVBgdKTvcN1rwhBXrFsmGKY8E+LUK2wBPSQVz8kGmPW89G//EPp1igTJaaWZrJFxoq40G8SCS0HEyt3RTMNmVLtv7q0a+xuQWYJyGKpxSujRIeJzajN86YiJ7+Eck8rpyFnVOyIlKnO5fiX6C6E*
Content-Type: application/json; charset=utf-8
Host: api.havail.sabre.com
Content-Length: 1204
Expect: 100-continue
{
"OTA_AirLowFareSearchRQ": {
"POS": {
"Source": [
{
"RequestorID": {
"CompanyName": {
"Code": "TN"
},
"Type": "1",
"ID": "1"
},
"PseudoCityCode": "C94H"
}
]
},
"OriginDestinationInformation": [
{
"DepartureDateTime": "2018-03-23T08:50:00",
"OriginLocation": {
"LocationCode": "LHR"
},
"DestinationLocation": {
"LocationCode": "JFK"
},
"TPA_Extensions": {
"Flight": [
{
"OriginLocation": {
"LocationCode": "LHR"
},
"DestinationLocation": {
"LocationCode": "JFK"
},
"Airline": {
"Operating": "VS",
"Marketing": "DL"
},
"ClassOfService": "B",
"Number": 4370.0,
"DepartureDateTime": "2018-03-23T08:50:00",
"ArrivalDateTime": "2018-03-23T13:00:00",
"Type": "A"
}
]
},
"RPH": "1"
},
{
"DepartureDateTime": "2018-03-24T19:30:00",
"OriginLocation": {
"LocationCode": "JFK"
},
"DestinationLocation": {
"LocationCode": "LHR"
},
"TPA_Extensions": {
"Flight": [
{
"OriginLocation": {
"LocationCode": "JFK"
},
"DestinationLocation": {
"LocationCode": "LHR"
},
"Airline": {
"Operating": "VS",
"Marketing": "DL"
},
"ClassOfService": "B",
"Number": 4373.0,
"DepartureDateTime": "2018-03-24T19:30:00",
"ArrivalDateTime": "2018-03-25T07:30:00",
"Type": "A"
}
]
},
"RPH": "2"
}
],
"TravelerInfoSummary": {
"SeatsRequested": [
1
],
"AirTravelerAvail": [
{
"PassengerTypeQuantity": [
{
"Code": "ADT",
"Quantity": 1
}
]
}
],
"PriceRequestInformation": {
"TPA_Extensions": {}
}
}
}
}
答案 0 :(得分:1)
您可能无法开始使用您正在使用的端点。根据{{3}},它将在年中切换到https://developer.sabre.com/resources/api_versioning。我猜你已经使用过https了?
除此之外,它在获取样本有效负载并将其调整为真实数据时对我有用。你能提供你的标题/有效载荷吗?
答案 1 :(得分:0)
原来它不喜欢查询字符串'?mode = live'。如果我删除它,我会收到回复。我们在所有其他REST请求中使用该字符串来购物/航班/但看起来它在这种情况下无效。
另外,感谢托马斯的帮助