{"openapi":"3.1.0","info":{"title":"Validaciones ES","version":"0.1.0","description":"Validate Spanish identifiers with the official check algorithms: NIF (DNI), NIE, CIF, IBAN and postal codes. Deterministic; no personal data is stored. Paid routes need a LicenRoute licence (Authorization: Bearer bgat_…)."},"components":{"securitySchemes":{"licence":{"type":"http","scheme":"bearer","description":"LicenRoute licence key (bgat_…)"}}},"paths":{"/v1/validate":{"get":{"summary":"List supported identifier types","security":[{"licence":[]}],"responses":{"200":{"description":"Types"},"402":{"description":"Payment required: no valid licence. The body names the plan and where to buy it."},"403":{"description":"Invented or revoked licence."}}}},"/v1/validate/tax-id/{value}":{"get":{"summary":"Detect and validate a Spanish tax ID (NIF, NIE or CIF)","security":[{"licence":[]}],"parameters":[{"name":"value","in":"path","required":true,"schema":{"type":"string"},"example":"12345678Z"}],"responses":{"200":{"description":"Validation result","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":["string","null"],"enum":["nif","nie","cif","iban","cp",null],"description":"Identifier type (detected for /v1/tax-id)."},"input":{"type":"string"},"valid":{"type":"boolean"},"normalized":{"type":["string","null"],"description":"Canonical form when valid (uppercase, no separators; IBAN grouped by 4)."},"reason":{"type":["string","null"],"enum":["format","check_letter","check_char","length","checksum","province","unknown_type",null]}},"required":["input","valid","normalized","reason"]}}}},"402":{"description":"Payment required: no valid licence. The body names the plan and where to buy it."},"403":{"description":"Invented or revoked licence."}}}},"/v1/validate/nif/{value}":{"get":{"summary":"Validate a NIF (DNI)","security":[{"licence":[]}],"parameters":[{"name":"value","in":"path","required":true,"schema":{"type":"string"},"example":"12345678Z"}],"responses":{"200":{"description":"Validation result","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":["string","null"],"enum":["nif","nie","cif","iban","cp",null],"description":"Identifier type (detected for /v1/tax-id)."},"input":{"type":"string"},"valid":{"type":"boolean"},"normalized":{"type":["string","null"],"description":"Canonical form when valid (uppercase, no separators; IBAN grouped by 4)."},"reason":{"type":["string","null"],"enum":["format","check_letter","check_char","length","checksum","province","unknown_type",null]}},"required":["input","valid","normalized","reason"]}}}},"402":{"description":"Payment required: no valid licence. The body names the plan and where to buy it."},"403":{"description":"Invented or revoked licence."}}}},"/v1/validate/nie/{value}":{"get":{"summary":"Validate a NIE","security":[{"licence":[]}],"parameters":[{"name":"value","in":"path","required":true,"schema":{"type":"string"},"example":"X1234567L"}],"responses":{"200":{"description":"Validation result","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":["string","null"],"enum":["nif","nie","cif","iban","cp",null],"description":"Identifier type (detected for /v1/tax-id)."},"input":{"type":"string"},"valid":{"type":"boolean"},"normalized":{"type":["string","null"],"description":"Canonical form when valid (uppercase, no separators; IBAN grouped by 4)."},"reason":{"type":["string","null"],"enum":["format","check_letter","check_char","length","checksum","province","unknown_type",null]}},"required":["input","valid","normalized","reason"]}}}},"402":{"description":"Payment required: no valid licence. The body names the plan and where to buy it."},"403":{"description":"Invented or revoked licence."}}}},"/v1/validate/cif/{value}":{"get":{"summary":"Validate a CIF","security":[{"licence":[]}],"parameters":[{"name":"value","in":"path","required":true,"schema":{"type":"string"},"example":"B23456783"}],"responses":{"200":{"description":"Validation result","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":["string","null"],"enum":["nif","nie","cif","iban","cp",null],"description":"Identifier type (detected for /v1/tax-id)."},"input":{"type":"string"},"valid":{"type":"boolean"},"normalized":{"type":["string","null"],"description":"Canonical form when valid (uppercase, no separators; IBAN grouped by 4)."},"reason":{"type":["string","null"],"enum":["format","check_letter","check_char","length","checksum","province","unknown_type",null]}},"required":["input","valid","normalized","reason"]}}}},"402":{"description":"Payment required: no valid licence. The body names the plan and where to buy it."},"403":{"description":"Invented or revoked licence."}}}},"/v1/validate/iban/{value}":{"get":{"summary":"Validate an IBAN (any country, ES length enforced)","security":[{"licence":[]}],"parameters":[{"name":"value","in":"path","required":true,"schema":{"type":"string"},"example":"ES9121000418450200051332"}],"responses":{"200":{"description":"Validation result","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":["string","null"],"enum":["nif","nie","cif","iban","cp",null],"description":"Identifier type (detected for /v1/tax-id)."},"input":{"type":"string"},"valid":{"type":"boolean"},"normalized":{"type":["string","null"],"description":"Canonical form when valid (uppercase, no separators; IBAN grouped by 4)."},"reason":{"type":["string","null"],"enum":["format","check_letter","check_char","length","checksum","province","unknown_type",null]}},"required":["input","valid","normalized","reason"]}}}},"402":{"description":"Payment required: no valid licence. The body names the plan and where to buy it."},"403":{"description":"Invented or revoked licence."}}}},"/v1/validate/cp/{value}":{"get":{"summary":"Validate a Spanish postal code","security":[{"licence":[]}],"parameters":[{"name":"value","in":"path","required":true,"schema":{"type":"string"},"example":"28013"}],"responses":{"200":{"description":"Validation result","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":["string","null"],"enum":["nif","nie","cif","iban","cp",null],"description":"Identifier type (detected for /v1/tax-id)."},"input":{"type":"string"},"valid":{"type":"boolean"},"normalized":{"type":["string","null"],"description":"Canonical form when valid (uppercase, no separators; IBAN grouped by 4)."},"reason":{"type":["string","null"],"enum":["format","check_letter","check_char","length","checksum","province","unknown_type",null]}},"required":["input","valid","normalized","reason"]}}}},"402":{"description":"Payment required: no valid licence. The body names the plan and where to buy it."},"403":{"description":"Invented or revoked licence."}}}},"/health":{"get":{"summary":"Health check (free)","responses":{"200":{"description":"OK"}}}}}}