์ฝ๋กฌ๋น์ ๊ฒ์ฐฐ์ด์ฅ ์ง๊ณ ๊ธฐ๋ก
API ๋ ํผ๋ฐ์คโ
์๋ํฌ์ธํธโ
https://api.verifik.co/v2/co/procuraduria/antecedentes
๋ณธ ์๋น์ค๋ ์ฝ๋กฌ๋น์ ๊ฒ์ฐฐ์ด์ฅ(Procuradurรญa)์ ๋ฑ๋ก๋ ๊ฐ์ธ์ ์ง๊ณ ๊ธฐ๋ก์ ์กฐํํฉ๋๋ค. ๋ฌธ์ ์ข ๋ฅ์ ๋ฒํธ๋ฅผ ์ ๋ ฅํ๋ฉด ๋์์์ ์ด๋ฆ๊ณผ ์ง๊ณ ๊ธฐ๋ก ๋ณด์ ์ฌ๋ถ๋ฅผ ํ์ธํ ์ ์์ผ๋ฉฐ, ์๋ต์๋ ์ ์ฌ(sanciones), ์ฌ๊ธ(instancias), ๋ฒ์ฃ(delitos), ์๊ฒฉ ๊ฒฐ๊ฒฉ(inhabilidades)์ ๋ํ ์์ธ ์ ๋ณด๊ฐ ํฌํจ๋ฉ๋๋ค.
ํค๋(Headers)โ
| ์ด๋ฆ | ๊ฐ |
|---|---|
| Content-Type | application/json |
| Authorization | Bearer <token> |
๋งค๊ฐ๋ณ์(Parameters)โ
info
์ง์๋๋ ๋ฌธ์ ์ข ๋ฅ์ ์ ์ฒด ๋ชฉ๋ก๊ณผ ๊ฐ ์ข ๋ฅ๋ณ ํ์ ๋งค๊ฐ๋ณ์๋ Document Types ๊ฐ์ด๋๋ฅผ ์ฐธ๊ณ ํด ์ฃผ์ธ์.
| ์ด๋ฆ | ํ์ | ํ์ | ์ค๋ช |
|---|---|---|---|
documentType | string | ์ | ๋ฌธ์ ์ข ๋ฅ. ํ์ฉ ๊ฐ: CC, PEP, CE. |
documentNumber | string | ์ | ์กฐํ ๋์์์ ๋ฌธ์ ๋ฒํธ. ๊ณต๋ฐฑ์ด๋ ์ ์์ด ์ ๋ ฅํฉ๋๋ค. |
์์ฒญ(Request)โ
- JavaScript
- Python
- Swift
- PHP
import axios from 'axios';
const options = {
method: 'GET',
url: 'https://api.verifik.co/v2/co/procuraduria/antecedentes',
params: {documentType: 'CC', documentNumber: '123456789'},
headers: {
Accept: 'application/json',
Authorization: 'Bearer <your_token>'
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
import http.client
conn = http.client.HTTPSConnection("api.verifik.co")
payload = ''
headers = {}
conn.request("GET", "/v2/co/procuraduria/antecedentes?documentType=CC&documentNumber=", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
var request = URLRequest(url: URL(string: "https://api.verifik.co/v2/co/procuraduria/antecedentes?documentType=CC&documentNumber=")!,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()
<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://api.verifik.co/v2/co/procuraduria/antecedentes?documentType=CC&documentNumber=');
$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();
}
์๋ต(Response)โ
- 200 (๊ธฐ๋ก ์์)
- 200 (๊ธฐ๋ก ์์)
- 404
- 409 (๋งค๊ฐ๋ณ์ ๋๋ฝ)
- 409 (์๋ฒ ์ค๋ฅ)
{
"data": {
"documentType": "CC",
"documentNumber": "19592793",
"citizen": "JAIMER MARABITH PEREZ PEREZ",
"hasRecord": true,
"isRequired": false,
"legend": "Consulta en lรญnea de Antecedentes Disiplinarios, La Procuraduria General de la Nacion certifica Que siendo las 9:46:41 PM horas del 2/8/2022 el Seรฑor(a) JAIMER MARABITH PEREZ PEREZ identificado(a) con Cรฉdula de ciudadanรญa Nรบmero 19592793 El ciudadano si presenta antecedentes.",
"antecedentes": [
{
"sanciones": [
{
"Sancion": "PRISION",
"Termino": "78 MESES",
"Clase": "PRINCIPAL",
"Suspendida": ""
},
{
"Sancion": "INHABILIDAD PARA EL EJERCICIO DE DERECHOS Y FUNCIONES PUBLICAS",
"Termino": "78 MESES",
"Clase": "ACCESORIA",
"Suspendida": ""
}
],
"instancias": [
{
"Nombre": "PRIMERA",
"Autoridad": "JUZGADO 2 PENAL DEL CIRCUITO ESPECIALIZADO DE DESCONGESTION - SANTA MARTA (MAGDALENA)",
"Fecha providencia": "30/06/2015",
"fecha efecto Juridicos": "13/06/2016"
}
],
"delitos": [
{
"Descripcion del Delito": "HOMICIDIO (LEY 599 DE 2000)"
}
],
"inhabilidades": [
{
"Mรณdulo": "PENAL",
"Inhabilidad legal": "INHABILIDAD PARA DESEMPEรAR CARGOS PรBLICO LEY 734 ART 38 NUM 1",
"Fecha de inicio": "13/06/2016",
"Fecha fin": "12/06/2026"
}
]
}
]
},
"signature": {
"dateTime": "August 2, 2022 4:46 PM",
"message": "Certified by Verifik.co"
}
}
{
"data": {
"documentType": "CC",
"documentNumber": "123456789",
"fullName": "MATEO VERIFIK",
"firstName": "MATEO",
"lastName": "VERIFIK",
"arrayName": [
"MATEO",
"VERIFIK"
],
"antecedentes": [],
"isRequired": false,
"legend": "Consulta en lรญnea de Antecedentes Disiplinarios, La Procuraduria General de la Nacion certifica Que siendo las 15 horas del 31/08/2022 el Seรฑor(a) NICOLAS HERNANDEZ TOVAR identificado(a) con Cรฉdula de ciudadanรญa Nรบmero 1023942104 El ciudadano no presenta antecedentes.",
"expeditionDate": "Esta informaciรณn ha sido catalogada como semi privada y no estรก disponible para su entrega de forma temporal. - RNEC 2686",
"expeditionPlace": "Esta informaciรณn ha sido catalogada como semi privada y no estรก disponible para su entrega de forma temporal. - RNEC 2686",
"dateOfBirth": "Esta informaciรณn ha sido catalogada como semi privada y no estรก disponible para su entrega de forma temporal. - RNEC 2686"
},
"signature": {
"dateTime": "August 31, 2022 3:53 PM",
"message": "Certified by Verifik.co"
}
}
{
"code": "NotFound",
"message": "Record not found."
}
{
"code": "MissingParameter",
"message": "missing documentType\n. missing documentNumber\n"
}
{
"code": "Conflict",
"message": "Server_Not_Response_From_Procuraduria"
}