validate
Check the check-digit of shipping container, air waybill, and IMO ship identification numbers to verify structural validity using their respective algorithms.
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.
Behavior: deterministic check-digit arithmetic; per identifier found it reports type, the normalised form, valid (pass/fail), expected vs actual check digit, and details (container: owner prefix + equipment category; AWB: airline prefix + the operating airline resolved from the AWB-prefix dataset; IMO: the 7-digit number); text mode with no identifiers found returns an empty found[] with a note. Rate-limited (anonymous use: 25 requests/day per IP): a 429 error body carries retry_after_seconds and a Retry-After header — back off and retry, or call get_subscribe_link for higher limits.
Returns: found[] (each entry with its own _source naming the standard applied) and disclaimer under result, plus confidence, _source and citation (the FreightUtils v1 response envelope).
Limitations: STRUCTURAL ONLY — a valid check digit means well-formed, NOT that the container, shipment or vessel exists or is active; not a registry or tracking lookup.
Related: container_lookup (container TYPE specs, not numbers), airline_lookup (the AWB-prefix dataset the airline resolution uses).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | No | Arbitrary string to scan for container / AWB / IMO identifiers (parse mode). Provide this OR value+type. Example: "2 cntrs MSKU3068808 / TGHU7654325 on AWB 176-12345675". | |
| 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. Example: "MSKU3068808". |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| result | Yes | ||
| _source | Yes | ||
| citation | Yes | ||
| validity | No | ||
| warnings | No | ||
| confidence | Yes | ||
| blocking_errors | No | ||
| envelope_version | Yes | ||
| normalized_input | No |