How MoonTrip's PNR Parser Turns Raw GDS Text into Flight Vouchers and Invoices
Paste Amadeus, Sabre, or Galileo PNR text — MoonTrip extracts every flight segment, passenger, and booking class instantly. No GDS terminal connection needed.
The Problem: GDS Text Is Not Human-Readable
A PNR (Passenger Name Record) is a coded data record containing all flight segments, passenger names, booking classes, and reservation status for an air booking. If you've ever looked at raw PNR output from a GDS terminal, you know it looks like this:
RP/DELAA1234/
1.SHARMA/RAJESH MR 2.SHARMA/PRIYA MRS
2 AI 865 Y 15MAR DELBOM HK2 0630 0840
3 6E 204 S 18MAR BOMDEL HK2 1900 2115
4 AP DEL 9876543210
5 TK OK15MARFor a trained GDS operator, this is readable. But most travel agents today don't work on GDS terminals — they receive this text from a consolidator, an airline's booking confirmation, or a colleague. Translating this into a customer quote means:
- •Decoding airline codes (AI = Air India, 6E = IndiGo)
- •Looking up airport codes (DEL = Delhi, BOM = Mumbai)
- •Parsing date formats (15MAR = March 15)
- •Understanding booking classes (Y = Economy, S = Economy)
- •Calculating layover durations for multi-sector routes
- •Typing all of this into a quote or invoice manually
How MoonTrip's PNR Parser Works
A GDS (Global Distribution System) is a centralized computer network used by travel agents to search, book, and manage airline reservations globally. MoonTrip's GDS PNR parser reads raw text from Amadeus, Sabre, and Galileo and converts it into structured, editable flight data. No GDS terminal connection, no API integration, no training needed — just paste and go.
Supported GDS Formats
Each GDS has its own text format. MoonTrip's parser auto-detects the format and applies the correct parsing rules:
Amadeus Format
Input:
1.SHAH/UTSAV MR
2 AI 865 Y 15MAR DELBOM HK1 0630 0840
Parsed:
Passenger : SHAH/UTSAV (MR)
Airline : Air India (AI)
Flight : AI 865
Class : Y (Economy)
Date : 15 March 2026
Route : New Delhi (DEL) → Mumbai (BOM)
Departure : 06:30
Arrival : 08:40
Status : Confirmed (HK)
Passengers : 1Sabre Format
Input:
1.1PATEL/AMIT MR
1 UK 835Y 20MAR BOMBOM HK1 0715 0930
2 UK 836Y 24MAR BOMDEL HK1 1800 2020
Parsed:
Passenger : PATEL/AMIT (MR)
Segment 1 : Vistara UK 835 · 20 Mar · BOM→DEL · 07:15-09:30
Segment 2 : Vistara UK 836 · 24 Mar · DEL→BOM · 18:00-20:20
Trip Type : Round TripGalileo Format
Input:
1.1GUPTA/SNEHA MS
1. AI 101 Y 12MAR DELBLR HK1 1045 1330
2. SG 234 S 16MAR BLRDEL HK1 0900 1145
Parsed:
Passenger : GUPTA/SNEHA (MS)
Segment 1 : Air India AI 101 · 12 Mar · DEL→BLR · 10:45-13:30
Segment 2 : SpiceJet SG 234 · 16 Mar · BLR→DEL · 09:00-11:45
Trip Type : Round TripWhat Gets Extracted
The parser doesn't just read flight numbers. It extracts and resolves everything a travel agent needs:
- •Passenger names — with title (Mr/Mrs/Ms/Mstr) and count
- •Flight segments — airline, flight number, date, departure/arrival times
- •Airport names — 3-letter IATA codes resolved to full airport names and cities
- •Airline names — 2-letter codes resolved to full airline names
- •Booking class — Y, S, V, etc. mapped to cabin type (Economy, Business, First)
- •Booking status — HK (confirmed), HL (waitlisted), UC (unable to confirm)
- •Layover detection — for multi-sector flights, layover duration and overnight stops
- •Group bookings — multiple passengers with individual or shared segments
Multi-Sector and Complex Itineraries
The PNR parser handles complex routing that would take significant time to decode manually:
Input (Sabre format):
1.1KUMAR/VIKRAM MR 2.1KUMAR/ANITA MRS
1 AI 101Y 10MAR DELBOM HK2 0600 0815
2 AI 143Y 10MAR BOMGOI HK2 1030 1145
3 AI 882Y 17MAR GOIBOM HK2 1400 1520
4 6E 204Y 17MAR BOMDEL HK2 1900 2115
Parsed:
Passengers : KUMAR/VIKRAM (MR), KUMAR/ANITA (MRS)
Mar 10: DEL → BOM AI 101 06:00–08:15
Layover: 2h 15m at Mumbai
BOM → GOI AI 143 10:30–11:45
Mar 17: GOI → BOM AI 882 14:00–15:20
Layover: 3h 40m at Mumbai
BOM → DEL 6E 204 19:00–21:15
Trip: Delhi → Mumbai → Goa → Mumbai → Delhi
Total Segments: 4
Total Passengers: 2The Generic PNR Parser: Beyond GDS
Not all flight information comes in GDS format. Travel agents often receive booking confirmations as:
- •Email confirmations from airlines or OTAs
- •WhatsApp messages from consolidators
- •Printed e-tickets (as photos or screenshots)
- •PDF booking confirmations
MoonTrip's Generic PNR Parser handles all of these. It uses AI to extract flight information from any free-form text or image:
Input (from an email):
"Dear Agent, please find below the booking details:
Passenger: Mr. Rajesh Sharma
Flight: Air India AI-865
Date: 15th March 2026
Delhi to Mumbai
Departure: 6:30 AM, Arrival: 8:40 AM
PNR: ABC123
Status: Confirmed"
Parsed:
Passenger : SHARMA/RAJESH (MR)
Flight : Air India AI 865
Date : 15 March 2026
Route : New Delhi (DEL) → Mumbai (BOM)
Departure : 06:30
Arrival : 08:40
PNR : ABC123
Status : ConfirmedInput (WhatsApp forward):
"Bhai, booking done ✅
2 pax — Mr. Vikram Mehta + Mrs. Anita Mehta
IndiGo 6E-2045, 22 Mar, BLR-DEL, 14:30-17:15
Return: Vistara UK-834, 26 Mar, DEL-BLR, 09:00-11:45
PNR: XKFT72
Fare: 8500 per pax + taxes"
Parsed:
Passengers : MEHTA/VIKRAM (MR), MEHTA/ANITA (MRS)
Segment 1 : IndiGo 6E 2045 · 22 Mar · Bengaluru (BLR) → Delhi (DEL) · 14:30–17:15
Segment 2 : Vistara UK 834 · 26 Mar · Delhi (DEL) → Bengaluru (BLR) · 09:00–11:45
PNR : XKFT72
Trip Type : Round Trip
Pax Count : 2Input (MakeMyTrip / Cleartrip style confirmation):
"Booking Confirmed — Order #MMT98234
Passenger(s): Ms. Sneha Gupta
Flight 1: SpiceJet SG-145
12 Apr 2026 · Mumbai (BOM) → Goa (GOI)
Departs: 07:20 AM · Arrives: 08:35 AM
Flight 2: Air India AI-684
16 Apr 2026 · Goa (GOI) → Mumbai (BOM)
Departs: 19:45 · Arrives: 21:00
Booking Ref: SG-ABCD12 / AI-WXYZ89
Status: Confirmed · E-ticket issued"
Parsed:
Passenger : GUPTA/SNEHA (MS)
Segment 1 : SpiceJet SG 145 · 12 Apr · Mumbai (BOM) → Goa (GOI) · 07:20–08:35
Segment 2 : Air India AI 684 · 16 Apr · Goa (GOI) → Mumbai (BOM) · 19:45–21:00
PNR : SG-ABCD12 / AI-WXYZ89
Trip Type : Round TripFrom PNR Text to Quote and Invoice
Once the PNR is parsed, the structured flight data auto-populates the quote builder. From there:
- •Flight line items are added automatically with airline, route, date, and timing
- •Pricing — add the base fare, airport taxes, and your service fee
- •Air GST — the system applies the correct 5% or 18% rate based on ticket type
- •HSN/SAC codes — 996411 for air transport services, auto-tagged
- •Invoice generation — GST-compliant invoice with CGST/SGST or IGST split
- •Itinerary — flight details flow into the travel itinerary document
Parsed Flight: AI 865 · DEL→BOM · 15 Mar · 06:30–08:40
Quote Line Item:
Description : Air India AI 865 — New Delhi to Mumbai
Date : 15 March 2026
Base Fare : ₹5,000
Airport Taxes: ₹2,500 (YQ + PSF + UDF)
Service Fee : ₹500
GST @18% : ₹90 (on service fee, Pure Agent)
───────────────────────────────────────────────
Line Total : ₹8,090Related Guides
Stop calculating manually
MoonTrip automates GST, invoicing, and profit tracking for Indian travel agencies.
Get Started Free