validate_nif_es
Validates Spanish tax identification numbers — NIF (DNI, 8 digits + check letter, for Spanish citizens), NIE (Número de Identidad de Extranjero, starts with X/Y/Z, for foreign residents), and CIF (Código de Identificación Fiscal, letter + 7 digits + control, for companies). Automatically detects the document type. Returns { valid: boolean, type: 'NIF'|'NIE'|'CIF', id: string }. Use when processing Spanish invoices, e-commerce orders, supplier registrations, or any document requiring a verified Spanish fiscal identifier.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Spanish NIF, NIE or CIF with or without spaces. Examples: '12345678Z' (NIF), 'X1234567L' (NIE), 'B12345678' (CIF) |