Parse a 13-digit IATA electronic ticket number into its component parts and validate its check digit.

domain: iata.org · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Split the ticket number into a 3-digit airline numeric (accounting) code, a 4-digit form code, and a 6-digit serial number (3+4+6 = 13 digits), per the structure documented in IATA e-ticketing references and reflected in GDS ticketing docs.
  2. Look up the airline separately from its 3-digit accounting code (e.g., 001 = American Airlines, 006 = Delta) — don't infer the airline from the ticket number without a lookup table.
  3. Take the 10-digit document number (form code + serial number) and compute its remainder modulo 7.
  4. Compare that remainder to the ticket's check digit — GDS platforms such as Amadeus display it appended to the ticket number (e.g., after a slash) in ticketing entries, computed the same way, so a valid check digit equals document-number mod 7 (a value 0-6).
  5. Flag any ticket number whose trailing check digit is 7, 8, or 9, or that fails the mod-7 comparison, as malformed or mistyped before using it in downstream lookups.
  6. Treat the ticket number as distinct from the PNR/booking reference (a separate 6-character alphanumeric code) — don't conflate the two when validating user-entered references.

Known gotchas

Related routes

Parse the MRZ (Machine Readable Zone) of a TD3 travel document and validate check digits per ICAO 9303
icao.int · 5 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans