{"id":"bic-validate","version":"1.0.0","description":"Validate a Business Identifier Code's ISO 9362:2022 structure and parse its party prefix, country, location and branch.","supported_operations":["validate a bic swift code","is this swift code valid","parse bank code and branch from a bic","is this a test or passive bic","check if a bic is the bank's primary office","בדיקת קוד סוויפט"],"unsupported_operations":["checksum or check-digit validation (BIC carries none)","looking up the bank name, address or branch list for a BIC","case-folding a lowercase input (a lowercase BIC fails structurally)"],"semantics":["bic is taken exactly as given; this tool does not case-fold. A lowercase or mixed-case bic fails structurally, it is never upper-cased.","If bic.length is not 8 and not 11, valid:false, reason:'wrong_length' with every parsed field null.","Otherwise the shape ^[A-Z0-9]{4}[A-Z]{2}[A-Z0-9]{2}([A-Z0-9]{3})?$ must match (4-char party prefix, 2-letter country, 2-char location, optional 3-char branch); else valid:false, reason:'invalid_character'.","party_prefix = bic[0:4], country = bic[4:6], location = bic[6:8], branch = bic[8:11] when length is 11 else null. is_primary_office = branch is null or branch === 'XXX'. location_type: location[1] '0' -> 'test', '1' -> 'passive', else 'normal'. Both are computed regardless of country validity.","If country is neither one of the pinned officially-assigned ISO 3166-1 alpha-2 codes (isIso3166Alpha2) nor 'XK' (Kosovo: a user-assigned code that SWIFT uses in live BICs), valid:false, reason:'invalid_country' with the parsed fields still populated. Otherwise valid:true, reason:null. No checksum exists for a BIC; validation is purely structural."],"limits":{"max_bic_bytes":20},"pricing":{"status":"unpriced","charge_usd":null},"input_schema":{"type":"object","additionalProperties":false,"required":["bic"],"properties":{"bic":{"type":"string","minLength":1,"maxLength":20}}},"output_schema":{"type":"object","additionalProperties":false,"required":["valid","reason","party_prefix","country","location","branch","is_primary_office","location_type","data_version"],"properties":{"valid":{"type":"boolean"},"reason":{"type":["string","null"],"enum":[null,"wrong_length","invalid_character","invalid_country"]},"party_prefix":{"type":["string","null"],"pattern":"^[A-Z0-9]{4}$"},"country":{"type":["string","null"],"pattern":"^[A-Z]{2}$"},"location":{"type":["string","null"],"pattern":"^[A-Z0-9]{2}$"},"branch":{"type":["string","null"],"pattern":"^[A-Z0-9]{3}$"},"is_primary_office":{"type":["boolean","null"]},"location_type":{"type":["string","null"],"enum":[null,"normal","test","passive"]},"data_version":{"type":"string"}}},"examples":[{"input":{"bic":"DEUTDEFF"},"output":{"data_version":"iso3166-1-2026-09-28","valid":true,"reason":null,"party_prefix":"DEUT","country":"DE","location":"FF","branch":null,"is_primary_office":true,"location_type":"normal"}},{"input":{"bic":"DEUTDEFF500"},"output":{"data_version":"iso3166-1-2026-09-28","valid":true,"reason":null,"party_prefix":"DEUT","country":"DE","location":"FF","branch":"500","is_primary_office":false,"location_type":"normal"}},{"input":{"bic":"DEUTXXFF"},"output":{"data_version":"iso3166-1-2026-09-28","valid":false,"reason":"invalid_country","party_prefix":"DEUT","country":"XX","location":"FF","branch":null,"is_primary_office":true,"location_type":"normal"}}],"execute_url":"/v1/tools/bic-validate/versions/1.0.0/execute"}