์ฝ๋กฌ๋น์ ๊ฒฝ์ฐฐ ๋ฒ์ฃ ๊ฒฝ๋ ฅ ์กฐํ
API ๋ ํผ๋ฐ์คโ
์๋ํฌ์ธํธโ
https://api.verifik.co/v2/co/policia/consultar
์ฝ๋กฌ๋น์ ๊ฒฝ์ฐฐ ๋ฒ์ฃ ๊ฒฝ๋ ฅ ์กฐํ ์๋น์ค๋ ์ ๋ถ์ฆ ๋ฒํธ๋ฅผ ์ด์ฉํ์ฌ ์ฝ๋กฌ๋น์ ๋ด ๊ฐ์ธ์ ๋ฒ์ฃ ๊ฒฝ๋ ฅ์ ํ์ธํ ์ ์๋๋ก ํฉ๋๋ค. ์ฝ๋กฌ๋น์ ํ๋ฒ ์ 248์กฐ์ ๋ฐ๋ผ ์ฌ๋ฒ ๋น๊ตญ์ ๋ฏธํด๊ฒฐ ์ฌ์์ด ์๋์ง ์ ๊ฒํ๋ฉฐ, ์๋ต์๋ ๋์์์ ์ ์ฒด ์ฑ๋ช , ์ด๋ฆ, ์ฑ, ๊ทธ๋ฆฌ๊ณ ๋ฒ์ ์ ๋ถ์ ๋ํ ์ถ๊ฐ ์์ธ ์ ๋ณด๊ฐ ํฌํจ๋ฉ๋๋ค. ์ฑ์ฉ ๋๋ ์ค์ฌ ๋ชฉ์ ์ผ๋ก ๋ฐฐ๊ฒฝ ์กฐํ๋ฅผ ์ํํ๋ ๊ธฐ์ ๊ณผ ๊ธฐ๊ด์ ์ ํฉํ ์๋น์ค์ ๋๋ค.
ํค๋(Headers)โ
| ์ด๋ฆ | ๊ฐ |
|---|---|
| Content-Type | application/json |
| Authorization | Bearer <token> |
๋งค๊ฐ๋ณ์(Parameters)โ
info
์ง์๋๋ ๋ฌธ์ ์ข ๋ฅ์ ์ ์ฒด ๋ชฉ๋ก๊ณผ ๊ฐ ์ข ๋ฅ๋ณ ํ์ ๋งค๊ฐ๋ณ์๋ Document Types ๊ฐ์ด๋๋ฅผ ์ฐธ๊ณ ํด ์ฃผ์ธ์.
| ์ด๋ฆ | ํ์ | ํ์ | ์ค๋ช |
|---|---|---|---|
documentType | string | ์ | ๋ฌธ์ ์ข ๋ฅ. ํ์ฉ ๊ฐ: CC, CE. |
documentNumber | string | ์ | ์กฐํ ๋์์์ ๋ฌธ์ ๋ฒํธ. ๊ณต๋ฐฑ์ด๋ ์ ์์ด ์ ๋ ฅํฉ๋๋ค. |
์์ฒญ(Request)โ
- JavaScript
- Python
- Swift
- PHP
import axios from "axios";
const options = {
method: "GET",
url: "https://api.verifik.co/v2/co/policia/consultar",
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/policia/consultar?documentType=CC&documentNumber=123456789", 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/policia/consultar?documentType=CC&documentNumber=123456789")!,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/policia/consultar?documentType=CC&documentNumber=123456789');
$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
- 404
- 409 (๋งค๊ฐ๋ณ์ ๋๋ฝ)
- 409 (์๋ชป๋ ๋ฌธ์ ์ข ๋ฅ)
{
"data": {
"documentType": "CCAR",
"documentNumber": "123456789",
"fullName": "MATEO VERIFIK",
"firstName": "MATEO",
"lastName": "VERIFIK",
"arrayName": [
"MATEO",
"VERIFIK"
],
"details": "NO TIENE ASUNTOS PENDIENTES CON LAS AUTORIDADES JUDICIALES\\nde conformidad con lo establecido en el artรญculo 248 de la Constituciรณn Polรญtica de Colombia. \\n\\nEn cumplimiento de la Sentencia SU-458 del 21 de junio de 2012, proferida por la Honorable Corte Constitucional, la leyenda \"NO TIENE ASUNTOS PENDIENTES CON LAS AUTORIDADES JUDICIALES\" aplica para todas aquellas personas que no registran antecedentes y para quienes la autoridad judicial competente haya decretado la extinciรณn de la condena o la prescripciรณn de la pena. "
},
"signature": {
"dateTime": "March 13, 2024 10:48 PM",
"message": "Certified by Verifik.co"
},
"id": "7QS69"
}
{
"code": "NotFound",
"message": "Record not found."
}
{
"code": "MissingParameter",
"message": "missing documentType\n. missing documentNumber\n"
}
{
"code": "MissingParameter",
"message": "documentType must be one of: [CC,CE]"
}