我目前正在整合完整的saber api流程,从购物到重新验证,最后是选定行程的预订。我正在使用的流程如下:
但是我在创建pnr请求创建时遇到困难,在请求中它需要两个主要对象airBook和airPrice。我需要从哪里知道我们应该在create pnr request body中提供这两个对象。我尝试从重新验证行程的响应中制作完全相同的对象,但是我仍然不确定airPrice对象。尝试传递与doc中提供的价格相同的航空价格对象时出现错误,因为我不确定从哪里获取这些值。
创建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对象。 谢谢
答案 0 :(得分:0)
您可以忽略AIR PRICE对象
错误未使用组合票价” 表示已按要求找到航班,但票价规则不允许将其合并到行程中。
尝试发送具有最小PNR详细信息的相同请求。多数情况下,错误消息并没有真正说明问题。
创建任何PNR所需的最少信息
P - Customer's Phone number
R - Received from
I - Itinerary - Air Book
N - Name of all the travelers
T - Ticketing time limit