Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

node-red-contrib-iata-bcbp

mlfunston11GPL-3.0-only1.0.0

Node Red nodes to decode and encode IATA Resolution 792 Compliant Boarding Pass Barcodes

node-red, bcbp, iata, boarding pass, 792, PDF417

readme

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

Name Description Example values
passengerName Passenger Name
  • DESMARAIS/LUC
  • DOE/JOHN
passengerDescription Passenger Description
  • 0 - Adult
  • 1 - Male
  • 2 - Female
  • 3 - Child
  • 4 - Infant
  • 5 - No passenger (cabin baggage)
  • 6 - Adult travelling with infant
  • 7 - Unaccompanied minor
checkInSource Source of check-in
  • W - Web
  • K - Airport Kiosk
  • R - Remote or Off Site Kiosk
  • M - Mobile Device
  • O - Airport Agent
  • T - Town Agent
  • V - Third Party Vendor
boardingPassIssuanceSource Source of Boarding Pass Issuance
  • W - Web
  • K - Airport Kiosk
  • X - Transfer Kiosk
  • R - Remote or Off Site Kiosk
  • M - Mobile Device
  • O - Airport Agent
  • T - Town Agent
  • V - Third Party Vendor
issuanceDate Date of Issue of Boarding Pass
  • 6225
  • ISO 8601 formatted string
  • Moment.js object
  • JavaScript date object
documentType Document Type
  • B - Boarding Pass
  • I - Itinery Receipt
boardingPassIssuerDesignator Airline Designator of boarding pass issuer
  • AC
baggageTagNumber Baggage Tag Licence Plate Number(s)
  • 0014123456003
firstBaggageTagNumber 1st Non-Consecutive Baggage Tag Licence Plate Number
  • 0014123456003
secondBaggageTagNumber 2nd Non-Consecutive Baggage Tag Licence Plate Number
  • 0014123456003
securityDataType Type of Security Data
  • 1
securityData Security Data
  • GIWVC5EH7JNT...
legs Repeatable legs data
  • Array - See table below

Legs Structure

Any of the following parameters can be skipped.

Name Description Example values
operatingCarrierPNR Operating carrier PNR Code
  • ABC123
departureAirport From City Airport Code
  • YUL
arrivalAirport To City Airport Code
  • FRA
operatingCarrierDesignator Operating carrier Designator
  • AC
flightNumber Flight Number
  • 0834
flightDate Date of Flight
  • 226
  • ISO 8601 formatted string
  • Moment.js object
  • JavaScript date object
compartmentCode Compartment Code
  • F
seatNumber Seat Number
  • 001A
checkInSequenceNumber Check-in Sequence Number
  • 0025
passengerStatus Passenger Status
  • 0 - Ticket issuance/passenger not checked in
  • 1 - Ticket issuance/passenger checked in
  • 2 - Bag checked/passenger not checked in
  • 3 - Bag checked/passenger checked in
  • 4 - Passenger passed security check
  • 5 - Passenger passed security gate exit (coupon used)
  • 6 - Transit
  • 7 - Standby
  • 8 - Boarding data revalidation done
  • 9 - Original boarding line used at time of ticket issuance
  • A - Up- or down-grading required at close out
airlineNumericCode Airline Numeric Code
  • 014
serialNumber Document Form/Serial Number
  • 1234567890
selecteeIndicator Selectee indicator
  • 0
internationalDocumentationVerification International Documentation Verification
  • 0 - Travel document verification not required
  • 1 - Travel document verification required
  • 2 - Travel document verification performed
marketingCarrierDesignator Marketing carrier designator
  • AC
frequentFlyerAirlineDesignator Frequent Flyer Airline Designator
  • AC
frequentFlyerNumber Frequent Flyer Number
  • 1234567890123
idIndicator ID/AD Indicator
  • 0
freeBaggageAllowance Free Baggage Allowance
  • 20K
fastTrack Fast Track
  • Y
  • N
  • true
  • false
airlineInfo For individual airline use
  • LX58Z

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. <input disabled="" type="checkbox"> Add further error handling / data checks
  2. <input disabled="" type="checkbox"> Add data capture / export
  3. <input disabled="" type="checkbox"> Add boarding pass validation node against airline DCS host using IATA BCBP XML format
  4. <input disabled="" type="checkbox"> Add basic validation rules engine
  5. <input disabled="" type="checkbox"> Add Barcode Image Decode
  6. <input disabled="" type="checkbox"> 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