๐ง๐ท ๋ธ๋ผ์ง
API ๋ ํผ๋ฐ์คโ
์๋ํฌ์ธํธโ
https://api.verifik.co/v2/br/background-check
๋ธ๋ผ์ง ๊ฐ์ธ ๋ฐฐ๊ฒฝ ์กฐํ๋ฅผ CPF์ ์ถ์์ผ๋ก ์ํํฉ๋๋ค. ์ ์ ์๋ต์๋ ์ ์ ๊ด๋ จ ํ๋๊ฐ ํฌํจ๋๋ฉฐ, ๋ฐ์ดํฐ ์ ๊ณต์๊ฐ ์ ๊ณตํ ๊ฒฝ์ฐ base64๋ก ์ธ์ฝ๋ฉ๋ PDF ๋ณด๊ณ ์๊ฐ ํจ๊ป ๋ฐํ๋ฉ๋๋ค. ์ฑ์ฉ ๊ฒ์ฆ, ์ค์ฌ, ์ปดํ๋ผ์ด์ธ์ค ๋ชฉ์ ์ ์ ํฉํฉ๋๋ค. PDF์ ๋ฉํ๋ฐ์ดํฐ์ ์ฒ๋ฆฌ ๋ฐ ๋ณด์กด ์ ์ฑ ์ ์์ฒด ๋ฒ์ ๊ธฐ์ค์ ๋ฐ๋ผ ๊ด๋ฆฌํ์๊ธฐ ๋ฐ๋๋๋ค.
ํค๋(Headers)โ
| ์ด๋ฆ | ๊ฐ |
|---|---|
| Accept | application/json |
| Authorization | Bearer <token> |
๋งค๊ฐ๋ณ์(Parameters)โ
info
์ง์๋๋ ๋ฌธ์ ์ข ๋ฅ์ ์ ์ฒด ๋ชฉ๋ก๊ณผ ๊ฐ ์ข ๋ฅ๋ณ ํ์ ๋งค๊ฐ๋ณ์๋ Document Types ๊ฐ์ด๋๋ฅผ ์ฐธ๊ณ ํด ์ฃผ์ธ์.
| ์ด๋ฆ | ํ์ | ํ์ | ์ค๋ช |
|---|---|---|---|
documentType | string | ์ | ๋ฌธ์ ์ข ๋ฅ. ํ์ฉ ๊ฐ: CPF. |
documentNumber | string | ์ | ์กฐํ ๋์์์ ๋ฌธ์ ๋ฒํธ. |
dateOfBirth | string | ์ | ์กฐํ ๋์์์ ์ถ์์ผ. ํ์: dd/mm/yyyy. |
์์ฒญ(Request)โ
- JavaScript
- Python
- PHP
- Swift
import axios from 'axios';
const options = {
method: 'GET',
url: 'https://api.verifik.co/v2/br/background-check',
params: {
documentType: 'CPF',
documentNumber: '012.345.678-01',
dateOfBirth: '17/02/2002'
},
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")
headers = {
'Accept': "application/json",
'Authorization': "Bearer <your_token>"
}
conn.request("GET", "/v2/br/background-check?documentType=CPF&documentNumber=012.345.678-01&dateOfBirth=17/02/2002", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('GET', 'https://api.verifik.co/v2/br/background-check?documentType=CPF&documentNumber=012.345.678-01&dateOfBirth=17/02/2002', [
'headers' => [
'Accept' => 'application/json',
'Authorization' => 'Bearer <your_token>',
],
]);
echo $response->getBody();
import Foundation
let headers = [
"Accept": "application/json",
"Authorization": "Bearer <your_token>"
]
let request = NSMutableURLRequest(url: NSURL(string: "https://api.verifik.co/v2/br/background-check?documentType=CPF&documentNumber=012.345.678-01&dateOfBirth=17/02/2002")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
์๋ต(Response)โ
- 200
- 404
- 409
- 409 (์๋ชป๋ ์ข ๋ฅ)
{
"data": {
"documentType": "CPF",
"documentNumber": "012.345.678-01",
"firstName": "Joรฃo",
"lastName": "Silva",
"fullName": "Joรฃo Silva",
"dateOfBirth": "17/02/2002",
"certificationNumber": "123456789",
"canIssueReports": true,
"associatedNames": ["Joรฃo Silva Santos"],
"pdfReport": "base64_encoded_pdf_content",
"status": "clear"
},
"signature": {
"dateTime": "April 11, 2023 12:25 PM",
"message": "Certified by Verifik.co"
}
}
{
"code": "NotFound",
"message": "Record not found."
}
{
"code": "MissingParameter",
"message": "missing documentType\n. missing documentNumber\n. missing dateOfBirth\n"
}
{
"code": "MissingParameter",
"message": "documentType must be one of: [CPF]"
}
์ฃผ์ ๊ธฐ๋ฅโ
- CPF ๊ฒ์ฆ: ๋ธ๋ผ์ง CPF ๋ฌธ์์ ์ง์๋ฅผ ํ์ธํฉ๋๋ค.
- ์ข ํฉ ๋ฐฐ๊ฒฝ ๋ฐ์ดํฐ: ์ ์ฒด ์ด๋ฆ, ๋ฌธ์ ์์ธ ์ ๋ณด, ์ธ์ฆ ๋ฒํธ, PDF ๋ณด๊ณ ์๋ฅผ ๋ฐํํฉ๋๋ค.
- ๊ตฌ์กฐํ๋ ์๋ต: ํตํฉ์ด ์ฉ์ดํ๋๋ก ์ ๋ฆฌ๋ ๋ฐ์ดํฐ ํ์์ ์ ๊ณตํฉ๋๋ค.
- ๋ค์ํ ํ๋ก๊ทธ๋๋ฐ ์ธ์ด ์ง์: JavaScript, Python, PHP, Swift ์์ ๋ฅผ ์ ๊ณตํฉ๋๋ค.
- ์ค๋ฅ ์ฒ๋ฆฌ: ๋ค์ํ ์๋๋ฆฌ์ค์ ๋ํ ์์ธํ ์ค๋ฅ ์๋ต์ ์ ๊ณตํฉ๋๋ค.