๊ฒฝ์ฐฐ ์์ ์กฐ์น ์ดํ ํ์ธ
API ๋ ํผ๋ฐ์คโ
์๋ํฌ์ธํธโ
https://api.verifik.co/v2/co/policia/rnmc
๊ฒฝ์ฐฐ RNMC ์๋น์ค๋ ๊ฐ์ธ์ด ๋ฏธ์ดํ ์ํ์ ์์ ์กฐ์น๋ฅผ ๋ณด์ ํ๊ณ ์๋์ง ๊ฒ์ฆํฉ๋๋ค. ๋์์์ ์ด๋ฆ, ๋ฌธ์ ์ข ๋ฅ, ๋ฌธ์ ๋ฒํธ, ๊ฒ์ฆ ๊ธฐ์ค์ผ์ ์ ๋ ฅํ๋ฉด ๋ฏธ์ดํ ์ํ์ธ ์์ ์กฐ์น์ ์์ธ ์ ๋ณด๋ฅผ ์กฐํํ ์ ์์ต๋๋ค.
๋ณธ ์๋น์ค๋ ์์ ์กฐ์น ์ดํ ์ฌ๋ถ ํ์ธ์ ์ง์ํ๋ฉฐ, ์ดํ ์ํ์ ๊ธฐ๋ฐํ ํฉ๋ฆฌ์ ์์ฌ๊ฒฐ์ ์ ๊ฐ๋ฅํ๊ฒ ํฉ๋๋ค.
ํค๋(Headers)โ
| ์ด๋ฆ | ๊ฐ |
|---|---|
| Content-Type | application/json |
| Authorization | Bearer <token> |
๋งค๊ฐ๋ณ์(Parameters)โ
info
์ง์๋๋ ๋ฌธ์ ์ข ๋ฅ์ ์ ์ฒด ๋ชฉ๋ก๊ณผ ๊ฐ ์ข ๋ฅ๋ณ ํ์ ๋งค๊ฐ๋ณ์๋ Document Types ๊ฐ์ด๋๋ฅผ ์ฐธ๊ณ ํด ์ฃผ์ธ์.
| ์ด๋ฆ | ํ์ | ํ์ | ์ค๋ช |
|---|---|---|---|
documentType | string | ์ | ๋ฌธ์ ์ข ๋ฅ. ํ์ฉ ๊ฐ: CC, CE. |
documentNumber | string | ์ | ์กฐํ ๋์์์ ๋ฌธ์ ๋ฒํธ. ๊ณต๋ฐฑ์ด๋ ์ ์์ด ์ ๋ ฅํฉ๋๋ค. |
date | string | ์ | ๋ฌธ์ ๋ฐ๊ธ์ผ. ํ์: DD/MM/YYYY. |
์์ฒญ(Request)โ
- JavaScript
- Python
- Swift
- PHP
import axios from 'axios';
const options = {
method: 'GET',
url: 'https://api.verifik.co/v2/co/policia/rnmc',
params: {
documentType: 'CC',
documentNumber: '123456789',
date: '10/10/2020'
},
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/rnmc?documentType=CC&documentNumber=&date=", 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/rnmc?documentType=CC&documentNumber=&date=")!,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/rnmc?documentType=CC&documentNumber=&date=');
$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": {
"arrayName": [
"MATEO",
"VERIFIK"
],
"correctiveMeasures": [
{
"attribution": "INSPECTOR DE POLICรA",
"address": "KR 12 26 25",
"status": "IMPONER O RATIFICAR MEDIDA",
"measure": "Multa General Tipo 2",
"referredTo": "INSPECCION PERMANENTE TURNO 3"
}
],
"date": "22/07/2005",
"documentNumber": "123456789",
"documentType": "CC",
"firstName": "MATEO",
"fullName": "MATEO VERIFIK",
"lastName": "VERIFIK",
"records": [
{
"date": "16/12/2023 01:46:37 p. m.",
"department": "CALDAS",
"file": "17-001-6-2023-20697",
"format": "002",
"identification": "123456789",
"municipality": "MANIZALES",
"offender": "MATEO VERIFIK"
}
]
},
"signature": {
"dateTime": "April 18, 2024 6:33 PM",
"message": "Certified by Verifik.co"
},
"id": "12NC7"
}
{
"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]"
}