ISO 6346 Container Check-Digit API
Shipping container & chassis code verification with size/type decoding
The ISO 6346 Container Check-Digit API validates shipping container and chassis codes in a single call: it parses the 3-letter owner (BIC) code, the equipment category identifier (U for freight containers, J for detachable cargo equipment, Z for trailers and chassis), the 6-digit serial number, and recomputes the weighted MOD-11 check digit exactly as specified by ISO 6346.
A single mistyped character in a container number causes misrouted freight, demurrage disputes, and terminal check-gate rejections. This API catches those errors at data entry — in TMS integrations, booking forms, bill-of-lading generators, and EDI mapping pipelines — with sub-15ms responses from 300+ Cloudflare edge locations.
The size/type endpoint decodes the 4-character ISO 6346 size and type designation: container length (10ft to 53ft), height (standard, high cube, half height), and type group (general purpose, reefer, open top, flat, tank, ventilated, dry bulk, thermal) — with a curated dictionary of the 20 most common codes including exact descriptions.
Features
- ISO 6346 weighted MOD-11 check-digit verification
- Accepts 10-character codes (returns the computed check digit) and 11-character codes (verifies)
- Equipment category classification: freight container, detachable equipment, trailer/chassis
- Size/type decoding for length, height, and type group
- Curated dictionary of 20 common size/type codes with full descriptions
- Sub-15ms responses from 300+ Cloudflare edge locations
- Deterministic, cacheable, zero external subrequests
Endpoints
| Method | Path | Description | Example |
|---|---|---|---|
GET | /api/v1/container/{code} | Verify an 10- or 11-character container code check digit | /api/v1/container/CSQU3054383 |
GET | /api/v1/sizetype/{code} | Decode a 4-character ISO 6346 size/type code | /api/v1/sizetype/45G1 |
GET | /health | Service health check | /health |
FAQ
What is an ISO 6346 container check digit?
Every container code ends in a check digit computed from the 10 preceding characters. Letters map to numeric values (multiples of 11 are skipped) and each position carries a power-of-two weight; the sum is taken modulo 11 and then modulo 10. A mistyped character almost always changes the sum, making the code mathematically invalid.
What is the difference between U, J, and Z in a container code?
The fourth character is the equipment category identifier: U marks a freight container, J marks detachable cargo container equipment (such as generator sets), and Z marks a trailer or chassis. The check-digit algorithm is identical for all three.
What does a size/type code like 45G1 mean?
The first character encodes length (4 = 40ft), the second encodes height (5 = 9ft 6in high cube), and the last two encode the type (G1 = general purpose with passive vents). So 45G1 is a 40ft high cube dry container.
Can I use the API to compute a check digit for a new serial number?
Yes. Send the 10-character base (owner code + category + serial) without a check digit and the response includes expectedCheckDigit, the value ISO 6346 assigns as the eleventh character.
Is there a free plan?
Free developer keys are available at stanzaapi.com for development and testing, plus paid plans for production quotas. All plans run on the same low-latency edge infrastructure.