Validation

AWB check digit (Mod-7) and weight validation

Generic OCR can misread a digit. DocAPI treats IATA Mod-7 check-digit validation and chargeable-weight sanity checks as part of the product—so your cargo TMS gets a failed-check signal, not a quiet wrong AWB number.

What is the AWB Mod-7 check digit?

An airline air waybill number is typically written as XXX-XXXXXXXX: a 3-digit airline prefix plus an 8-digit serial that ends with a check digit. Under the common IATA rule, the check digit is the remainder when the first seven digits of the serial (the number without the check digit) are divided by 7.

Example

AWB 071-12760786

How DocAPI uses it

"validations": {
  "awb_check_digit_ok": true,
  "chargeable_gte_gross": true
},
"needs_review": false

Weight rule: chargeable ≥ gross

Air cargo rating usually bills the greater of gross weight and volumetric (chargeable) weight. When both fields are present, DocAPI checks chargeable_kg ≥ gross_kg. A failure does not invent a new weight—it flags review so ops can decide.

air waybill check digit validation

Use Mod-7 as a gate before writing awb_number into your system of record.

air waybill chargeable weight extract

Extract both weights, then validate the usual inequality in the same response.

Why this beats “paste into ChatGPT”

Chat demos don’t ship a stable HTTP contract, Mod-7 boolean, or needs_review for your queue. An AWB OCR API for production needs failed-check signals as first-class fields—see the air waybill to JSON API page.

Accuracy note

Field accuracy cited elsewhere on this site comes from a self-built ~31-document internal eval, not third-party certification. Mod-7 itself is a deterministic rule; extraction of the digits is model + OCR dependent.
API overview Buy credits Product