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
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β
| NAME | REQUIRED | TYPE | DESCRIPTION |
|---|---|---|---|
| Authorization | β | string | Bearer JWT token |
URI request parameterβ
| NAME | REQUIRED | TYPE | DESCRIPTION | EXAMPLE |
|---|---|---|---|---|
| documentNumber | β | string | Peru identity document number (DNI), 8 digits | 12345678 |
Status code responsesβ
| Code | Description |
|---|---|
| 200 | OK |
| 400 | IDV-4005 Bad request |
| 401 | Unauthorized (empty body) |
| 404 | IDV-1002 Data not found |
| 500 | IDV-1001 Internal server error |
| 504 | IDV-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β
| FIELD | TYPE | DESCRIPTION |
|---|---|---|
| data.surname | string | Paternal surname |
| data.secondSurname | string | Maternal surname. It can be null if the record has none |
| data.firstName | string | First given name |
| data.middleName | string | Remaining given name(s). It can be null if the record has none |
| data.dateOfBirth | string | Date of birth, format DD/MM/YYYY |
| data.inscriptionDate | string | Registration date, format DD/MM/YYYY |
| data.issueDate | string | DNI issue date, format DD/MM/YYYY |
| data.dateOfExpiry | string | DNI expiry date, format DD/MM/YYYY |
| data.nationalLocationCode | string | National location code of the place of birth (UBIGEO) |
| data.nationalAddressCode | string | National location code of the registered address |
| data.address | string | Registered address |
| data.sex | string | Registered 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
}