Skip to content

🇵🇪 Overview

In this section, you will find information on the input data required for the profile of a person in Peru, the reports available, the report settings and how to perform queries to create a person, get a person’s status and its reports details.

Input fieldDescriptionExample
document_idThe Document ID Number for Peru (check document_id_type field below).123456789
document_id_typeAccepted values are national_id for the Documento Nacional de Identidad (DNI) or Tarjeta de Identidad and foreigner_card for Carne de Extranjería, Carne de Solicitante or Permiso Temporal de Permanencia. The option found is returned in the details as document_id_type_name. Defaults to national_id.national_id
city_locodeThe UN LOCODE of the city where the person is located (or another city according to your needs to direct the BGC process). Always required.PE LIM
dobISO 8601 representation of the date the person was born.1990-05-03
full_nameFull Name of the person to be checked. Required for most_wanted, police_arrest, boletin_judicial and sanctions reports.JUAN MIGUEL DOE
labor_certificate_idNumber of the Labor Certificate (Número del Certificado Único Laboral). Required only for labor_certificate report.0123456789123
labor_certificate_typeType of Labor Certificate. Accepted values are certiadulto and certijoven. Required only for labor_certificate report.certiadulto
rucThe RUC (Registro Único de Contribuyentes) for the company requesting the Labor Certificate information. Required only for labor_certificate report.9999999999
ptpFor the foreigner_card_status report, it indicates if the input value is a Pemiso Temporal de Permanencia. Either True or False. Required only for foreigner_card_status report.False
request_codeThe request code for a Criminal Records Certificate (Código de Consulta del Certificado de Antecedentes Penales). Required only for justice_certificate report.VOED83219812K
Report nameDescriptionSource/database
dni_statusValidates a DNI (Documento Nacional de Identidad) and retrieves personal data associated to it.Registro Nacional de Identificación y Estado Civil (RENIEC)
foreigner_card_statusValidates a foreigner_card (Carne de Extranjería or Permiso Temporal de Permanencia) and retrieves personal data associated to it.Superintendencia Nacional de Migraciones del Perú
license_statusChecks a Driver’s License status and retrieves the data associated to it.Ministerio de Transporte y Comunicaciones
drunk_drivingChecks a person’s driving history for drunk driving occurrences.Ministerio de Transporte y Comunicaciones
dangerous_driverChecks a person’s driving history for dangerous driving occurrences.Ministerio de Transporte y Comunicaciones
labor_certificateGiven a DNI and a certificate number only, it retrieves all the data from the certificate (address, criminal records, labor and education history, etc) and builds decision making over the data found.Ministerio de Trabajo y Promoción del Empleo
justice_certificateGiven a request_code from a certificate previously issued, it retrieves the data from the certificate.Poder Judicial del Perú
most_wantedChecks for occurences in the most wanted database of the Peruvian government.Programa de Recompensas - Ministerio del Interior del Perú
police_arrestChecks database with police reports of arrests for matches to the person’s data.Police Arrests Database (internal)
boletin_judicialChecks court journals (Boletin Judicial) from Peru Justice System (Poder Judicial del Perú).Poder Judicial del Perú
sanctionsChecks sanctions reports from UN, OFAC, EEAS and World Bank.UN, OFAC, EEAS, and World Bank.

To create a person, copy and paste the following command or code, replacing the dummy data with the person’s data you want to use and the YOUR_API_KEY string with your API Key, respectively:

