node-red-contrib-iata-bcbp
v1.0.0
Published
Node Red nodes to decode and encode IATA Resolution 792 Compliant Boarding Pass Barcodes
Downloads
20
Maintainers
Readme
node-red-contrib-iata-bcbp
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:
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/LUCDOE/JOHN| |passengerDescription|Passenger Description|0 - Adult1 - Male2 - Female3 - Child4 - Infant5 - No passenger (cabin baggage)6 - Adult travelling with infant7 - Unaccompanied minor| |checkInSource|Source of check-in|W - WebK - Airport KioskR - Remote or Off Site KioskM - Mobile DeviceO - Airport AgentT - Town AgentV - Third Party Vendor| |boardingPassIssuanceSource|Source of Boarding Pass Issuance|W - WebK - Airport KioskX - Transfer KioskR - Remote or Off Site KioskM - Mobile DeviceO - Airport AgentT - Town AgentV - Third Party Vendor| |issuanceDate|Date of Issue of Boarding Pass|6225ISO 8601 formatted stringMoment.js objectJavaScript date object| |documentType|Document Type|B - Boarding PassI - 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|226ISO 8601 formatted stringMoment.js objectJavaScript 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 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| |airlineNumericCode|Airline Numeric Code|014| |serialNumber|Document Form/Serial Number|1234567890| |selecteeIndicator|Selectee indicator|0| |internationalDocumentationVerification|International Documentation Verification|0 - Travel document verification not required1 - Travel document verification required2 - 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|YNtruefalse| |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
- [ ] Add further error handling / data checks
- [ ] Add data capture / export
- [ ] Add boarding pass validation node against airline DCS host using IATA BCBP XML format
- [ ] Add basic validation rules engine
- [ ] Add Barcode Image Decode
- [ ] Add Boarding Pass template generation
Authors & Contributors
- Mark Funston - Node Red Wrapper - mlfunston
- georgesmith46 - Original NPM Package for bcbp - georgesmith46
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