This service allows users to retrieve detailed information about Peruvian ID cards (DNI). The service returns a response that includes the document type, document number, full name, first name, last name, verification digit, date of birth, expedition date, expiration date, date of death (if applicable), age, gender, civil status, province, area, home district, donor status, ubigeous, postal code, death area (if applicable), death province (if applicable), and death home district (if applicable).
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 response)
{
"data": {
"age": "71",
"area": "LIMA",
"arrayName": [
"MATEO",
"VERIFIK"
],
"civilStatus": "CASADO",
"dateOfBirth": "1952-10-26T00:00:00.000Z",
"dateOfDeath": null,
"documentNumber": "1234567",
"documentType": "DNI",
"donor": false,
"expeditionDate": "2015-03-15T00:00:00.000Z",
"expirationDate": "Wed Jan 01 3000 00:00:00 GMT+0000 (Coordinated Universal Time)",
"firstName": "MATEO",
"fullName": "VERIFIK",
"gender": "MUJER",
"homeDistrict": "SAN MARTIN DE PORRES",
"lastName": "VERIFIK",
"postalCode": "15100",
"province": "LIMA",
"ubigeous": "010101",
"verificationDigit": "0"
},
"signature": {
"dateTime": "March 13, 2024 4:38 PM",
"message": "Certified by Verifik.co"
},
"id": "SF11X"
}
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]" |
|
|
|
} |
|
|
|