๐จ๐ฑ ์น ๋ โ ์ด์ ๋ฉดํ ์ ์ง ๋ฐ ์ฐจ๋จ ๋ฑ๋ก๋ถ
Servicio de Registro Civil e Identificaciรณn์ ์ ๊ตญ ์ด์ ๋ฉดํ ์ฐจ๋จ ๋ฑ๋ก๋ถ๋ฅผ RUN ๋ฒํธ๋ก ์กฐํํฉ๋๋ค.
๋จ์ผ ์ฝ๋ฎ๋ง ์ง์ํ๋ ์ง์์ฒด ํฌํธ๊ณผ ๋ฌ๋ฆฌ, ๋ณธ ์๋ํฌ์ธํธ๋ ์น ๋ ์ ์ญ์ ๋ฒ์ ๋ฐ ํ์ ๊ธฐ๊ด์์ ๋ช ๋ นํ ์ด์ ๋ฉดํ ์ ์ง ๋ฐ ์ฐจ๋จ์ ๋ํ ์ ๊ตญ ๋จ์ ์ปค๋ฒ๋ฆฌ์ง๋ฅผ ์ ๊ณตํฉ๋๋ค.
์๋ํฌ์ธํธโ
GET https://api.verifik.co/v2/cl/driver-license/block
ํค๋(Headers)โ
| ์ด๋ฆ | ๊ฐ |
|---|---|
| Accept | application/json |
| Authorization | Bearer <token> |
๋งค๊ฐ๋ณ์(Parameters)โ
| ์ด๋ฆ | ํ์ | ํ์ | ์ค๋ช | ์์ |
|---|---|---|---|---|
documentNumber | string | ์ | ๊ฒ์ฆ ๋ฒํธ(DV)๊ฐ ํฌํจ๋ ์น ๋ RUN ๋ฒํธ. ๋ง์นจํ ๋ฐ ํ์ดํ์ ์ ํ ์ฌํญ์
๋๋ค(18.347.440-5 ๋๋ 18347440-5). ๊ฒ์ฆ ๋ฒํธ๋ ์ฌ๋ฐ๋ฅธ Modulo 11 ๊ณ์ฐ๊ฐ์ด์ด์ผ ํฉ๋๋ค. | 18347440-5 |
force | boolean | ์๋์ | ์๋ฒ ์บ์๋ฅผ ์ฐํํ๊ณ ์ถ์ฒ ๊ธฐ๊ด์ ์ง์ ์กฐํํ ์ง ์ฌ๋ถ. | false |
์์ฒญ(Request)โ
- JavaScript
- Python
- cURL
- PHP
- Swift
import axios from 'axios';
const options = {
method: 'GET',
url: 'https://api.verifik.co/v2/cl/driver-license/block',
params: {
documentNumber: '18347440-5'
},
headers: {
'Accept': 'application/json',
'Authorization': 'Bearer <token>'
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error.response?.data || error.message);
}
import requests
url = "https://api.verifik.co/v2/cl/driver-license/block"
params = {"documentNumber": "18347440-5"}
headers = {
"Accept": "application/json",
"Authorization": "Bearer <token>"
}
response = requests.get(url, params=params, headers=headers)
print(response.json())
curl -X GET "https://api.verifik.co/v2/cl/driver-license/block?documentNumber=18347440-5" \
-H "Accept: application/json" \
-H "Authorization: Bearer <token>"
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.verifik.co/v2/cl/driver-license/block?documentNumber=18347440-5",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => array(
"Accept: application/json",
"Authorization: Bearer <token>"
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
?>
var request = URLRequest(url: URL(string: "https://api.verifik.co/v2/cl/driver-license/block?documentNumber=18347440-5")!)
request.httpMethod = "GET"
request.setValue("application/json", forHTTPHeaderField: "Accept")
request.setValue("Bearer <token>", forHTTPHeaderField: "Authorization")
let task = URLSession.shared.dataTask(with: request) { data, response, error in
if let data = data {
print(String(data: data, encoding: .utf8)!)
}
}
task.resume()
์๋ต(Response)โ
- 200 (์ฐจ๋จ ์์)
- 200 (์ฐจ๋จ ๊ธฐ๋ก ์์)
- 404 (๊ธฐ๋ก ์์)
- 409 (๊ฒ์ฆ ๋ฒํธ ๋ถ์ผ์น)
- 409 (๊ฒ์ฆ ๋ฒํธ ๋๋ฝ)
{
"data": {
"documentNumber": "18347440-5",
"fullName": "MACรAS IBARRA LEONARDO ANTONIO",
"hasBlock": false,
"blockStatusText": "NO SE REGISTRA BLOQUEO para los datos ingresados"
},
"signature": {
"dateTime": "October 27, 2026 10:07 PM",
"message": "Certified by Verifik.co"
},
"id": "B752U"
}
{
"data": {
"documentNumber": "10000001-6",
"fullName": "GONZรLEZ PรREZ JUAN CARLOS",
"licenseNumber": "10000001",
"hasBlock": true,
"blockStatusText": "REGISTRA BLOQUEO",
"block": {
"date": "15/03/2024",
"type": "JUDICIAL",
"reason": "ORDEN JUDICIAL JUZGADO POLICIA LOCAL",
"status": "REGISTRA BLOQUEO",
"code": "1"
}
},
"signature": {
"dateTime": "October 27, 2026 10:07 PM",
"message": "Certified by Verifik.co"
},
"id": "A1B2C"
}
{
"code": "NotFound",
"message": "Record not found."
}
404 ์๋ต์ ์กฐํ๋ RUN ๋ฒํธ์ ๋ํด Registro Civil ๋ฐ์ดํฐ๋ฒ ์ด์ค์ ์ด์ ๋ฉดํ ๋ฐ๊ธ ์ด๋ ฅ์ด ์์์ ์๋ฏธํฉ๋๋ค.
{
"code": "invalid_check_digit",
"message": "documentNumber has a check digit (DV) that does not match the RUN/RUT. Send the number with the correct check digit, or without it."
}
์
๋ ฅ๋ ๊ฒ์ฆ ๋ฒํธ(DV)๊ฐ Modulo 11 ๊ฒ์ฆ์ ํต๊ณผํ์ง ๋ชปํ๋ฉด ํฌ๋ ๋ง ์ฐจ๊ฐ ์์ด ์ฆ์ 409 ์ํ ์ฝ๋๋ฅผ ๋ฐํํฉ๋๋ค.
{
"code": "MissingParameter",
"message": "documentNumber must be a Chilean RUN with a valid check digit, e.g. 12345678-5"
}
์ฃผ์ ๊ธฐ๋ฅโ
- ์ ๊ตญ ๋ฑ๋ก๋ถ ์กฐํ: ์น ๋ Servicio de Registro Civil e Identificaciรณn ๊ณต์ ๋ฐ์ดํฐ.
- ๋ฉดํ ์ ์ง ๋ฐ ์ฐจ๋จ ์ฌ๋ถ ์ฆ์ ํ์ธ:
hasBlock: true/false๋ก ์ ์ ํ๋ณ. - ๋ช ์์ ์ฑ๋ช ๊ฒ์ฆ: ์ด์ ๋ฉดํ ์๊ฒฉ์ ๋ฑ๋ก๋ ๊ณต์ ๋ฒ์ ์ฑ๋ช ๋ฐํ.
- ์ฐจ๋จ ๋ฉํ๋ฐ์ดํฐ: ๋ฒ์ ๋ช ๋ น ์ผ์, ์ ์ง ์ ํ ๋ฐ ์ฌ์ ์์ธ ์ ๊ณต.
- Modulo 11 ๊ฒ์ฆ ๋ณดํธ: ์คํ ์ ๋ ฅ ์ ์ฌ์ ๊ฐ์งํ์ฌ ๋ถํ์ํ ํฌ๋ ๋ง ์ฐจ๊ฐ ๋ฐฉ์ง.