How to validate ISO 6346 container numbers in a TMS
Validate the structure and check digit first, then match the container to its booking, leg and latest observation. A valid number does not prove which container was loaded or who is carrying it now.
Separate equipment identity from shipment and seal references.
An ISO 6346 container number combines a three-letter owner code, an equipment category letter, a six-digit serial and a final check digit. The BIC check-digit calculator can help check transcription. Preserve leading zeroes and store the raw source value alongside a consistent comparison value.
Do not use the owner code as the operating carrier, or treat a container as a shipment identifier. A container may move on several legs and carry multiple consignments. The seal number should have its own field and observation history.
The booking and gate scan refer to different valid containers.
A synthetic booking lists one container, but the terminal records a replacement at the gate. If both numbers pass the checksum, the issue is assignment, not formatting. Retain the booked reference, capture the observed equipment and record when the replacement took effect. Send the mismatch to the booking owner before updating downstream documents.
Test format and equipment assignment independently.
- Reject incomplete numbers or a wrong check digit; do not silently repair a digit and treat the result as confirmed.
- Test a valid check digit but wrong booking or leg. Keep the documentary and observational sources visible.
- When a container changes, confirm which current downstream records need the new number without rewriting prior events.