π΅πͺ Peru - Foreigner ID
The Peruvian ID Verification service allows you to verify the identity of an individual in Peru by their foreigner ID number. The service returns the full name and other related information of the individual, including immigration status, nationality, residence expiration, and foreigner ID details, along with a signature to certify the authenticity of the response.
This service is useful for verifying foreign residents in Peru and accessing their immigration status and document validity.
Endpointβ
GET https://api.verifik.co/v2/pe/foreigner-id/ce
Headersβ
| Name | Value |
|---|---|
| Content-Type | application/json |
| Authorization | Bearer <token> |
Parametersβ
| Name | Type | Required | Description | Example |
|---|---|---|---|---|
documentNumber | string | Yes | Document number of the person to be queried. | 005015372 |
dateOfBirth | string | Yes | The date of birth of the document owner. | 16/08/1993 |
Requestβ
- JavaScript
- Python
- PHP
- Swift
const axios = require('axios');
let config = {
method: 'get',
maxBodyLength: Infinity,
url: 'https://api.verifik.co/v2/pe/foreigner-id/ce',
params: {
documentNumber: '005015372',
dateOfBirth: '16/08/1993'
},
headers: {
'Authorization': 'Bearer <token>'
}
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
import http.client
conn = http.client.HTTPSConnection("api.verifik.co")
payload = ''
headers = {}
conn.request("GET", "/v2/pe/foreigner-id/ce?documentNumber=005015372&dateOfBirth=16/08/1993", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://api.verifik.co/v2/pe/foreigner-id/ce?documentNumber=005015372&dateOfBirth=16/08/1993');
$request->setMethod(HTTP_Request2::METHOD_GET);
$request->setConfig(array(
'follow_redirects' => TRUE
));
try {
$response = $request->send();
if ($response->getStatus() == 200) {
echo $response->getBody();
}
else {
echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
$response->getReasonPhrase();
}
}
catch(HTTP_Request2_Exception $e) {
echo 'Error: ' . $e->getMessage();
}
?>
var request = URLRequest(url: URL(string: "https://api.verifik.co/v2/pe/foreigner-id/ce?documentNumber=005015372&dateOfBirth=16/08/1993")!,timeoutInterval: Double.infinity)
request.httpMethod = "GET"
let task = URLSession.shared.dataTask(with: request) { data, response, error in
guard let data = data else {
print(String(describing: error))
return
}
print(String(data: data, encoding: .utf8)!)
}
task.resume()
Responseβ
- 200
- 404
- 409 - Missing documentNumber
- 409 - Invalid dateOfBirth format
{
"data": {
"arrayName": [
"CORDERO",
"SANCHEZ",
"ANA",
"RENE"
],
"dateOfBirth": "16/08/1993",
"documentNumber": "005015372",
"firstName": "ANA RENE",
"foreignerIdExpiration": "12/08/2025",
"foreignerIdLastIssuance": "12/08/2021",
"fullName": "ANA RENE CORDERO SANCHEZ",
"immigrationStatus": "HUMANITARIA",
"lastName": "CORDERO CAMPERO",
"nationality": "VENEZOLANA",
"residenceExpiration": "26/02/2025"
},
"signature": {
"dateTime": "November 6, 2024 3:22 PM",
"message": "Certified by Verifik.co"
},
"id": "K0MMA"
}
{
"code": "NotFound",
"message": "Record not found."
}
{
"code": "MissingParameter",
"message": "missing documentNumber\n"
}
{
"code": "MissingParameter",
"message": "dateOfBirth format required: DD/MM/YYYY\n"
}
Featuresβ
- Foreigner ID Verification: Verify foreigner identity documents in Peru
- Immigration Status Check: Access current immigration status (e.g., HUMANITARIA)
- Nationality Information: Get nationality details of the foreign resident
- Document Validity: Check foreigner ID expiration and last issuance dates
- Residence Status: Verify residence expiration dates
- Personal Information: Access full name, first name, last name, and date of birth
- Document Number Validation: Verify foreigner document numbers
- Date Format Validation: Ensure proper date of birth format (DD/MM/YYYY)
- Multiple Programming Languages: Support for JavaScript, Python, PHP, and Swift
- Real-time Data: Access current and up-to-date foreigner information
- Comprehensive Error Handling: Detailed error responses for various scenarios
- Peruvian Immigration Integration: Direct access to official Peruvian immigration database
- Foreigner Document Management: Complete foreigner ID lifecycle tracking
- Residence Compliance: Monitor residence status and expiration dates