South Star

Container Code Validator ISO 6346 Check Digit API

Free tier included · Logistics
Validate ISO 6346 container numbers offline: owner code, category, serial and mod-11 check digit, plus 4-char size/type decoding.

Freight container numbers look simple — four letters, seven digits — but only one of those digits is a real check digit, and getting it wrong silently breaks EDI messages, gate-in scans and customs filings. This API validates ISO 6346 container numbers end to end: it splits the owner code, equipment category (U, J or Z), six-digit serial and check digit, then recomputes the check digit using the standard letter-value table (A=10 … Z=38, skipping multiples of 11), positional weights of 2^pos, sum mod 11 with 10 mapped to 0. A tampered or mistyped number comes back as `valid: false` with the expected digit, so you can reject it before it reaches a terminal system.

The second endpoint decodes the 4-character size/type code: ISO 6346:1995 size codes (including 45 ft as `5` or `L`), detailed type codes with their alternative codes, EDI type group codes such as `22GP` and `45RT`, common carrier codes and the older all-numeric 1984 codes.

Who uses it: logistics platforms validating container numbers on booking forms, TMS/EDI integrators checking messages before transmission, port and depot gate systems, and data teams cleaning container IDs in historical spreadsheets.

Why this one: fully offline — no BIC registry lookups, no external calls, no request logging, no cross-request state. Each call is string arithmetic on a short input, so responses are tiny and fast, and every result is deterministic.

Endpoints

MethodPathWhat it does
GET/validateValidate one container number: owner code, equipment category, serial, and recomputed mod-11 check digit.
GET/size-typeDecode a 4-character ISO 6346 size/type code into length, height/width and type details.

Quick start

curl -X GET "https://iso6346.p.rapidapi.com/validate?code=MSKU3881107" \
  -H "X-RapidAPI-Key: YOUR_RAPIDAPI_KEY" \
  -H "X-RapidAPI-Host: iso6346.p.rapidapi.com"

FAQ

Does a valid check digit mean the container exists or belongs to that owner?

No. The API validates structure and arithmetic only. It does not resolve the BIC owner registry, so `MSKU` is accepted as a structurally valid owner prefix, not as a confirmed Maersk box.

Is anything logged or sent to third parties?

No. Validation runs entirely offline against embedded tables — no BIC lookups, no database, no request logs, no cross-request state.

Can I validate a batch of container numbers?

There is no bulk endpoint; send one `GET /validate` per number. Each response is a few hundred bytes, so parallel calls are cheap — but respect the hourly cap of your plan.

What happens with a lowercase or malformed input?

Inputs over the length limit or missing the required `code` parameter return HTTP 422 with a structured error. A well-formed-size but wrong number (e.g. a tampered serial) returns HTTP 200 with `valid: false` and the `computed_check_digit` you expected.

Try Container Code Validator ISO 6346 Check Digit free

Free tier on every plan. Get an API key and start calling in under a minute.

Open on RapidAPI

Related APIs