The Peruvian ID Verification service allows you to verify the identity of an individual in Peru by their DNI (Documento Nacional de Identidad) number. The service returns the full name and other related information of the individual, along with a signature to certify the authenticity of the response.
Parameters
Name |
Type |
¿Required? |
Description |
Example |
documentType |
String |
True |
Document type. Allowed value: DNI. |
DNI |
documentNumber |
String |
True |
Document number of the person to be queried. |
123456789 |
Implementation
Request
import axios from 'axios';
const options = {
method: 'GET',
url: '<https://api.verifik.co/v2/pe/cedula>',
params: {documentType: 'DNI', documentNumber: '1234567'},
headers: {
Accept: 'application/json',
Authorization: 'jwt <tu_token>'
}
};
try {
notFou const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
Response 200 - (Successful request)
{
"data": {
"documentType": "DNI",
"documentNumber": "1234567",
"fullName": "MATEO VERIFIK",
"firstName": "MATEO",
"lastName": "VERIFIK",
"arrayName": [
"MATEO",
"VERIFIK"
]
},
"signature": {
"dateTime": "July 19, 2022 2:48 PM",
"message": "Certified by Verifik.co"
}
}
Other responses
|
Code |
Description |
Response Body |
404 |
Not Found |
Information not found. |
{ |
"code": "NotFound", |
|
|
|
"message": "Record not found.", |
|
|
|
"signature": { |
|
|
|
"dateTime": "August 31, 2022 3:24 PM", |
|
|
|
"message": "Certified by Verifik.co" |
|
|
|
} |
|
|
|
} |
|
|
|
409 |
Conflict |
Some parameters are missing. |
{ |
"code": "MissingParameter", |
|
|
|
"message": "missing documentType\n. missing documentNumber\n" |
|
|
|
} |
|
|
|
409 |
Conflict |
Invalid documentType for this query. |
{ |
"code": "MissingParameter", |
|
|
|
"message": "documentType must be one of: [DNI]" |
|
|
|
} |
|
|
|
|
|
|
|