我正在构建一个Web应用程序,并将Saber与之集成。我一直遵循“低价搜索和预订”工作流程,并且已经使用Bargain Finder Max完成了购物航班,因此我想预订通过“创建乘客姓名记录”选择的航班。我被困在发送创建PNR请求中。我正在使用具有以下负载的创建乘客姓名记录:
data() {
return {
proxy: ''
};
},
watch: {
proxy(value) {
console.log(value.length);
}
}
,我相信我在创建PNR时提供了5个强制性要素。 P 电话号码 从接收到的 R 我行程 N 旅行者姓名 T 出票时间限制
但是,我仍然收到此错误
{
"CreatePassengerNameRecordRQ": {
"version": "2.1.0",
"targetCity": "G1OJ",
"haltOnAirPriceError": true,
"TravelItineraryAddInfo": {
"AgencyInfo": {
"Address": {
"AddressLine": "UNIT 707 PRINCE GREGORY CONDO 12TH AVENUE, CUBAO",
"CityName": "QUEZON CITY",
"CountryCode": "PH",
"PostalCode": "1109",
"StreetNmbr": "#105"
},
"Ticketing": {
"TicketType": "7TAW"
}
},
"CustomerInfo": {
"ContactNumbers": {
"ContactNumber": [
{
"NameNumber": "1.1",
"Phone": "639053314785",
"PhoneUseType": "H"
},
{
"NameNumber": "2.1",
"Phone": "639053314785",
"PhoneUseType": "H"
}
]
},
"PersonName": [
{
"NameNumber": "1.1",
"PassengerType": "ADT",
"GivenName": "ERWIN",
"Surname": "PLAZA"
},
{
"NameNumber": "2.1",
"PassengerType": "ADT",
"GivenName": "AMABELLE",
"Surname": "PLAZA"
}
]
}
},
"AirBook": {
"HaltOnStatus": [
{
"Code": "HL"
},
{
"Code": "KK"
},
{
"Code": "LL"
},
{
"Code": "NN"
},
{
"Code": "NO"
},
{
"Code": "UC"
},
{
"Code": "US"
}
],
"OriginDestinationInformation": {
"FlightSegment": [
{
"ArrivalDateTime": "2019-01-28T11:40:00",
"DepartureDateTime": "2019-01-28T10:35:00",
"FlightNumber": "1853",
"NumberInParty": "2",
"ResBookDesigCode": "T",
"Status": "NN",
"InstantPurchase": true,
"DestinationLocation": {
"LocationCode": "CEB"
},
"MarketingAirline": {
"Code": "PR",
"FlightNumber": "1853"
},
"MarriageGrp": "O",
"OriginLocation": {
"LocationCode": "MNL"
}
},
{
"ArrivalDateTime": "2019-01-30T23:05:00",
"DepartureDateTime": "2019-01-30T21:50:00",
"FlightNumber": "2880",
"NumberInParty": "2",
"ResBookDesigCode": "T",
"Status": "NN",
"InstantPurchase": true,
"DestinationLocation": {
"LocationCode": "MNL"
},
"MarketingAirline": {
"Code": "PR",
"FlightNumber": "2880"
},
"MarriageGrp": "O",
"OriginLocation": {
"LocationCode": "CEB"
}
}
]
}
},
"PostProcessing": {
"RedisplayReservation": true,
"ARUNK": "please do the arunk thing",
"EndTransaction": {
"Source": {
"ReceivedFrom": "MOSCONI"
}
},
"PostBookingHKValidation": {
"waitInterval": 100,
"numAttempts": 6
},
"WaitForAirlineRecLoc": {
"waitInterval": 100,
"numAttempts": 6
}
}
}
}
我的有效载荷上缺少什么?
答案 0 :(得分:0)
尝试使用此结构,我确实注意到您的Json缺少一些步骤: CreatePassengerNameRecordRQ,TravelItineraryAddInfo,AirBook AirPrice( 必需 ),其他段,SpecialReqDetails,后处理
{
"CreatePassengerNameRecordRQ": {
"version": "2.1.0",
"targetCity": "G7HE",
"haltOnAirPriceError": true,
"TravelItineraryAddInfo": {
"AgencyInfo": {
"Address": {
"AddressLine": "My corp",
"CityName": "SOUTHLAKE",
"CountryCode": "US",
"PostalCode": "76092",
"StateCountyProv": {
"StateCode": "TX"
},
"StreetNmbr": "9000 street corp"
},
"Ticketing": {
"TicketType": "7TAW"
}
},
"CustomerInfo": {
"ContactNumbers": {
"ContactNumber": [
{
"NameNumber": "1.1",
"Phone": "001-222-1111",
"PhoneUseType": "H"
},
{
"NameNumber": "2.1",
"Phone": "111-111-1111",
"PhoneUseType": "W"
}
]
},
"CreditCardData": {
"BillingInformation": {
"cardHolderName": "SP TEST",
"streetAddress": "2323, Hommer J Simpson",
"city": "NEW YORK",
"stateOrProvince": "NY",
"PostalCode": "V9B0L2"
}
},
"PersonName": [
{
"NameNumber": "1.1",
"NameReference": "ABC123",
"PassengerType": "ADT",
"GivenName": "Hommer",
"Surname": "Simpson"
},
{
"NameNumber": "2.1",
"NameReference": "DEF456",
"PassengerType": "ADT",
"GivenName": "Bart",
"Surname": "Simpson"
}
]
}
},
"AirBook": {
"HaltOnStatus": [
{
"Code": "HL"
},
{
"Code": "KK"
},
{
"Code": "LL"
},
{
"Code": "NN"
},
{
"Code": "NO"
},
{
"Code": "UC"
},
{
"Code": "US"
}
],
"OriginDestinationInformation": {
"FlightSegment": [
{
"ArrivalDateTime": "2018-09-10T19:14:00",
"DepartureDateTime": "2018-09-10T11:35:00",
"FlightNumber": "745",
"NumberInParty": "2",
"ResBookDesigCode": "W",
"Status": "NN",
"InstantPurchase": true,
"DestinationLocation": {
"LocationCode": "DTW"
},
"MarketingAirline": {
"Code": "DL",
"FlightNumber": "745"
},
"MarriageGrp": "O",
"OriginLocation": {
"LocationCode": "SFO"
}
},
{
"ArrivalDateTime": "2018-09-10T20:59:00",
"DepartureDateTime": "2018-09-10T19:55:00",
"FlightNumber": "2010",
"NumberInParty": "2",
"ResBookDesigCode": "W",
"Status": "NN",
"InstantPurchase": true,
"DestinationLocation": {
"LocationCode": "MCI"
},
"MarketingAirline": {
"Code": "DL",
"FlightNumber": "2010"
},
"MarriageGrp": "O",
"OriginLocation": {
"LocationCode": "DTW"
}
},
{
"ArrivalDateTime": "2018-09-17T18:50:00",
"DepartureDateTime": "2018-09-17T17:10:00",
"FlightNumber": "1076",
"NumberInParty": "2",
"ResBookDesigCode": "W",
"Status": "NN",
"InstantPurchase": true,
"DestinationLocation": {
"LocationCode": "MSP"
},
"MarketingAirline": {
"Code": "DL",
"FlightNumber": "1076"
},
"MarriageGrp": "O",
"OriginLocation": {
"LocationCode": "MCI"
}
},
{
"ArrivalDateTime": "2018-09-18T00:13:00",
"DepartureDateTime": "2018-09-17T20:15:00",
"FlightNumber": "2214",
"NumberInParty": "2",
"ResBookDesigCode": "W",
"Status": "NN",
"InstantPurchase": true,
"DestinationLocation": {
"LocationCode": "JFK"
},
"MarketingAirline": {
"Code": "DL",
"FlightNumber": "2214"
},
"MarriageGrp": "O",
"OriginLocation": {
"LocationCode": "MSP"
}
}
]
}
},
"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": "Hommer",
"Surname": "Simpson"
},
"VendorPrefs": {
"Airline": {
"Hosted": false
}
}
},
{
"SegmentNumber": "A",
"PersonName": {
"DateOfBirth": "2002-02-02",
"Gender": "M",
"NameNumber": "2.1",
"GivenName": "Bart",
"Surname": "Simpson"
},
"VendorPrefs": {
"Airline": {
"Hosted": false
}
}
}
],
"Service": [
{
"SSR_Code": "VGML",
"Text": "CC Hommer Simpson"
}
]
}
}
},
"PostProcessing": {
"RedisplayReservation": true,
"ARUNK": "please do the arunk thing",
"EndTransaction": {
"Source": {
"ReceivedFrom": "SP TEST"
}
},
"PostBookingHKValidation": {
"waitInterval": 100,
"numAttempts": 6
},
"WaitForAirlineRecLoc": {
"waitInterval": 100,
"numAttempts": 6
}
}
}
}