Search code examples
restapisabre

Air Price object ambiguity in Create Pnr API of SABRE


I am currently working on integrating a full flow of sabre apis, ranging from shopping to re validating and finally booking of a selected itinerary. The flow that i am using is as follows:

  • 1) For Shopping: Bargain Finder Max (REST)
  • 2) To Revalidate: Revalidate Itinerary (REST)
  • 3) For Booking and Pnr generation: Create PNR API (REST)

But i am having difficulty in create pnr request creation, in request it is taking two main objects airBook and airPrice. I need to know from where are we supposed to provide these two objects in create pnr request body. I have tried making exact same object from the responses of revalidate itinerary but i am still not sure about airPrice object. I am getting an error when i try to pass the air price object same as provided in doc because i am not sure from where it is taking those values.

Create PNR REQUEST:

{
  "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
      }
    }
  }
}

Create 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>"
        }
    ]
}

Please let me know if i am using the correct flow and if so then how to make this airPrice object. Thanks


Solution

  • You can ignore the AIR PRICE object

    Well the error NO COMBINABLE FARES FOR CLASS USED mean that the Flights were found as requested, but fare rules do not allow for combining them into itineraries.

    Try to send the same request.. with minimum PNR details. Most of the time the ERROR message does not really say the issue..

    Minimum information required for any PNR to be created

    P - Customer's Phone number
    R - Received from
    I - Itinerary - Air Book
    N - Name of all the travelers
    T - Ticketing time limit
    

    https://formatfinder.sabre.com/Content/PassengerNameRecordPNR/OverviewPassengerNameRecordPNR/OverviewPassengerNameRecordPNR.aspx?ItemID=41394c04f3ee402287c92873a9d964a7