How check digits work for Latin American IDs (CUIT, CPF, RFC) — and an API that validates 19 of them
Описание и применение
API ValidaLatam проверяет 19 типов идентификационных номеров Латинской Америки, используя корректные алгоритмы контрольных цифр.
Задача
Validating Latin American tax and national IDs is hard because each country uses a different check‑digit algorithm and the public specifications are scattered.
Результат
The API provides deterministic, stateless validation for 19 Latin American ID formats, reducing developer effort and improving data quality.
Рабочий процесс
- 1. Identify the ID type (e.g., AR_CUIT).
- 2. Call ValidaLatam endpoint: https://validalatam.ia-latam.app/validate/AR_CUIT?value=20-12345678-6
- 3. Parse JSON response: check "valid", "normalized", and "formatted" fields.
- 4. Store or reject the ID based on the "valid" flag.
Доказательства
I packaged all of this as ValidaLatam, a stateless API that validates and formats 19 types: AR_CUIT, AR_CUIL, AR_DNI, AR_CBU, AR_CVU, BR_CPF, BR_CNPJ, MX_RFC, MX_CURP, MX_CLABE, CL_RUT, CO_NIT, PE_RUC, UY_RUT, UY_CI, EC_CEDULA, EC_RUC, PY_RUC and IBAN.
curl "https://validalatam.ia-latam.app/validate/AR_CUIT?value=20-12345678-6"
- Дата записи: 2026-10-16T13:56:04.698Z