Terminal window
curl --request POST \
--url https://api.emptor.io/v3/pe/persons/ \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: YOUR_API_KEY' \
--data '{"reports":{"dni_status":"enabled","license_status":"enabled","drunk_driving":"enabled","dangerous_driver":"enabled","labor_certificate":"enabled","justice_certificate":"enabled","most_wanted":"enabled","police_arrest":"enabled","boletin_judicial":"enabled","sanctions":"enabled"},"city_locode":"PE LIM","document_id":"123456789","document_id_type":"national_id","dob":"1990-05-03","full_name":"JUAN MIGUEL DOE","labor_certificate_id":"0123456789123","labor_certificate_type":"certiadulto","request_code":"VOED83219812K","ruc":"9999999999"}'
const fetch = require('node-fetch');
let url = 'https://api.emptor.io/v3/pe/persons/';
let options = {
method: 'POST',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
'X-Api-Key': 'YOUR_API_KEY'
},
body: JSON.stringify({
reports: {
dni_status: 'enabled',
license_status: 'enabled',
drunk_driving: 'enabled',
dangerous_driver: 'enabled',
labor_certificate: 'enabled',
justice_certificate: 'enabled',
most_wanted: 'enabled',
police_arrest: 'enabled',
boletin_judicial: 'enabled',
sanctions: 'enabled'
},
city_locode: 'PE LIM',
document_id: '123456789',
document_id_type: 'national_id',
dob: '1990-05-03',
full_name: 'JUAN MIGUEL DOE',
labor_certificate_id: '0123456789123',
labor_certificate_type: 'certiadulto',
request_code: 'VOED83219812K',
ruc: '9999999999'
})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error('error:' + err));
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://api.emptor.io/v3/pe/persons/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["Accept"] = 'application/json'
request["Content-Type"] = 'application/json'
request["X-Api-Key"] = 'YOUR_API_KEY'
request.body = "{\"reports\":{\"dni_status\":\"enabled\",\"license_status\":\"enabled\",\"drunk_driving\":\"enabled\",\"dangerous_driver\":\"enabled\",\"labor_certificate\":\"enabled\",\"justice_certificate\":\"enabled\",\"most_wanted\":\"enabled\",\"police_arrest\":\"enabled\",\"boletin_judicial\":\"enabled\",\"sanctions\":\"enabled\"},\"city_locode\":\"PE LIM\",\"document_id\":\"123456789\",\"document_id_type\":\"national_id\",\"dob\":\"1990-05-03\",\"full_name\":\"JUAN MIGUEL DOE\",\"labor_certificate_id\":\"0123456789123\",\"labor_certificate_type\":\"certiadulto\",\"request_code\":\"VOED83219812K\",\"ruc\":\"9999999999\"}"
response = http.request(request)
puts response.read_body
import requests
url = "https://api.emptor.io/v3/pe/persons/"
payload = {
"reports": {
"dni_status": "enabled",
"license_status": "enabled",
"drunk_driving": "enabled",
"dangerous_driver": "enabled",
"labor_certificate": "enabled",
"justice_certificate": "enabled",
"most_wanted": "enabled",
"police_arrest": "enabled",
"boletin_judicial": "enabled",
"sanctions": "enabled"
},
"city_locode": "PE LIM",
"document_id": "123456789",
"document_id_type": "national_id",
"dob": "1990-05-03",
"full_name": "JUAN MIGUEL DOE",
"labor_certificate_id": "0123456789123",
"labor_certificate_type": "certiadulto",
"request_code": "VOED83219812K",
"ruc": "9999999999"
}
headers = {
"Accept": "application/json",
"Content-Type": "application/json",
"X-Api-Key": "YOUR_API_KEY"
}
response = requests.request("POST", url, json=payload, headers=headers)
print(response.text)

To get a person’s status, you will need the person_id returned by our API in the Create a Person step. Use that with your API Key inside the following command or code (in the example below, the person_id is 0597f9f8-2ea5-4557-b3a1-5a590ed96ef4):

Terminal window
curl --request GET \
--url https://api.emptor.io/v3/pe/persons/0597f9f8-2ea5-4557-b3a1-5a590ed96ef4/status \
--header 'Accept: application/json' \
--header 'X-Api-Key: YOUR_API_KEY'
const fetch = require('node-fetch');
let url = 'https://api.emptor.io/v3/pe/persons/0597f9f8-2ea5-4557-b3a1-5a590ed96ef4/status';
let options = {
method: 'GET',
headers: {Accept: 'application/json', 'X-Api-Key': 'YOUR_API_KEY'}
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error('error:' + err));
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://api.emptor.io/v3/pe/persons/0597f9f8-2ea5-4557-b3a1-5a590ed96ef4/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["X-Api-Key"] = 'YOUR_API_KEY'
response = http.request(request)
puts response.read_body
import requests
url = "https://api.emptor.io/v3/pe/persons/0597f9f8-2ea5-4557-b3a1-5a590ed96ef4/status"
headers = {
"Accept": "application/json",
"X-Api-Key": "YOUR_API_KEY"
}
response = requests.request("GET", url, headers=headers)
print(response.text)

To get the details for the person’s reports, you will need the person_id returned in the Create a Person step. Use that with your API Key inside the following command or code (in the example below, the person_id is 0597f9f8-2ea5-4557-b3a1-5a590ed96ef4):

Terminal window
curl --request GET \
--url https://api.emptor.io/v3/pe/details/0597f9f8-2ea5-4557-b3a1-5a590ed96ef4 \
--header 'Accept: application/json' \
--header 'X-Api-Key: YOUR_API_KEY'
const fetch = require('node-fetch');
let url = 'https://api.emptor.io/v3/pe/details/0597f9f8-2ea5-4557-b3a1-5a590ed96ef4';
let options = {
method: 'GET',
headers: {Accept: 'application/json', 'X-Api-Key': 'YOUR_API_KEY'}
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error('error:' + err));
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://api.emptor.io/v3/pe/details/0597f9f8-2ea5-4557-b3a1-5a590ed96ef4")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["X-Api-Key"] = 'YOUR_API_KEY'
response = http.request(request)
puts response.read_body
import requests
url = "https://api.emptor.io/v3/pe/details/0597f9f8-2ea5-4557-b3a1-5a590ed96ef4"
headers = {
"Accept": "application/json",
"X-Api-Key": "YOUR_API_KEY"
}
response = requests.request("GET", url, headers=headers)
print(response.text)