๐ง๐ด ๋ณผ๋ฆฌ๋น์ โ ์ฐจ๋ ์ ๋ณด
๋ณธ ์๋น์ค๋ ๋ฒํธํ์ผ๋ก ๋ณผ๋ฆฌ๋น์์ ๋ฑ๋ก๋ ์ฐจ๋์ ์์ธ ์ ๋ณด๋ฅผ ์กฐํํฉ๋๋ค. ๋ณดํ ์ฆ๊ถ ๋ฒํธ, ๋ธ๋๋, ๋ฑ๊ธ(์: ์ ๋ฌด์ฉ ์คํ ๋ฐ์ด), ๋ฑ๋ก์ง, ์๋น์ค ์ ํ(์: ์๊ฐ์ฉ), ๋ชจ๋ธ ๋ฑ์ ๋ฐํํฉ๋๋ค.
์๋ํฌ์ธํธโ
GET https://api.verifik.co/v2/bo/vehicle
๋ฒํธํ(plate)์ผ๋ก ๋ณผ๋ฆฌ๋น์ ์ฐจ๋์ ์กฐํํฉ๋๋ค. ์ฐจ๋ ์์ธยท๋ฑ๋ก ์ ๋ณด ๋ฑ์ ๋ฐํํ์ฌ ์ฐจ๋ ๊ฒ์ฆ ๋ฐ ์ปดํ๋ผ์ด์ธ์ค์ ํ์ฉํ ์ ์์ต๋๋ค.
ํค๋โ
| ์ด๋ฆ | ๊ฐ |
|---|---|
| Content-Type | application/json |
| Authorization | Bearer <token> |
๋งค๊ฐ๋ณ์โ
| ์ด๋ฆ | ํ์ | ํ์ | ์ค๋ช | ์ |
|---|---|---|---|---|
plate | string | ์ | ์กฐํํ ์ฐจ๋ ๋ฒํธํ. | ABC1234 |
์์ฒญโ
- JavaScript
- Python
- PHP
- Swift
import axios from 'axios';
const options = {
method: 'GET',
url: 'https://api.verifik.co/v2/bo/vehicle',
params: {
plate: 'ABC1234'
},
headers: {
'Accept': 'application/json',
'Authorization': 'Bearer <tu_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/bo/vehicle?plate=ABC1234", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://api.verifik.co/v2/bo/vehicle?plate=ABC1234');
$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();
}
?>
var request = URLRequest(url: URL(string: "https://api.verifik.co/v2/bo/vehicle?plate=ABC1234")!,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()
์๋ตโ
- 200
- 404
- 409
- 500
{
"data": {
"Policy": "180680443",
"brand": "BAJAJ",
"clase": "MOTOCICLETA - TRABAJO",
"declaratory": "GRAL. SAAVEDRA",
"plate": "1234ZYL",
"service": "PARTICULAR",
"type": "BOXER 150"
},
"signature": {
"dateTime": "July 26, 2024 4:55 PM",
"message": "Certified by Verifik.co"
},
"id": "ZX35K"
}
{
"code": "NotFound",
"message": "Record not found."
}
{
"code": "MissingParameter",
"message": "missing plate\n"
}
{
"code": "InternalServerError",
"message": "Server error."
}
๊ธฐ๋ฅโ
- ์ฐจ๋ ์ ๋ณด ์กฐํ: ๋ณผ๋ฆฌ๋น์ ์ฐจ๋ ๋ฑ๋ก๋ถ์์ ์์ธ ์ ๋ณด๋ฅผ ๊ฐ์ ธ์ต๋๋ค.
- ๋ฒํธํ ๊ฒ์ฆ: ๊ตญ๋ด ๋ฑ๋ก ๋ฒํธํ์ ์กฐํํฉ๋๋ค.
- ๋ณดํ ์ ๋ณด: ์ฐจ๋ ๋ณดํ ์ฆ๊ถ ๋ฒํธ๋ฅผ ์กฐํํฉ๋๋ค.
- ์ฐจ๋ ๋ถ๋ฅ: ๋ฑ๊ธ(์: ์ ๋ฌด์ฉ ์คํ ๋ฐ์ด) ๋ฑ ์์ธ ์ ๋ณด๋ฅผ ์ ๊ณตํฉ๋๋ค.
- ๋ฑ๋ก์ง: ๋ฑ๋ก ๊ดํ ์ ๋ณด์ ์ ๊ทผํฉ๋๋ค.
- ์๋น์ค ์ ํ: ์๊ฐ์ฉยท์์ ์ฉ ๋ฑ ๊ตฌ๋ถ์ ํ์ธํฉ๋๋ค.
- ๋ธ๋๋ยท๋ชจ๋ธ: ์ ์กฐ์ฌ ๋ฐ ๋ชจ๋ธ ์ ๋ณด๋ฅผ ์กฐํํฉ๋๋ค.
- ๋ค๊ตญ์ด ์ํ: JavaScript, Python, PHP, Swift ์์ ์ ๊ณต
- ์ค์๊ฐ ๋ฐ์ดํฐ: ์ต์ ์ฐจ๋ ์ ๋ณด์ ์ ๊ทผํฉ๋๋ค.
- ์ค๋ฅ ์ฒ๋ฆฌ: ๋ค์ํ ์๋๋ฆฌ์ค์ ๋ํ ์ค๋ฅ ์๋ต์ ๋ฐํํฉ๋๋ค.