validate
Validate container, air waybill, and IMO numbers by their check digits. Parse free text for identifiers or validate a specific ID with type.
Instructions
Validate and parse freight identifiers by their public check-digit algorithms: shipping container numbers (ISO 6346), air waybill (AWB) numbers (IATA modulus-7) and IMO ship identification numbers.
Two modes: pass text= to find and validate every identifier in it (e.g. a booking-email line), OR pass value= + type=<container|awb|imo> to validate one. Returns, per identifier found: type, the normalised form, valid (check-digit pass/fail), the expected vs actual check digit, and details (container → owner prefix + equipment category; AWB → airline prefix + the airline, resolved from the AWB-prefix dataset; IMO → the 7-digit number).
Use to confirm a container/AWB/IMO number is well-formed, or to extract identifiers from a freeform string. STRUCTURAL ONLY — a valid check digit means well-formed, NOT that the container/shipment/vessel exists or is active; not a registry/tracking lookup. Distinct from container_lookup (container TYPE specs) and airline_lookup (airline search); this checks an identifier's check digit and, for an AWB, names the operating airline.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | No | Arbitrary string to scan for container / AWB / IMO identifiers (parse mode). Provide this OR value+type. | |
| type | No | Identifier type for value: container = ISO 6346, awb = IATA Air Waybill, imo = IMO ship number. | |
| value | No | A single identifier to validate (typed mode). Requires type. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | ||
| found | Yes | ||
| disclaimer | Yes |