如何通过CreatePassengerNameRecordRQ API Saber创建PNR

时间:2019-02-15 03:31:58

标签: soap sabre

我正在使用CreatePassengerNameRecordRQ API创建PNR并预订BFM API获得的航班,航班信息。但是CreatePassengerNameRecordRQ api返回错误无法创建pnr。请告诉我,我该如何为飞行人员创建PNR,以获取BFM。

这是我的要求:

<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="darabjavaid@gmail.com" 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>

这是我的回复:

<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>

2 个答案:

答案 0 :(得分:0)

您可以在没有“ targetCity =” KUL“”的情况下重试吗?这会将PCC更改为KUL,我不希望您离开实际的PCC。 “ KUL”将是航空公司而非旅行社Sabre用户使用的伪城市代码。

答案 1 :(得分:0)

我建议您将EnhanchedAirbookRQ + PassengerDetailsRQ与协调选项一起使用,因为它更稳定。