ํ๋ฃจ โ ์ฐจ๋ ์ ๋ณด
์๋ํฌ์ธํธโ
https://api.verifik.co/v2/pe/vehiculo/placa
ํ๋ฃจ ์ฐจ๋ ์ ๋ณด ์๋น์ค๋ ๋ฒํธํ์ ๊ธฐ๋ฐ์ผ๋ก ํ๋ฃจ์ ๋ฑ๋ก๋ ์ฐจ๋์ ์์ธ ๋ฐ์ดํฐ๋ฅผ ์ ๊ณตํฉ๋๋ค. ์๋ต์๋ ์ ์กฐ์ฌ, ๋ชจ๋ธ, ์ฐ์, ์์ง ๋ฐ ์ฐจ๋ ์ผ๋ จ๋ฒํธ, ์ ์, ์ฌ์ฉ ์ ํ ๋ฑ ์ฃผ์ ์ ๋ณด๊ฐ ํฌํจ๋ฉ๋๋ค.
ํค๋(Headers)โ
| ์ด๋ฆ | ๊ฐ |
|---|---|
| Content-Type | application/json |
| Authorization | Bearer <token> |
๋งค๊ฐ๋ณ์(Parameters)โ
| ์ด๋ฆ | ํ์ | ํ์ | ์ค๋ช |
|---|---|---|---|
plate | string | ์ | ์กฐํํ ๋ฒํธํ. ๊ณต๋ฐฑ์ด๋ ์ ์์ด ์ ๋ ฅํฉ๋๋ค. |
์์ฒญ(Request)โ
- JavaScript
- Python
- Swift
- PHP
import axios from 'axios';
const options = {
method: 'GET',
url: 'https://api.verifik.co/v2/pe/vehiculo/placa',
params: {plate: 'ABC123'},
headers: {
Accept: 'application/json',
Authorization: 'jwt <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/pe/vehiculo/placa?plate=", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
var request = URLRequest(url: URL(string: "https://api.verifik.co/v2/pe/vehiculo/placa?plate=")!,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/pe/vehiculo/placa?plate=');
$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
{
"data": {
"plate": "ABC123",
"use": "PARTICULAR",
"type": "AUTOMOVIL",
"brand": "NISSAN",
"model": "VERSA",
"year": "2014",
"engineSerial": "HR123456789J",
"chasisSerial": "1234567890",
"seats": "5",
"validFormat": true,
"serial": "1234567890"
},
"signature": {
"dateTime": "August 1, 2022 5:23 PM",
"message": "Certified by Verifik.co"
}
}
{
"code": "NotFound",
"message": "Record not found."
}
{
"code": "MissingParameter",
"message": "missing plate\n"
}
ํ์ฉ ์ฌ๋กโ
- ์ฐจ๋ ๊ฒ์ฆ: ํ๋ฃจ์ ๋ฑ๋ก๋ ์ฐจ๋์ ๊ธฐ๋ณธ ์ ๋ณด๋ฅผ ๊ฒ์ฆํฉ๋๋ค.
- ๋ณดํ ์๋น์ค: ๋ณดํ ์ ์ฐจ์ ํ์ํ ์ฐจ๋ ๋ฐ์ดํฐ๋ฅผ ๊ฒ์ฆํฉ๋๋ค.
- ๊ตํต ๊ธฐ๊ด: ๊ณต์ ์ฐจ๋ ์ ๋ณด๋ฅผ ์กฐํํฉ๋๋ค.
- ์ด์ ๊ธฐ์ : ์์ฉ ์ฐจ๋ ๋ฐ์ดํฐ๋ฅผ ๊ฒ์ฆํฉ๋๋ค.
- ์์ฐ ๊ฒ์ฆ: ์ฐจ๋์ ๊ธฐ์ ์ ์์ธ ์ ๋ณด๋ฅผ ํ์ธํฉ๋๋ค.
์ฃผ์ ๊ธฐ๋ฅโ
- โ ์ฐจ๋ ๋ฒํธํ์ผ๋ก ์กฐํ
- โ ์ข ํฉ ๊ธฐ์ ์ ๋ณด(์ ์กฐ์ฌ, ๋ชจ๋ธ, ์ฐ์)
- โ ์์ง ๋ฐ ์ฐจ๋ ์ผ๋ จ๋ฒํธ
- โ ์ ์ ์ ๋ณด
- โ ์ฐจ๋ ์ฌ์ฉ ์ ํ
- โ ๋ฒํธํ ํ์ ๊ฒ์ฆ
- โ Verifik.co๋ก ์ธ์ฆ๋ ์๋ต