FBI ๋ฐฐ๊ฒฝ ์กฐํ
API ๋ ํผ๋ฐ์คโ
์๋ํฌ์ธํธโ
https://api.verifik.co/v2/fbi
documentType๊ณผ documentNumber, ๋๋ fullName์ ์ฌ์ฉํด FBI๊ฐ ๊ณต๊ฐํ ๊ธฐ๋ก์ ์กฐํํฉ๋๋ค. ์ผ์นํ๋ ํญ๋ชฉ์ด ์์ ๊ฒฝ์ฐ ์๋ต์๋ ์ ์ ํ๋์ ๋์์์ ๋ํ ๊ณต๊ฐ FBI URL์ด ํฌํจ๋ ์ ์์ต๋๋ค.
์ฐธ๊ณ : ๋ ์ง(์ถ์์ผ ๋๋ ๋ฐ๊ธ์ผ)๋ dd/mm/yyyy ํ์์ด์ด์ผ ํฉ๋๋ค.
ํค๋(Headers)โ
| ์ด๋ฆ | ๊ฐ |
|---|---|
| Content-Type | application/json |
| Authorization | Bearer <token> |
๋งค๊ฐ๋ณ์(Parameters)โ
info
์ง์๋๋ ๋ฌธ์ ์ข ๋ฅ์ ์ ์ฒด ๋ชฉ๋ก๊ณผ ๊ฐ ์ข ๋ฅ๋ณ ํ์ ๋งค๊ฐ๋ณ์๋ Document Types ๊ฐ์ด๋๋ฅผ ์ฐธ๊ณ ํด ์ฃผ์ธ์.
| ์ด๋ฆ | ํ์ | ํ์ | ์ค๋ช |
|---|---|---|---|
documentType | string | ์๋์ค | ์กฐํํ ๋ฌธ์ ์ข ๋ฅ. |
documentNumber | string | ์๋์ค | ์กฐํํ ๋ฌธ์ ๋ฒํธ. ๊ณต๋ฐฑ์ด๋ ์ ์์ด ์ ๋ ฅํฉ๋๋ค. |
fullName | string | ์๋์ค | documentType๊ณผ documentNumber ๋์ ๊ฐ์ธ ๋๋ ๋ฒ์ธ์ ์ด๋ฆ์ ์ง์ ์ ๋ฌํ ์ ์์ต๋๋ค. |
ํ์ฉ ์ฌ๋กโ
- ์ ์ ๊ฒ์ฆ: FBI๊ฐ ๊ณต๊ฐํ ์ ๋ณด๋ฅผ ๊ธฐ์ค์ผ๋ก ๋ฌธ์๋ฅผ ๊ฒ์ฆํฉ๋๋ค.
- ์ปดํ๋ผ์ด์ธ์ค: ๋ฏผ๊ฐํ ์ง์ ๋๋ ๊ฑฐ๋์ ๋ํ ๊ฒ์ฆ์ ์ง์ํฉ๋๋ค.
- ์ฌ๊ธฐ ์๋ฐฉ: ๊ด๊ณ ํ์ฑ ์ ์ ์ ์์ ํ์ธํฉ๋๋ค.
์์ฒญ(Request)โ
- JavaScript
- Python
- Swift
- PHP
import axios from "axios";
const options = {
method: "GET",
url: "https://api.verifik.co/v2/fbi",
params: { documentType: "CC", documentNumber: "80251972" },
headers: {
Accept: "application/json",
Authorization: "jwt <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/fbi?fullName=", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
var request = URLRequest(url: URL(string: "https://api.verifik.co/v2/fbi?fullName=")!,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/fbi?fullName=');
$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": {
"documentType": "CC",
"documentNumber": "80251972",
"fullName": "WILVER VILLEGAS PALOMINO",
"firstName": "WILVER",
"lastName": "VILLEGAS PALOMINO",
"arrayName": ["WILVER", "VILLEGAS", "PALOMINO"],
"foundInFBI": true,
"urlFBI": "https://www.fbi.gov/wanted/cei/wilver-villegas-palomino-"
},
"signature": {
"dateTime": "June 28, 2022 12:36 PM",
"message": "Certified by Verifik.co"
}
}
{
"code": "NotFound",
"message": "Record not found."
}
{
"code": "MissingParameter",
"message": "missing documentType\n. missing documentNumber\n"
}
๋น๊ณ โ
- ๊ณต๊ฐ FBI ํ์ด์ง๊ฐ ์ ์ฉ๋๋ ๊ฒฝ์ฐ
foundInFBI์ ํจ๊ป ์ ํ์ ์ผ๋กurlFBI๊ฐ ๋ฐํ๋ฉ๋๋ค.