Skip Navigation

Get PNR (Web API)

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.


Make the below JavaScript call when you have want to get PNR from JavaScript code:

SrwApi3.getPnr(String version);
// or
SrwApi3.getPnr(String version, boolean forceSynchronization);
SrwApi3.retrievePnr(String version);
// or
SrwApi3.retrievePnr(String version, boolean forceSynchronization);
Both getPnr methods are marked as deprecated since 19.5 release. For some cases those methods doesn’t return valid response. It’s recomended to use new retrievePnr methods instead.
Result returned by retrievePnr has different structure compared to result returned by getPnr.
String version parameter:
"1.0.0" (Recommended) for RedAppTravelItineraryReadRs 1.0.0
"3.10.0" for the TravelItineraryReadRS 3.10.0 (See Sabre Dev Studio resources for service details)+
boolean forceSynchronization parameter:
false (default) for automatic synchronization when needed
true to explicitly force synchronization

To be able to access getPnr() or retrievePnr() you need to add the authorization entry to your redapp.xml file in <RedApp></RedApp> section:

<Authorization name=" threshold="[threshold]" metric="[metric]" />

Exemplary code snippet demonstrating how to get PNR response from JxBrowser:

  <script type="text/javascript">
    function getTir() {
       pnrRsp = SrwApi3.retrievePnr("1.0.0");
       pnrRsp = eval("("
       document.getElementById("demo_pnr_rsp").innerHTML = pnrRsp.response.payload.tirResponse;
   <b>Get PNR</b>
    <form action="javascript:void(0);" onsubmit="getTir()" name="getPnr">
        <input type="submit" value="Get PNR" id="getPnrButton" />
    <p id="demo_pnr_rsp">Your results will appear here.</p>