๐จ๐ฑ Overview
In this section, you will find information on the input data required for the profile of a person in Chile, the reports available, the report settings and how to perform queries to create a person, get a personโs status and its reports details.
Profile
Section titled โProfileโInput field | Description | Example |
---|---|---|
document_id | Document ID Number for Chile. Rol รnico Nacional - RUN | 0000000-0 |
document_id_type | Document ID (RUN) type. Can be national_id (Cรฉdula de Identidad Chilena) or foreigner_card (Cรฉdula de Identidad a Extranjeros) | national_id |
full_name | Full name of the person being checked. Required for criminal report when document_id_type is foreigner_card. | JUAN DOE |
city_locode | The UN LOCODE of the city where the person is located (or another city according to your needs to direct the BGC process). Always required. | CL SCL |
certificate_id | Certificate code used for validation of manually issued justice records certificates. | 0000000000U00 |
certificate_verification | Certificate verification code. | 000U000 |
Available reports
Section titled โAvailable reportsโReport name | Description | Source/database |
---|---|---|
run_status | Checks RUN (document_id) status. | Servicio de Registro Civil e Identificaciรณn |
license_status | Checks Driverโs License status. | Servicio de Registro Civil e Identificaciรณn |
criminal | Checks courts for criminal records. | Poder Judicial Republica de Chile |
justice_certificate | Retrieves and checks Justice Certificate. | Servicio de Registro Civil e Identificaciรณn |
Example requests
Section titled โExample requestsโCreate a Person
Section titled โCreate a Personโ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:
curl --request POST \ --url https://api.emptor.io/v3/cl/persons/ \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'X-Api-Key: YOUR_API_KEY' \ --data '{"reports":{"run_status":"enabled","license_status":"enabled","criminal":"enabled","justice_certificate":"enabled"},"city_locode":"CL SCL","document_id":"0000000-0","certificate_id":"0000000000U00","certificate_verification":"000U000"}'
const fetch = require('node-fetch');
let url = 'https://api.emptor.io/v3/cl/persons/';
let options = { method: 'POST', headers: { Accept: 'application/json', 'Content-Type': 'application/json', 'X-Api-Key': 'YOUR_API_KEY' }, body: JSON.stringify({ reports: { run_status: 'enabled', license_status: 'enabled', criminal: 'enabled', justice_certificate: 'enabled' }, city_locode: 'CL SCL', document_id: '0000000-0', certificate_id: '0000000000U00', certificate_verification: '000U000' })};
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/cl/persons/")
http = Net::HTTP.new(url.host, url.port)http.use_ssl = truehttp.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\":{\"run_status\":\"enabled\",\"license_status\":\"enabled\",\"criminal\":\"enabled\",\"justice_certificate\":\"enabled\"},\"city_locode\":\"CL SCL\",\"document_id\":\"0000000-0\",\"certificate_id\":\"0000000000U00\",\"certificate_verification\":\"000U000\"}"
response = http.request(request)puts response.read_body
import requests
url = "https://api.emptor.io/v3/cl/persons/"
payload = { "reports": { "run_status": "enabled", "license_status": "enabled", "criminal": "enabled", "justice_certificate": "enabled" }, "city_locode": "CL SCL", "document_id": "0000000-0", "certificate_id": "0000000000U00", "certificate_verification": "000U000"}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)
Get personโs status
Section titled โGet personโs statusโ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
):
curl --request GET \ --url https://api.emptor.io/v3/cl/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/cl/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/cl/persons/0597f9f8-2ea5-4557-b3a1-5a590ed96ef4/status")
http = Net::HTTP.new(url.host, url.port)http.use_ssl = truehttp.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/cl/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)
Get reports details
Section titled โGet reports detailsโ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
):
curl --request GET \ --url https://api.emptor.io/v3/cl/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/cl/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/cl/details/0597f9f8-2ea5-4557-b3a1-5a590ed96ef4")
http = Net::HTTP.new(url.host, url.port)http.use_ssl = truehttp.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/cl/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)