Overview
An air waybill (AWB) number is an 11-digit identifier consisting of a 3-digit airline prefix and an 8-digit serial number. The last digit of the serial number is a check digit calculated using the modulus-7 algorithm defined in IATA Resolution 600a.
Check-digit validation is a critical quality gate in freight document processing. A misread digit in OCR will almost always produce an invalid check digit, making this a fast and reliable error-detection mechanism. KabyTech validates check digits automatically and flags mismatches in the API response.
This tutorial walks through the AWB number structure, the modulus-7 calculation, and common errors encountered when processing scanned documents.
Step 1 — Airline Prefix (3 Digits)
The first three digits identify the issuing airline. These prefixes are assigned by IATA and are unique to each carrier. For example, 160 is Thai Airways (TG), 235 is Turkish Airlines (TK), and 057 is Air France (AF). The prefix is separated from the serial number by a hyphen in display format but is part of the 11-digit number for validation purposes.
KabyTech maintains an up-to-date database of IATA airline prefixes. When the extracted prefix does not match any known airline, the API flags it as a potential OCR error. This is especially useful for catching digit transpositions in the prefix, which the check-digit algorithm alone cannot detect since it operates only on the serial portion.
# Common airline prefixes in Thai freight # 160 — Thai Airways (TG) # 217 — Thai AirAsia (FD) # 618 — Thai Lion Air (SL) # 176 — Emirates (EK) # 235 — Turkish Airlines (TK) # 014 — Air Cargo Carriers