rest - SABRE 的 Create Pnr API 中的 Air Price 对象歧义
问题描述
我目前正在整合完整的 sabre api 流程,从购物到重新验证,最后预订选定的行程。我使用的流程如下:
- 1) 购物:Bargain Finder Max (REST)
- 2) 重新验证:重新验证行程 (REST)
- 3) 对于 Booking 和 Pnr 生成:创建 PNR API (REST)
但是我在创建 pnr 请求创建时遇到了困难,在请求中它需要两个主要对象 airBook 和 airPrice。我需要知道我们应该从哪里在创建 pnr 请求正文中提供这两个对象。我尝试从重新验证行程的响应中制作完全相同的对象,但我仍然不确定 airPrice 对象。当我尝试传递与文档中提供的相同的空中价格对象时出现错误,因为我不确定它从哪里获取这些值。
创建 PNR 请求:
{
"CreatePassengerNameRecordRQ": {
"version": "2.1.0",
"haltOnAirPriceError": true,
"TravelItineraryAddInfo": {
"AgencyInfo": {
"Address": {
"AddressLine": "SABRE TRAVEL",
"CityName": "SOUTHLAKE",
"CountryCode": "US",
"PostalCode": "76092",
"StateCountyProv": {
"StateCode": "TX"
},
"StreetNmbr": "3150 SABRE DRIVE"
},
"Ticketing": {
"TicketType": "7TAW"
}
},
"CustomerInfo": {
"ContactNumbers": {
"ContactNumber": [
{
"NameNumber": "1.1",
"Phone": "817-555-1212",
"PhoneUseType": "H"
},
{
"NameNumber": "2.1",
"Phone": "815-554-1213",
"PhoneUseType": "W"
}
]
},
"CreditCardData": {
"BillingInformation": {
"cardHolderName": "SP TEST",
"streetAddress": "2323, NICKLAUS DR",
"city": "NEW YORK",
"stateOrProvince": "NY",
"PostalCode": "V9B0L2"
}
},
"PersonName": [
{
"NameNumber": "1.1",
"NameReference": "ABC123",
"PassengerType": "ADT",
"GivenName": "MARCIN",
"Surname": "DZIK"
},
{
"NameNumber": "2.1",
"NameReference": "DEF456",
"PassengerType": "ADR",
"GivenName": "ALICJA",
"Surname": "MAKOTA"
}
]
}
},
"AirBook": {
"HaltOnStatus": [
{
"Code": "HL"
},
{
"Code": "KK"
},
{
"Code": "LL"
},
{
"Code": "NN"
},
{
"Code": "NO"
},
{
"Code": "UC"
},
{
"Code": "US"
}
],
"OriginDestinationInformation": {
"FlightSegment": [
{
"DepartureDateTime": "2018-12-14T12:35:00",
"ArrivalDateTime": "2018-12-14T17:00:00",
"FlightNumber": "7728",
"NumberInParty": "2",
"ResBookDesigCode": "K",
"Status": "NN",
"InstantPurchase": true,
"DestinationLocation": {
"LocationCode": "YUL"
},
"MarketingAirline": {
"Code": "AC",
"FlightNumber": "7728"
},
"MarriageGrp": "O",
"OriginLocation": {
"LocationCode": "DFW"
}
},
{
"DepartureDateTime": "2018-12-14T22:15:00",
"ArrivalDateTime": "2018-12-15T11:15:00",
"FlightNumber": "349",
"NumberInParty": "2",
"ResBookDesigCode": "B",
"Status": "NN",
"InstantPurchase": true,
"DestinationLocation": {
"LocationCode": "CDG"
},
"MarketingAirline": {
"Code": "AF",
"FlightNumber": "349"
},
"MarriageGrp": "O",
"OriginLocation": {
"LocationCode": "YUL"
}
}
]
}
},
"AirPrice":[
{
"PriceComparison": {
"AmountSpecified":1000,
"AcceptablePriceIncrease":{
"HaltOnNonAcceptablePrice":false,
"Amount":500
}
},
"PriceRequestInformation":{
"Retain":true,
"OptionalQualifiers":{
"FOP_Qualifiers":{
"BasicFOP":{
"Type":"CK"
}
},
"PricingQualifiers":{
"NameSelect":[
{
"NameNumber":"1.1"
}
],
"PassengerType":[
{
"Code":"ADT",
"Quantity":"1"
}
]
}
}
}
},
{
"PriceComparison": {
"AmountSpecified":1000,
"AcceptablePriceDecrease":{
"HaltOnNonAcceptablePrice":false,
"Percent":500
}
},
"PriceRequestInformation":{
"Retain":true,
"OptionalQualifiers":{
"FOP_Qualifiers":{
"BasicFOP":{
"Type":"CK"
}
},
"PricingQualifiers":{
"NameSelect":[
{
"NameNumber":"2.1"
}
],
"PassengerType":[
{
"Code":"ADR",
"Quantity":"1"
}
]
}
}
}
}
],
"MiscSegment": {
"VendorPrefs": {
"Airline": {
"Code": "AS"
}
},
"DepartureDateTime": "09-13",
"NumberInParty": 2,
"Text": "TEST OTH MISCELLANEOUS SEGMENT",
"Type": "OTH",
"OriginLocation": {
"LocationCode": "ORD"
},
"Status": "GK"
},
"SpecialReqDetails": {
"AddRemark": {
"RemarkInfo": {
"FOP_Remark": {
"Type": "CHECK"
}
}
},
"SpecialService": {
"SpecialServiceInfo": {
"SecureFlight": [
{
"SegmentNumber": "A",
"PersonName": {
"DateOfBirth": "2001-01-01",
"Gender": "M",
"NameNumber": "1.1",
"GivenName": "MARCIN",
"Surname": "DZIK"
},
"VendorPrefs": {
"Airline": {
"Hosted": false
}
}
},
{
"SegmentNumber": "A",
"PersonName": {
"DateOfBirth": "2002-02-02",
"Gender": "F",
"NameNumber": "2.1",
"GivenName": "ALICJA",
"Surname": "MAKOTA"
},
"VendorPrefs": {
"Airline": {
"Hosted": false
}
}
}
],
"Service": [
{
"SSR_Code": "OTHS",`enter code here`
"Text": "CC MARCIN DZIK"
},
{
"SSR_Code": "OTHS",
"Text": "CC ALICJA MAKOTA"
}
]
}
}
},
"PostProcessing": {
"RedisplayReservation": true,
"ARUNK": "please do the arunk thing",
"EndTransaction": {
"Source": {
"ReceivedFrom": "SP TEST"
}
},
"PostBookingHKValidation": {
"waitInterval": 100,
"numAttempts": 6
},
"WaitForAirlineRecLoc": {
"waitInterval": 100,
"numAttempts": 6
}
}
}
}
创建 Pnr 响应:
{
"CreatePassengerNameRecordRS": {
"ApplicationResults": {
"status": "Incomplete",
"Error": [
{
"type": "Application",
"timeStamp": "2018-11-14T02:31:20.435-06:00",
"SystemSpecificResults": [
{
"Message": [
{
"code": "ERR.SP.PROVIDER_ERROR",
"content": "Unable to perform air booking step"
}
]
}
]
}
],
"Warning": [
{
"type": "BusinessLogic",
"timeStamp": "2018-11-14T02:31:16.814-06:00",
"SystemSpecificResults": [
{
"Message": [
{
"code": "WARN.SWS.HOST.ERROR_IN_RESPONSE",
"content": ".PASSENGER TYPE FUNCTION INACTIVE IN TJR"
}
]
}
]
},
{
"type": "BusinessLogic",
"timeStamp": "2018-11-14T02:31:20.435-06:00",
"SystemSpecificResults": [
{
"Message": [
{
"code": "WARN.SWS.HOST.ERROR_IN_RESPONSE",
"content": "EnhancedAirBookRQ: NO COMBINABLE FARES FOR CLASS USED"
}
]
}
]
}
]
}
},
"Links": [
{
"rel": "self",
"href": "https://api.test.sabre.com/v2.1.0/passenger/records?mode=create"
},
{
"rel": "linkTemplate",
"href": "https://api.test.sabre.com/<version>/passenger/records?mode=<mode>"
}
]
}
请让我知道我是否使用了正确的流程,如果是,那么如何制作这个 airPrice 对象。谢谢
解决方案
您可以忽略 AIR PRICE 对象
那么错误NO COMBINABLE FARES FOR CLASS USED意味着航班是按要求找到的,但票价规则不允许将它们组合到行程中。
尝试使用最少的 PNR 详细信息发送相同的请求。大多数时候错误消息并没有真正说明问题..
创建任何 PNR 所需的最少信息
P - Customer's Phone number
R - Received from
I - Itinerary - Air Book
N - Name of all the travelers
T - Ticketing time limit
推荐阅读
- sql - Postgres 9.4 - 将行插入表时如何忽略重复键
- python - 0-1 背包2行怎么找元素
- c - 将递归 C 函数转换为 Y86 程序集
- php - 在选择表单中为数组(披萨)赋予价值(价格)
- c++ - 如何在 varC++ 中将 int 与字符串组合
- vue.js - 如何使用 vue2leaflet 访问和添加折线到多个地图
- c++ - 使用 powershell 解析日志文件,并发送电子邮件通知
- google-api - 谷歌照片 API,从谷歌像素肖像模式中检索原始图片
- javascript - 使用 html 和 css 创建树
- github - 创建自定义 GitHub 表情符号