{"id":"imo-number-validate","version":"1.0.0","description":"Validate a 7-digit IMO ship identification number's weighted mod-10 check digit, with or without the 'IMO ' prefix.","supported_operations":["validate an imo ship number","check digit for imo number","is this imo number valid","verify a vessel identification number","imo number checksum calculator","strip the imo prefix and validate the digits"],"unsupported_operations":["a live IMO GISIS ship-registry lookup","validating an IMO company or registered owner number (a different scheme)","lowercase \"imo \" or a prefix without the trailing space (not recognized, evaluated as the whole candidate)"],"semantics":["Only the exact 4-character literal prefix \"IMO \" (capital I, M, O, one space) is stripped, giving the candidate; any other form (lowercase, missing space) is left as the whole candidate, evaluated below unchanged.","candidate.length != 7 returns reason wrong_length; length 7 but not all-digit returns reason invalid_character; both leave number/check_digit null.","number = candidate, check_digit = candidate[6], populated once length and charset pass.","Weighted sum over positions 1-6: digit * weight, weight = [7, 6, 5, 4, 3, 2]. expected check digit = sum mod 10, compared to check_digit for reason check_digit_mismatch."],"limits":{"max_imo_bytes":11},"pricing":{"status":"unpriced","charge_usd":null},"input_schema":{"type":"object","additionalProperties":false,"required":["imo"],"properties":{"imo":{"type":"string","minLength":1,"maxLength":11}}},"output_schema":{"type":"object","additionalProperties":false,"required":["valid","reason","number","check_digit"],"properties":{"valid":{"type":"boolean"},"reason":{"type":["string","null"],"enum":[null,"wrong_length","invalid_character","check_digit_mismatch"]},"number":{"type":["string","null"],"pattern":"^[0-9]{7}$"},"check_digit":{"type":["string","null"],"pattern":"^[0-9]$"}}},"examples":[{"input":{"imo":"IMO 9074729"},"output":{"valid":true,"reason":null,"number":"9074729","check_digit":"9"}},{"input":{"imo":"9319466"},"output":{"valid":true,"reason":null,"number":"9319466","check_digit":"6"}},{"input":{"imo":"9074720"},"output":{"valid":false,"reason":"check_digit_mismatch","number":"9074720","check_digit":"0"}}],"execute_url":"/v1/tools/imo-number-validate/versions/1.0.0/execute"}