PNR retrieve

The pnr-retrieve-api-connection is in charge of the communication with the service and the retrieval of the PNR information and its validation.

Exposed actions

retrievePNR

Action to retrieve a PNR. When the action is dispatched, this plugin will handle the action and call the fes-pnr-retrieve to retrieve the requested PNR.

Argument

Type

Required

Description/Properties

recordLocator

string

Yes

PNR entry to be retrieved (*R,*123456)

hostConnection

object

Yes

id: Window's host connection identifier

windowId

string

Yes

Window identifier from where to get the PNR

Copy
dispatchersHelper.dispatch('retrievePNR', hostConnection, `*${recordLocator}`, windowId);

retrievePNRSuccess

This action will be dispatched whenever the PNR has been retrieved from the service.

Argument

Type

Required

Description/Properties

data

object(PNRSuccessData)

Yes

 

PNRSuccessData model

  • terminalId(string): TerminalId where the PNR retrieve was performed from.

  • entry(object): Orion Terminal entry object. It contains the cryptic and the entry identifier.

  • host(string): The host used to retrieve the PNR.

  • connectionId(string): Connection identifier.

  • response(object): The booking file object returned by the service.

retrievePNRError

This action will be dispatched whenever the PNR retrieve failed.

Argument

Type

Required

Description/Properties

data

object(PNRErrorData)

Yes

 

PNRErrorData model

  • terminalId(string): TerminalId where the PNR retrieve was performed from.

  • entry(object): Orion Terminal entry object. It contains the cryptic and the entry identifier.

  • status(number): Service response's HTTP status code.

  • connectionId(string): Connection identifier.

  • response(object): The booking file object returned by the service.

updatePNR

updates the PNR state by retrieving the PNR again if any updates done to the bookingFile

Copy
dispatchersHelper.dispatch('updatePNR');

Exposed selectors

getActivePnr

getActivePnr(state, { id: connectionId}) - Returns an object for a given hostConnection.

