1.0.0 • Published 6 years ago

node-red-contrib-iata-bcbp v1.0.0

Weekly downloads
2
License
GPL-3.0-only
Repository
github
Last release
6 years ago

node-red-contrib-iata-bcbp

GitHub version GitHub issues GitHub license Twitter

A set of Node-Red nodes to decode and encode IATA Resolution 792 Compliant Boarding Pass Barcode Data.

This is a Node-Red wrapper for the work by georgesmith46's bcbp NPM node https://github.com/georgesmith46/bcbp.

Installing and Setting up

Add the IATA BCBP node to node-red through the manage palette tab or command line.

Usage

Here's an example of basic usage:

example

Example Flow

User guide

Encode Node

Converts a JSON object to a BCBP string. Any of the following parameters can be skipped (except legs).

Object Structure

NameDescriptionExample values
passengerNamePassenger NameDESMARAIS/LUCDOE/JOHN
passengerDescriptionPassenger Description0 - Adult1 - Male2 - Female3 - Child4 - Infant5 - No passenger (cabin baggage)6 - Adult travelling with infant7 - Unaccompanied minor
checkInSourceSource of check-inW - WebK - Airport KioskR - Remote or Off Site KioskM - Mobile DeviceO - Airport AgentT - Town AgentV - Third Party Vendor
boardingPassIssuanceSourceSource of Boarding Pass IssuanceW - WebK - Airport KioskX - Transfer KioskR - Remote or Off Site KioskM - Mobile DeviceO - Airport AgentT - Town AgentV - Third Party Vendor
issuanceDateDate of Issue of Boarding Pass6225ISO 8601 formatted stringMoment.js objectJavaScript date object
documentTypeDocument TypeB - Boarding PassI - Itinery Receipt
boardingPassIssuerDesignatorAirline Designator of boarding pass issuerAC
baggageTagNumberBaggage Tag Licence Plate Number(s)0014123456003
firstBaggageTagNumber1st Non-Consecutive Baggage Tag Licence Plate Number0014123456003
secondBaggageTagNumber2nd Non-Consecutive Baggage Tag Licence Plate Number0014123456003
securityDataTypeType of Security Data1
securityDataSecurity DataGIWVC5EH7JNT...
legsRepeatable legs dataArray - See table below

Legs Structure

Any of the following parameters can be skipped.

NameDescriptionExample values
operatingCarrierPNROperating carrier PNR CodeABC123
departureAirportFrom City Airport CodeYUL
arrivalAirportTo City Airport CodeFRA
operatingCarrierDesignatorOperating carrier DesignatorAC
flightNumberFlight Number0834
flightDateDate of Flight226ISO 8601 formatted stringMoment.js objectJavaScript date object
compartmentCodeCompartment CodeF
seatNumberSeat Number001A
checkInSequenceNumberCheck-in Sequence Number0025
passengerStatusPassenger Status0 - Ticket issuance/passenger not checked in1 - Ticket issuance/passenger checked in2 - Bag checked/passenger not checked in3 - Bag checked/passenger checked in4 - Passenger passed security check5 - Passenger passed security gate exit (coupon used)6 - Transit7 - Standby8 - Boarding data revalidation done9 - Original boarding line used at time of ticket issuanceA - Up- or down-grading required at close out
airlineNumericCodeAirline Numeric Code014
serialNumberDocument Form/Serial Number1234567890
selecteeIndicatorSelectee indicator0
internationalDocumentationVerificationInternational Documentation Verification0 - Travel document verification not required1 - Travel document verification required2 - Travel document verification performed
marketingCarrierDesignatorMarketing carrier designatorAC
frequentFlyerAirlineDesignatorFrequent Flyer Airline DesignatorAC
frequentFlyerNumberFrequent Flyer Number1234567890123
idIndicatorID/AD Indicator0
freeBaggageAllowanceFree Baggage Allowance20K
fastTrackFast TrackYNtruefalse
airlineInfoFor individual airline useLX58Z

Example JSON Object

{
    "legs": [
        {
            "operatingCarrierPNR": "ABC123",
            "departureAirport": "YUL",
            "arrivalAirport": "FRA",
            "operatingCarrierDesignator": "AC",
            "flightNumber": "0834",
            "flightDate": "2018-08-14T00:00:00.000Z",
            "compartmentCode": "F",
            "seatNumber": "001A",
            "checkInSequenceNumber": "0025",
            "passengerStatus": "1"
        }
    ],
    "passengerName": "DESMARAIS/LUC"
}

Outputs:

M1DESMARAIS/LUC       EABC123 YULFRAAC 0834 226F001A0025 106>60000

Decode Node

Converts a BCBP string to a JSON object. The returned object uses the same data structure as the Encode node above.

Example String

M1DESMARAIS/LUC       EABC123 YULFRAAC 0834 226F001A0025 106>60000

Outputs:

{
    "legs": [
        {
            "operatingCarrierPNR": "ABC123",
            "departureAirport": "YUL",
            "arrivalAirport": "FRA",
            "operatingCarrierDesignator": "AC",
            "flightNumber": "0834",
            "flightDate": "2018-08-14T00:00:00.000Z",
            "compartmentCode": "F",
            "seatNumber": "001A",
            "checkInSequenceNumber": "0025",
            "passengerStatus": "1"
        }
    ],
    "passengerName": "DESMARAIS/LUC"
}
*/

To Do

  1. Add further error handling / data checks
  2. Add data capture / export
  3. Add boarding pass validation node against airline DCS host using IATA BCBP XML format
  4. Add basic validation rules engine
  5. Add Barcode Image Decode
  6. Add Boarding Pass template generation

Authors & Contributors

Contributions welcome! Feel free to fork this and provide updates and new features. Don't forget to submit a pull request!

License

This project is licensed under the GPL3.0 License - see the LICENSE file for details

Acknowledgments

This Node-RED module is based on the great work of georgesmith46 - georgesmith46, using his bcbp libraries.

Changelog

v1.0.0 (latest)

  • Initial Release
  • IATA BCBP Decode Function
  • IATA BCBP Encode Function