{"id":"iso6346-container-validate","version":"1.0.0","description":"Validate an 11-character ISO 6346 container number's mod-11 check digit and split the owner code, category and serial.","supported_operations":["validate a shipping container number","check digit for an iso 6346 container","is this container number valid","split a container number into owner code and serial","verify a freight container checksum","container number category identifier meaning"],"unsupported_operations":["a live carrier or terminal container-tracking lookup","decoding owner-code registrant names (needs the BIC owner-code directory)","validating a chassis or swap-body number under a different national scheme"],"semantics":["container_number is taken exactly as given: no trimming, no case folding. Length != 11 returns reason wrong_length; length 11 but not matching ^[A-Z]{3}[UJZ][0-9]{7}$ returns reason invalid_character; both leave owner_code/category/serial/check_digit null.","owner_code = container_number[0:3], category = container_number[3] (one of U, J, Z), serial = container_number[4:10], check_digit = container_number[10], populated once length and charset pass.","Letter values for the check digit: digits keep their value; letters start at A=10 and skip every multiple of 11 (so 11, 22 and 33 are never assigned), giving B=12 ... K=21, L=23, M=24 ... U=32, V=34 ... Z=38.","Weighted sum over the 10 characters owner_code+category+serial (left to right): value(char[i]) * 2^i, i = 0..9. remainder = sum mod 11; the expected check digit is 0 when remainder is 10, else remainder."],"limits":{"max_container_number_bytes":11},"pricing":{"status":"unpriced","charge_usd":null},"input_schema":{"type":"object","additionalProperties":false,"required":["container_number"],"properties":{"container_number":{"type":"string","minLength":1,"maxLength":11}}},"output_schema":{"type":"object","additionalProperties":false,"required":["valid","reason","owner_code","category","serial","check_digit"],"properties":{"valid":{"type":"boolean"},"reason":{"type":["string","null"],"enum":[null,"wrong_length","invalid_character","check_digit_mismatch"]},"owner_code":{"type":["string","null"],"pattern":"^[A-Z]{3}$"},"category":{"type":["string","null"],"enum":[null,"U","J","Z"]},"serial":{"type":["string","null"],"pattern":"^[0-9]{6}$"},"check_digit":{"type":["string","null"],"pattern":"^[0-9]$"}}},"examples":[{"input":{"container_number":"CSQU3054383"},"output":{"valid":true,"reason":null,"owner_code":"CSQ","category":"U","serial":"305438","check_digit":"3"}},{"input":{"container_number":"ABCJ0000004"},"output":{"valid":true,"reason":null,"owner_code":"ABC","category":"J","serial":"000000","check_digit":"4"}},{"input":{"container_number":"CSQU305438"},"output":{"valid":false,"reason":"wrong_length","owner_code":null,"category":null,"serial":null,"check_digit":null}}],"execute_url":"/v1/tools/iso6346-container-validate/versions/1.0.0/execute"}