Reference / RENIEC
DNI lookup
A person's names, surnames and address from their DNI, with both the RENIEC and the SUNAT location codes.
GET
/api/dni/{dni} What it's for: Fill in a customer's or employee's record from their DNI and check that the name they gave is really theirs.
Authentication
-
X-API-Keystring header required -
X-API-Key: tu_token -
Authorizationstring header -
Authorization: Bearer tu_token
Either one works. The token is generated from the client dashboard. Go to the dashboard →
Path parameters
-
dnistring required - 8-digit national ID (DNI). Example:
12345678
Response
Main fields this lookup returns:
nombres y apellidosnombre_completodireccion_completadepartamento, provincia y distritoubigeo_reniec y ubigeo_sunat
Repeats of the same lookup are served from cache for 180 days and don't count against your plan.
Status codes
- 200 OK
- Lookup resolved. Counts one request against the plan.
- 401 Invalid or expired token
- The authentication header is missing or the token isn't valid.
- 403 No access
- The plan doesn't cover this service, or the subscription isn't active.
- 404 Not found
- The lookup ran but returned nothing. It still counts.
- 429 Limit reached
- The period's lookups have run out.
- 500 Service error
- The official source failed to answer. Nothing is cached.