Search code examples
restapisabre

Unable to process the stateless transaction in Create PNR of Sabre ( REST API )


I use REST API and follow Sabre's low fare search and book workflow

Step 1: Shop for flights using the Bargain Finder Max API.

Step 2: Book one or more flight segments, add all required information to create a passenger name record (PNR), and end the transaction using the Create Passenger Name Record API.

I could retrieve Bargain Finder Max (Step 1) data but I am stuck at Create Passenger Name Record. It always returns Unable to process the stateless transaction. Please retry. error.


This is the payload information

Request Data

{
  "CreatePassengerNameRecordRQ": {
    "version": "2.3.0",
    "targetCity": "****",
    "haltOnAirPriceError": false,
    "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"
            }
          ]
        },
        "PersonName": [
          {
            "NameNumber": "1.1",
            "PassengerType": "ADT",
            "GivenName": "John",
            "Surname": "Tolliver"
          }
        ]
      }
    },
    "AirBook": {
      "HaltOnStatus": [
        {
          "Code": "HL"
        },
        {
          "Code": "KK"
        },
        {
          "Code": "LL"
        },
        {
          "Code": "NN"
        },
        {
          "Code": "NO"
        },
        {
          "Code": "UC"
        },
        {
          "Code": "US"
        }
      ],
      "OriginDestinationInformation": {
        "FlightSegment": [
          {
            "ArrivalDateTime": "2020-03-24T08:48:00T00:00:00",
            "DepartureDateTime": "2020-03-24T08:48:00T00:00:00",
            "FlightNumber": "",
            "NumberInParty": "1",
            "ResBookDesigCode": "Y",
            "Status": "NN",
            "DestinationLocation": {
              "LocationCode": ""
            },
            "MarketingAirline": {
              "Code": "",
              "FlightNumber": ""
            },
            "OriginLocation": {
              "LocationCode": ""
            }
          },
          {
            "ArrivalDateTime": "2020-03-24T08:48:00T00:00:00",
            "DepartureDateTime": "2020-03-24T08:48:00T00:00:00",
            "FlightNumber": "",
            "NumberInParty": "1",
            "ResBookDesigCode": "Y",
            "Status": "NN",
            "DestinationLocation": {
              "LocationCode": ""
            },
            "MarketingAirline": {
              "Code": "",
              "FlightNumber": ""
            },
            "OriginLocation": {
              "LocationCode": ""
            }
          }
        ]
      },
      "RedisplayReservation": {
        "NumAttempts": 10,
        "WaitInterval": 300
      }
    },
    "AirPrice": [
      {
        "PriceRequestInformation": {
          "Retain": true,
          "OptionalQualifiers": {
            "FOP_Qualifiers": {
              "BasicFOP": {
                "Type": "CK"
              }
            },
            "PricingQualifiers": {
              "PassengerType": [
                {
                  "Code": "0",
                  "Quantity": "1"
                }
              ]
            }
          }
        }
      }
    ],
    "SpecialReqDetails": {
      "AddRemark": {
        "RemarkInfo": {
          "FOP_Remark": {
            "Type": "CHECK"
          }
        }
      },
      "SpecialService": {
        "SpecialServiceInfo": {
          "SecureFlight": [
            {
              "PersonName": {
                "DateOfBirth": "2009-05-14",
                "Gender": "F",
                "NameNumber": "2.1",
                "GivenName": "mim",
                "Surname": "khan"
              },
              "SegmentNumber": "A"
            }
          ],
          "Service": [
            {
              "PersonName": {
                "NameNumber": "2.1"
              },
              "SSR_Code": "CHLD",
              "Text": "01MAY07"
            }
          ]
        }
      }
    },
    "PostProcessing": {
      "EndTransaction": {
        "Source": {
          "ReceivedFrom": "SP WEB"
        }
      },
      "RedisplayReservation": {
        "waitInterval": 100
      }
    }
  }
}

Response Data

{
  "errorCode": "ERR.SP.PROVIDER_ERROR",
  "message": "Unable to process the stateless transaction. Please retry.",
  "status": "Incomplete",
  "type": "Application",
  "timeStamp": "2020-03-20T01:01:30-05"
}

Solution

  • You're in luck, since I was able to trace this particular transaction based on just the timestamp.

    In the future consider sending the following http header:

    Conversation-ID: ${some.unique.identifier.specific.per.each.request}
    

    And passing it along so that this can be traced by Sabre Teams without issues! (Personally, I'm generating a new UUID per each request while running tests.)

    Usually I would recommend contacting Sabre support to handle such errors. It seems that the Sabre account that you're using is inactive, I'd really recommend that you contact that team to enable your test account.

    The reason behind this message is that most of the time agencies exceed their TAM Pool slightly (session limit) so waiting a little bit and re-trying helps, we also do not wish to expose internal security implementation in Sabre.

    In this case the end part of the exception that was returned to the application hosting CreatePassengerNameRecordRQ was literally:

    error.UserIDInactive