В настоящее время я работаю над интеграцией полного потока Sabre Apis, от покупок до повторной проверки и, наконец, бронирования выбранного маршрута.Поток, который я использую, выглядит следующим образом:
- 1) Для покупок: Макс. Поиск сделок (REST)
- 2) Для повторной проверки: повторный маршрут (REST)
- 3) Для бронирования и генерации Pnr: создать API PNR (REST)
Но у меня возникают трудности при создании запроса pnr, в запросе он принимает два основных объекта airBook и airPrice.Мне нужно знать, откуда мы должны предоставить эти два объекта в теле запроса create pnr.Я попытался сделать точно такой же объект из ответов revalidate маршрут, но я все еще не уверен насчет объекта 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 Response:
{
"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.Спасибо