Validación de Tax IDs en loteBETAcore beta

Validá y normalizá identificaciones personales y fiscales (DNI, CUIT, CUIL, CPF, CNPJ, RFC, CURP, RUT, NIT, RUC, Cédula y más) con checksum por país. Hasta 1.000 ítems por request.

Contrato estable; cambios breaking solo con deprecation previo.

POST/v1/validate/tax-ids
Resumen

Validate a batch of personal or tax identifications. Each item declares its `country` (required) and optionally a `type` — when `type` is omitted the validator is resolved within the country. Implements the correct per-country checksum: weighted Mod-11 (CUIT), two-round Mod-11 (CPF, CNPJ), the SAT homoclave (RFC), Mod-11 with K check digit (RUT-CL), and more. Covers personal IDs (DNI, CURP, Cédula) and tax IDs. Each result carries `valid`, the `normalized` value (digits only) and a `formatted` representation. The same endpoint serves 1 or N items: up to 1000 per request.

URL base: https://api.normadata.io

Header de autenticación: X-API-Key: nd-...

Cuerpo del request

Cuerpo del request

CampoTipoObligatorioDescripción
itemsarrayArray of items to validate (1–1000). Each item is the object described below.
items[].idstringnoClient-provided correlation id, echoed back verbatim in the matching result.
items[].valuestringIdentification value to validate (with or without separators).
items[].countrystringISO 3166-1 alpha-2 country code. Determines which validators are eligible.
items[].typestringnoValidator type (cuit, cuil, cpf, cnpj, rfc, curp, rut, nit, ruc, rif, cedula, …). If omitted, it is resolved within the country.
Ejemplo de request

Ejemplo de request

cURL
curl -X POST https://api.normadata.io/v1/validate/tax-ids \
  -H "X-API-Key: nd_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
  -H "Content-Type: application/json" \
  -d '{"items":[
    {"id":"a","value":"20-12345678-6","country":"AR","type":"cuit"},
    {"id":"b","value":"123.456.789-09","country":"BR"}
  ]}'
Go
package main

import (
	"bytes"
	"encoding/json"
	"fmt"
	"net/http"
	"os"
)

type TaxIDItem struct {
	ID      string `json:"id"`
	Value   string `json:"value"`
	Country string `json:"country"`
	Type    string `json:"type,omitempty"`
}

type TaxIDResult struct {
	ID         string `json:"id"`
	Country    string `json:"country"`
	Type       string `json:"type"`
	Valid      bool   `json:"valid"`
	Normalized string `json:"normalized"`
	Formatted  string `json:"formatted"`
}

type TaxIDResponse struct {
	Results []TaxIDResult `json:"results"`
}

func main() {
	body, _ := json.Marshal(map[string][]TaxIDItem{
		"items": {
			{ID: "a", Value: "20-12345678-6", Country: "AR", Type: "cuit"},
			{ID: "b", Value: "123.456.789-09", Country: "BR"},
		},
	})
	req, _ := http.NewRequest("POST", "https://api.normadata.io/v1/validate/tax-ids", bytes.NewReader(body))
	req.Header.Set("X-API-Key", os.Getenv("NORMADATA_API_KEY"))
	req.Header.Set("Content-Type", "application/json")

	res, err := http.DefaultClient.Do(req)
	if err != nil { panic(err) }
	defer res.Body.Close()

	var out TaxIDResponse
	json.NewDecoder(res.Body).Decode(&out)
	for _, r := range out.Results {
		fmt.Println(r.ID, r.Valid, r.Normalized)
	}
}
Ejemplo de respuesta

Ejemplo de respuesta 200

JSON
{
  "results": [
    {
      "id": "a",
      "country": "AR",
      "type": "cuit",
      "valid": true,
      "normalized": "20123456786",
      "formatted": "20-12345678-6"
    },
    {
      "id": "b",
      "country": "BR",
      "type": "cpf",
      "valid": true,
      "normalized": "12345678909",
      "formatted": "123.456.789-09"
    }
  ]
}
Errores comunes

Errores comunes

Códigos de error que podés encontrar al llamar este endpoint. El envelope completo está documentado en la referencia principal.

Código
INVALID_TAX_ID
MISSING_VALUE
MISSING_COUNTRY
INVALID_COUNTRY
empty_batch
batch_too_large
quota_exceeded

Ver todos los códigos de error

Notas

Notas

Validates format, length and check digit only — it does not confirm the taxpayer exists or is active in any registry. Separators are stripped before validation. Personal IDs without a check digit (e.g. DNI AR) fall back to length and shape validation. The envelope is shared by every endpoint: POST `{items:[…]}` (1–1000) and the response is `{results:[…]}` correlated by `id`.

Acceso

Usá este endpoint en acceso anticipado

El acceso a Normadata es por solicitud. Solicitá acceso con tu caso de uso y provisionamos la API key para tu cuenta.

Solicitar acceso