nhu son
nhu son

Reputation: 1

How to create PNR by CreatePassengerNameRecordRQ API Sabre

I'm using CreatePassengerNameRecordRQ API to create PNR and book flight, flight infomation I had got by BFM API. But CreatePassengerNameRecordRQ api return error can not create pnr. Pls tell me, how can i create pnr for flight affter get BFM.

This is my request:

<CreatePassengerNameRecordRQ xmlns="http://services.sabre.com/sp/reservation/v2_1" version="2.1.0" haltOnAirPriceError="false" targetCity="KUL">
        <TravelItineraryAddInfo>
            <AgencyInfo>
                <Address>
                    <AddressLine>My Company</AddressLine>
                    <CityName>Dubai</CityName>
                    <CountryCode>PK</CountryCode>
                    <PostalCode>00000</PostalCode>
                    <StateCountyProv StateCode="DX"/>
                    <StreetNmbr>SZ Road</StreetNmbr>
                </Address>
                <Ticketing TicketType="7TAW"/>
            </AgencyInfo>
            <CustomerInfo>
                <ContactNumbers>
                    <ContactNumber LocationCode="LHE" NameNumber="1.1" Phone="971-589-697242" PhoneUseType="A"/>
                </ContactNumbers>
                <Email Address="[email protected]" NameNumber="1.1"/>
                <PersonName NameNumber="1.1" PassengerType="ADT" >
                    <GivenName>ADULT</GivenName>
                    <Surname>KHAN</Surname>
                </PersonName>
                <PersonName NameNumber="2.1" PassengerType="CNN"  >
                    <GivenName>CHILD</GivenName>
                    <Surname>KHAN</Surname>
                </PersonName>
                <PersonName NameNumber="3.1" Infant="true" PassengerType="INF" >
                    <GivenName>INFANT</GivenName>
                    <Surname>KHAN</Surname>
                </PersonName>
            </CustomerInfo>
        </TravelItineraryAddInfo>
        <AirBook>

            <OriginDestinationInformation>
                <FlightSegment DepartureDateTime="2019-02-15T21:30:00" FlightNumber="804" NumberInParty="1" ResBookDesigCode="V"  Status="NN">
                    <DestinationLocation LocationCode="SIN" />
                    <MarketingAirline Code="OD" FlightNumber="804"/>
                    <OriginLocation LocationCode="KUL"/>
                </FlightSegment>
            </OriginDestinationInformation>
        </AirBook>
        <AirPrice>
            <PriceRequestInformation>
                <OptionalQualifiers>
                    <PricingQualifiers>
                        <PassengerType Code="ADT" Quantity="1"/>
                        <PassengerType Code="CNN" Quantity="1"/>
                        <PassengerType Code="INF" Quantity="1"/>
                    </PricingQualifiers>
                </OptionalQualifiers>
            </PriceRequestInformation>
        </AirPrice>
        <PostProcessing RedisplayReservation="true" >
            <EndTransaction>
                <Source ReceivedFrom=" TESTING"/>
            </EndTransaction>
        </PostProcessing>
    </CreatePassengerNameRecordRQ>

This is my response:

<CreatePassengerNameRecordRS xmlns="http://services.sabre.com/sp/reservation/v2_1">
       <Error type="Application" timeStamp="2019-02-14T21:24:31.556-06:00">
            <SystemSpecificResults>
                <Message code="ERR.SP.BUSINESS_ERROR">PNR has not been created successfully, see remaining messages for details</Message>
                <Message code="ERR.SP.BUSINESS_ERROR">Could not find the PNR locator in the End Transaction response</Message>
            </SystemSpecificResults>
        </Error>
    </CreatePassengerNameRecordRS>

Upvotes: 0

Views: 593

Answers (2)

Thomas
Thomas

Reputation: 415

I would recommend you to use the orchestrated option with EnhanchedAirbookRQ + PassengerDetailsRQ as it is way more stable.

Upvotes: 0

Telmo Paz
Telmo Paz

Reputation: 256

Can you try again without "targetCity="KUL""? This is changing the PCC to KUL, and I don't think you would want to leave your actual PCC. "KUL" would be a pseudo city code used by airlines and not travel agency Sabre users.

Upvotes: 0

Related Questions