Copy
const getActivePnr = make('getActivePnr');
Example
Copy
{
  "ARNKSegments": {},
  "address": {
    "ab134979-560b-487e-9090-3be3d5071469": {
      "_id": "ab134979-560b-487e-9090-3be3d5071469",
      "cityAndCountry": "BCN",
      "countryCode": "ES",
      "name": "SYNKAL CUST",
      "postalCode": "08329",
      "state": "Barcelona",
      "street": "JOAN XXIII 35"
    },
    "7473ca9e-0d60-4933-9a47-242ab3782502": {
      "_id": "7473ca9e-0d60-4933-9a47-242ab3782502",
      "cityAndCountry": "BCN",
      "countryCode": "ES",
      "name": "SYNKAL DEL",
      "postalCode": "08009",
      "state": "Barcelona",
      "street": "VIA AUGUSTA 59"
    }
  },
  "airSegments": {
    "aa9c837d-3499-4243-b80c-7368ec21204b": {
      "_id": "aa9c837d-3499-4243-b80c-7368ec21204b",
      "bookingClass": "Y",
      "carrierCode": "IB",
      "destination": "d6ce2c71-e8ba-40ff-8adf-6bd20b71648f",
      "endDateTime": "2019-01-06T09:50:00",
      "flightHaveBeenFlown": false,
      "flightNumber": 831,
      "group": "1",
      "isETicketEligible": true,
      "isVendorResponseConfirmed": true,
      "marriageNumber": 1,
      "numberOfSeats": 1,
      "origin": "b87e74f8-b6ed-4f20-acff-0a35ff6522a0",
      "segmentNumber": 1,
      "segmentStatusCode": "HK",
      "segmentType": "Air",
      "sellType": "SecureSold",
      "startDateTime": "2019-01-06T08:30:00",
      "originZone": {
        "code": "BCN",
        "countryCode": "ES",
        "timezone": "Europe/Madrid",
        "offset": {
          "gmt": 1,
          "dst": 2
        }
      },
      "destinationZone": {
        "code": "MAD",
        "countryCode": "ES",
        "timezone": "Europe/Madrid",
        "offset": {
          "gmt": 1,
          "dst": 2
        }
      }
    },
    "cb138dbb-1dcf-4784-953c-3629604a40a8": {
      "_id": "cb138dbb-1dcf-4784-953c-3629604a40a8",
      "bookingClass": "Y",
      "carrierCode": "IB",
      "destination": "1a1b6809-ed4e-4518-8ae8-bbaf7343630f",
      "endDateTime": "2019-01-06T14:25:00",
      "flightHaveBeenFlown": false,
      "flightNumber": 6275,
      "group": "0",
      "isETicketEligible": true,
      "isVendorResponseConfirmed": true,
      "marriageNumber": 1,
      "numberOfSeats": 1,
      "origin": "d6ce2c71-e8ba-40ff-8adf-6bd20b71648f",
      "segmentNumber": 2,
      "segmentStatusCode": "HK",
      "segmentType": "Air",
      "sellType": "SecureSold",
      "startDateTime": "2019-01-06T11:35:00",
      "originZone": {
        "code": "MAD",
        "countryCode": "ES",
        "timezone": "Europe/Madrid",
        "offset": {
          "gmt": 1,
          "dst": 2
        }
      },
      "destinationZone": {
        "code": "ORD",
        "countryCode": "US",
        "timezone": "America/Chicago",
        "offset": {
          "gmt": -6,
          "dst": -5
        }
      }
    },
    "423f21a1-a74f-4ba8-beb8-e4aac436680d": {
      "_id": "423f21a1-a74f-4ba8-beb8-e4aac436680d",
      "bookingClass": "Y",
      "carrierCode": "IB",
      "destination": "d6ce2c71-e8ba-40ff-8adf-6bd20b71648f",
      "endDateTime": "2019-05-14T07:30:00",
      "flightHaveBeenFlown": false,
      "flightNumber": 6274,
      "group": "1",
      "isETicketEligible": true,
      "isVendorResponseConfirmed": true,
      "marriageNumber": 2,
      "numberOfSeats": 1,
      "origin": "1a1b6809-ed4e-4518-8ae8-bbaf7343630f",
      "segmentNumber": 3,
      "segmentStatusCode": "HK",
      "segmentType": "Air",
      "sellType": "SecureSold",
      "startDateTime": "2019-05-13T16:20:00",
      "originZone": {
        "code": "ORD",
        "countryCode": "US",
        "timezone": "America/Chicago",
        "offset": {
          "gmt": -6,
          "dst": -5
        }
      },
      "destinationZone": {
        "code": "MAD",
        "countryCode": "ES",
        "timezone": "Europe/Madrid",
        "offset": {
          "gmt": 1,
          "dst": 2
        }
      }
    },
    "ddacc374-730f-45a3-b6c7-97b5dc50a86d": {
      "_id": "ddacc374-730f-45a3-b6c7-97b5dc50a86d",
      "bookingClass": "Y",
      "carrierCode": "IB",
      "destination": "b87e74f8-b6ed-4f20-acff-0a35ff6522a0",
      "endDateTime": "2019-05-14T09:45:00",
      "flightHaveBeenFlown": false,
      "flightNumber": 830,
      "isETicketEligible": true,
      "isVendorResponseConfirmed": true,
      "marriageNumber": 2,
      "group": "1",
      "numberOfSeats": 1,
      "origin": "d6ce2c71-e8ba-40ff-8adf-6bd20b71648f",
      "segmentNumber": 4,
      "segmentStatusCode": "HK",
      "segmentType": "Air",
      "sellType": "SecureSold",
      "startDateTime": "2019-05-14T08:30:00",
      "originZone": {
        "code": "MAD",
        "countryCode": "ES",
        "timezone": "Europe/Madrid",
        "offset": {
          "gmt": 1,
          "dst": 2
        }
      },
      "destinationZone": {
        "code": "BCN",
        "countryCode": "ES",
        "timezone": "Europe/Madrid",
        "offset": {
          "gmt": 1,
          "dst": 2
        }
      }
    }
  },
  "airVendor": {
    "b7e4e767-3efc-4c35-b584-8131448a891e": {
      "_id": "b7e4e767-3efc-4c35-b584-8131448a891e",
      "code": "IB",
      "shortName": "Iberia",
      "name": "Iberia Lineas Aereas de Espana S.A.",
      "description": "IB - Iberia Lineas Aereas de Espana S.A.",
      "longDescription": "IB - ",
      "isAchCarrier": false
    },
    "8703ffca-2ef8-4bf0-93e9-b5dc1b36bb4d": {
      "_id": "8703ffca-2ef8-4bf0-93e9-b5dc1b36bb4d",
      "code": "1A",
      "shortName": "1A",
      "name": "1A",
      "longName": "1A",
      "description": "1A - 1A",
      "longDescription": "1A - 1A",
      "isAchCarrier": false
    }
  },
  "auxiliarySegments": {},
  "bookingFileContainsNoData": false,
  "bookingFileEmailAddress": {
    "4edbd121-4d56-4fd2-acd6-fc932ab7dea1": {
      "_id": "4edbd121-4d56-4fd2-acd6-fc932ab7dea1",
      "number": 0,
      "isFromAddress": true,
      "isToAddress": false,
      "address": "SMART.TRAVELLER@MAIL.COM",
      "addressType": "Traveler"
    },
    "9eef7c5f-3f69-4f03-9165-90c756fda094": {
      "_id": "9eef7c5f-3f69-4f03-9165-90c756fda094",
      "number": 1,
      "isFromAddress": false,
      "isToAddress": true,
      "address": "SMART.TRAV@HOTMAIL.COM",
      "addressType": "Traveler"
    }
  },
  "bookingFilePhone": {
    "900887ae-8ac4-4423-ad5b-d87bbd8bfb7e": {
      "_id": "900887ae-8ac4-4423-ad5b-d87bbd8bfb7e",
      "number": 1,
      "cityCode": "3b1ec71e-f34f-4222-8cb4-1a606f9f4cd3",
      "typeCode": "A",
      "phoneNumber": "932388081"
    },
    "efe4d8b2-776a-4593-b01f-926937ab5707": {
      "_id": "efe4d8b2-776a-4593-b01f-926937ab5707",
      "number": 2,
      "cityCode": "2fea3c58-6738-4875-a698-d022dfc91e24",
      "typeCode": "M",
      "phoneNumber": "6000432567"
    }
  },
  "bookingFileTicketIssue": {
    "c81afcd7-7a31-49b1-b839-a40cbbf6dbbc": {
      "_id": "c81afcd7-7a31-49b1-b839-a40cbbf6dbbc",
      "actionDateTime": "2018-10-30T00:00:00",
      "internalCategoryNumber": 0,
      "issuanceType": "Automatic",
      "minimumMinutes": false
    }
  },
  "bookingFileVendorLocator": {
    "4c5e10d6-0829-4f53-bca6-44b617679afc": {
      "_id": "4c5e10d6-0829-4f53-bca6-44b617679afc",
      "vendor": "8703ffca-2ef8-4bf0-93e9-b5dc1b36bb4d",
      "recordLocator": "K4X9FV",
      "creationDateTime": "2018-10-11T09:35:00"
    }
  },
  "carRentalSegments": {},
  "clientFileAssociations": [],
  "corporateIdentificationLines": [],
  "creatingAgencyIata": "78299992",
  "creationDate": "2018-10-11T00:00:00",
  "creatorDutyCode": "AG",
  "creatorSignOn": " C349344",
  "customerAddress": "ab134979-560b-487e-9090-3be3d5071469",
  "deliveryAddress": "7473ca9e-0d60-4933-9a47-242ab3782502",
  "emailAddresses": [
    "4edbd121-4d56-4fd2-acd6-fc932ab7dea1",
    "9eef7c5f-3f69-4f03-9165-90c756fda094"
  ],
  "fileAddress": "E135C27E",
  "formOfPayment": {
    "creditCardCardholder": "Test One",
    "creditCardAcceptance": false,
    "creditCardExpirationDate": "0001-01-01T00:00:00",
    "formOfPaymentData": "S",
    "issuer": "AmericanExpress",
    "issuerCode": "AX",
    "maskedCreditCardNumber": "XXXXXXXXXXXX5689",
    "creditCardNumber": "4XXXXXXXXXXX5689",
    "signatureOnFile": false,
    "typeOfPayment": "CreditCard",
    "validationByPassReq": false,
    "cardSecurityCode": "123"
  },
  "frequentFlyer": {
    "dbb26fbe-50b3-4bd2-a75c-240fb34c9527": {
      "_id": "dbb26fbe-50b3-4bd2-a75c-240fb34c9527",
      "airline": "IB",
      "number": "11122222"
    }
  },
  "hotelSegments": {},
  "iataLocation": {
    "1a1b6809-ed4e-4518-8ae8-bbaf7343630f": {
      "_id": "1a1b6809-ed4e-4518-8ae8-bbaf7343630f",
      "code": "ORD",
      "name": "O'Hare Intl Arpt",
      "cityCode": "CHI",
      "cityName": "Chicago"
    },
    "d6ce2c71-e8ba-40ff-8adf-6bd20b71648f": {
      "_id": "d6ce2c71-e8ba-40ff-8adf-6bd20b71648f",
      "code": "MAD",
      "name": "Adolfo Suarez Barajas Arpt",
      "cityCode": "MAD",
      "cityName": "Madrid"
    },
    "b87e74f8-b6ed-4f20-acff-0a35ff6522a0": {
      "_id": "b87e74f8-b6ed-4f20-acff-0a35ff6522a0",
      "code": "BCN",
      "name": "Barcelona Arpt",
      "cityCode": "BCN",
      "cityName": "Barcelona"
    },
    "3b1ec71e-f34f-4222-8cb4-1a606f9f4cd3": {
      "_id": "3b1ec71e-f34f-4222-8cb4-1a606f9f4cd3",
      "code": "BCN",
      "name": "Barcelona",
      "cityCode": "BCN",
      "cityName": "Barcelona"
    },
    "2fea3c58-6738-4875-a698-d022dfc91e24": {
      "_id": "2fea3c58-6738-4875-a698-d022dfc91e24",
      "code": "GRO",
      "name": "Girona",
      "cityCode": "GRO",
      "cityName": "Girona"
    }
  },
  "invoiceRemarks": [],
  "isIdentificationFieldExists": false,
  "isMembershipDataExists": true,
  "isPassengerInformationExists": false,
  "isSeatDataExists": false,
  "itineraryRemarks": [],
  "openAirSegments": {},
  "originalBookingLocation": "BCNNA",
  "owningAgencyPcc": "0DU7",
  "person": [
    {
      "firstName": "SYNKALMISS",
      "firstNameNumber": 1,
      "frequentFlyerCards": ["dbb26fbe-50b3-4bd2-a75c-240fb34c9527"],
      "_id": "e6406ebb-e6d2-41d7-870d-dae475d30314",
      "isGroup": false,
      "lastName": "TRAVELLER",
      "lastNameNumber": 1,
      "nameRemark": "24JAN80",
      "manualSpecialServiceRequests": [
        {
          "_id": "7883ae48-d6ae-454a-8dab-8df4a079597c",
          "number": 3,
          "code": "DOCS",
          "statusCode": "HK",
          "vendorCode": "AF",
          "hostType": "d8621dd4-42ef-47ed-ad35-b656747e29a2",
          "relatedSsrNumber": 0,
          "text": "////12MAR11/M//MASIP/LAURA -1MASIP/LAURA",
          "textFirstName": "SMART",
          "textLastName": "TRAV",
          "textGenderCode": "F",
          "textIssuingCountryCode": "IN",
          "textMaskedPassportNumber": "AB12345",
          "textDateOfBirth": "23OCT94",
          "textState": "12MAR11",
          "textPinCode": "M",
          "textCode": "",
          "iD": "00000000-0000-0000-0000-000000000000"
        }
      ],
      "numberOfPassengers": 0,
      "passengerNumber": 1,
      "passengerType": "Adult",
      "dateOfBirth": "1978-10-11T00:00:00",
      "passportExpiryDate": "2030-10-11T00:00:00",
      "passportGender": "M",
      "passportIssuingCountry": "IN",
      "middleName": "",
      "passportNationality": "IN",
      "passportNumber": "E12345",
      "passportFirstName": "SYNKALMISS",
      "passportMiddleName": "",
      "passportLastName": "TRAVELLER"
    }
  ],
  "phoneNumbers": ["900887ae-8ac4-4423-ad5b-d87bbd8bfb7e", "efe4d8b2-776a-4593-b01f-926937ab5707"],
  "recordLocator": "3RNTFG",
  "remarks": [],
  "retrievalErrors": [],
  "seatAllocations": [],
  "segments": [
    "aa9c837d-3499-4243-b80c-7368ec21204b",
    "cb138dbb-1dcf-4784-953c-3629604a40a8",
    "423f21a1-a74f-4ba8-beb8-e4aac436680d",
    "ddacc374-730f-45a3-b6c7-97b5dc50a86d"
  ],
  "ticketIssue": "c81afcd7-7a31-49b1-b839-a40cbbf6dbbc",
  "vendorLocators": ["4c5e10d6-0829-4f53-bca6-44b617679afc"],
  "vendorRemarks": []
}

