Skip Navigation

Get PNR

Sabre Red 360 Software Development Kit provides the ability to get PNR information using JavaScript. Whenever developer decides that after some application operations it is necessary to get PNR information then it may be done by using this service.

Dependencies and classes

Below you can find a list of required dependencies.

Minimal Required Dependency

  • com.sabre.edge.dynamo.cf

  • com.sabre.edge.dynamo.pnr.cdm

  • com.sabre.edge.cf.core

  • com.sabre.edge.dynamo.redapp.cdm

Usage

To be able to use Get Pnr Service you have to add the authorization entry to your redapp.xml file in <RedApp></RedApp> section:

<Authorization name="com.sabre.edge.dynamo.cf.service.GetPnr" threshold="[threshold]" metric="[metric]" />

Get PNR api works with two data models:

  • with 1.0.0 version uses RedApp data model

  • with 3.10.0 version uses Tir data model (See Sabre Dev Studio resources for service details)

The following code snippet demonstrates refreshing content of TripSummary using 3.10.0 version of Tir data model.

String version = "3.10.0";
ClientResponse <GetPnrResponse<TravelItineraryReadRS>> rsp =
            new GetPnrServiceClient<TravelItineraryReadRS>(COM).send(new GetPnrRequest(version));

if (rsp.isSuccess())
{
    //success
    TravelItineraryReadRS payload = rsp.getPayload().getTirResponse();
}
else
{
    //failure
    Collection <IError> errors = rsp.getErrors()
}

The following code snippet demonstrates refreshing content of TripSummary using RedApp data model.

String version = "1.0.0";
ClientResponse <GetPnrResponse<RedAppTravelItineraryReadRs>> rsp =
            new GetPnrServiceClient<RedAppTravelItineraryReadRs>(COM).send(new GetPnrRequest(version));

if (rsp.isSuccess())
{
    //success
    RedAppTravelItineraryReadRs payload = rsp.getPayload().getTirResponse();
}
else
{
    //failure
    Collection <IError> errors = rsp.getErrors()
}

See com.sabre.redapp.example3.web.addpnr sample for implementation.

Note: GetPnrResponse and GetPnrServiceClient are parametrized with expected TIR service response class (matching to provided version).

RedAppTravelItineraryReadRs data model

com.sabre.stl.pos.srw.nextgen.redapp.travelitineraryread.rs.v1.RedAppTravelItineraryReadRs

application result
    list of successes
        list of system specific results
            host command
            list of message
            short text
            element
            record id
            doc url
            timestamp
        type
            TRANSPORT
            VALIDATION
            APPLICATION
            BUSINESS_LOGIC
        timestamp
    list of warnings
        list of system specific results
            host command
            list of message
            short text
            element
            record id
            doc url
            timestamp
        type
            TRANSPORT
            VALIDATION
            APPLICATION
            BUSINESS_LOGIC
        timestamp
    list of errors
        list of system specific results
            host command
            list of message
            short text
            element
            record id
            doc url
            timestamp
        type
            TRANSPORT
            VALIDATION
            APPLICATION
            BUSINESS_LOGIC
        timestamp
    status
        COMPLETE
        INCOMPLETE
        NOT_PROCESSED
        UNKNOWN
travel itinerary
    customer info
        list of person name
            list of email
                id
                comment
                type
                name
            given name
            list of profile index
                id
                value
            surname
            with infant
            name number
            name reference
            passenger type
            element id
            rph
            id
    itinerary info
        itinerary pricing
            list of price quote
                list of priced itinerary
                    air itinerary pricing info
                        list of passenger type quantity
                            code
                            quantity
                        list of ptc fare breakdown
                            list of fare basis
                                code
                            list of fare component
                                location
                                    origin
                                    destination
                                ticket designator
                            list of flight segment
                                marketing line
                                    code
                                    flight number
                                departure datetime
                                res book design code
                    validating carrier
        reservation items
            list of item
                list of flight segment
                    marketing line
                        banner
                        code
                        flight number
                        res book design code
                    id
                rph
                id
    itinerary ref
        list of header
        source
            AAA pseudo city code
            create datetime
            creation agent
            home pseudo city code
            pseudo city code
            received from
            last update time
            sequence number
        list of travel policy
            value
            id
        id
    remark info
        list of remark
            text
            person name
                value
                name number
            code
            rph
            segment number
            type
            id
    list of special service info
        service
            airline
                code
            list of person name
                value
                name number
            text
            ssr code
            ssr type
        typ
        id
        rph
    open reservation elements
        list of open reservation element
            form of payment
                payment card
                    approval list
                    approval list
                        list of approval
                            approval code
                            request time
            service request
            free text
            airline code
price quote
    list of details
        list of segment info
            flight
                class of service
                departure
                    datetime
                    city code
                        value
                        name
                arrival
                    datetime
                    city code
                        value
                        name
            fare basis
            number
        transaction info
            last date to purchase
            local create date time
        list of name association info
            name number
            name id
            first name
            last name
         fare info
            total fare
                value
                currency code
                decimal place
        miscellaneous info
            list of validating carrier
        number
        passenger type
version