Skip to main content

DNI validation

Description​

Service for querying the public information of a person registered in the Single Registry of Identification of Natural Persons (RUIPN), using their DNI number.

HTTP method GET​

Endpoint​

https://api.msla-id.com/experience-idv-docverifcheck-api-v1/api/idv-govcheck/v1/pe-identity/{documentNumber}/check-dni
[SANDBOX Environment]

For testing purposes, use the base domain: apidev.msla-id.com

info

Before proceeding, make sure you have your jwt token, if you don't, check the login documentation.

Request header parameter​

NAMEREQUIREDTYPEDESCRIPTION
Authorizationβœ…stringBearer JWT token

URI request parameter​

NAMEREQUIREDTYPEDESCRIPTIONEXAMPLE
documentNumberβœ…stringPeru identity document number (DNI), 8 digits12345678

Status code responses​

CodeDescription
200OK
400IDV-4005 Bad request
401Unauthorized (empty body)
404IDV-1002 Data not found
500IDV-1001 Internal server error
504IDV-1100 Gateway timeout

The full documentation error codes can be found here.

Response 200 status code​

{
"traceId": "b2345cfc7bee621e",
"timestamp": "2026-10-14 11:59:35",
"data": {
"surname": "GARCIA",
"secondSurname": "LOPEZ",
"firstName": "MARIA",
"middleName": "ELENA",
"dateOfBirth": "15/03/1985",
"inscriptionDate": "20/04/2003",
"issueDate": "10/05/2019",
"dateOfExpiry": "10/05/2027",
"nationalLocationCode": "150101",
"nationalAddressCode": "LIMA-LIMA-LIMA",
"address": "AV. EJEMPLO 123",
"sex": "2"
}
}

Response fields​

FIELDTYPEDESCRIPTION
data.surnamestringPaternal surname
data.secondSurnamestringMaternal surname. It can be null if the record has none
data.firstNamestringFirst given name
data.middleNamestringRemaining given name(s). It can be null if the record has none
data.dateOfBirthstringDate of birth, format DD/MM/YYYY
data.inscriptionDatestringRegistration date, format DD/MM/YYYY
data.issueDatestringDNI issue date, format DD/MM/YYYY
data.dateOfExpirystringDNI expiry date, format DD/MM/YYYY
data.nationalLocationCodestringNational location code of the place of birth (UBIGEO)
data.nationalAddressCodestringNational location code of the registered address
data.addressstringRegistered address
data.sexstringRegistered sex code

Response 400 status code​

{
"traceId": "542fc743fffda052",
"timestamp": "yyyy-mm-dd HH:MM:SS",
"code": "IDV-4005",
"message": "Bad request - Invalid or incomplete input data",
"data": null
}

Response 401 status code​

The response has no body (empty).

Response 404 status code​

{
"traceId": "43a20f33d4e8730d",
"timestamp": "yyyy-mm-dd HH:MM:SS",
"code": "IDV-1002",
"message": "Data not found.",
"data": null
}

Response 500 status code​

{
"traceId": "43a20f33d4e8730d",
"timestamp": "yyyy-mm-dd HH:MM:SS",
"code": "IDV-1001",
"message": "A generic error has occurred.",
"data": null
}

Response 504 status code​

{
"traceId": "43a20f33d4e8730d",
"timestamp": "yyyy-mm-dd HH:MM:SS",
"code": "IDV-1100",
"message": "Gateway Timeout",
"data": null
}