getActivePnrBookingFileOtherSupplementaryInformation

getActivePnrBookingFileOtherSupplementaryInformation(state, { id: connectionId }); Returns supplementary information to PNR.

  • Contact information for the passenger and travel agency

  • Age details if necessary

  • Frequent flyer information

  • Information about seating

  • Special Service Requests (SSR) if necessary

  • Information about the fare

  • The amount of taxes paid on a booking

  • The payment method

  • Any vendor remarks.

Copy
const getActivePnrBookingFileOtherSupplementaryInformation = make(
  'getActivePnrBookingFileOtherSupplementaryInformation',
);
Example
Copy
59: {
        number: 2,
        carrier: 'IB',
        message: 'ABN/19138761111',
        _id: '59',
      }

getActivePnrPassengerFrequentFlyerCards

getActivePnrPassengerFrequentFlyerCards(getState(), { id: connectionId, passengerNumber: passenger.passengerNumber }); contains the passenger's first name, surname, and loyalty card.

Copy
const getActivePnrPassengerFrequentFlyerCards = make('getActivePnrPassengerFrequentFlyerCards');
Example
Copy
frequentFlyerCard = {
  11: {
    _id: '11',
    airline: 'BA',
    crossAccrual: null,
    number: '11112222',
    actionCode: null,
    tierLevel: null,
    priorityCode: null,
  },
  lastName: 'Traveller',
  firstName: 'Smart',
};