๊ณต๊ณต ๊ณ์ฝ
API ๋ ํผ๋ฐ์คโ
์๋ํฌ์ธํธโ
https://api.verifik.co/v2/co/contracts
๊ณต๊ณต ๊ณ์ฝ ์๋น์ค๋ ๋ฌธ์ ๋ฒํธ์ ์ข ๋ฅ๋ฅผ ์ ๋ ฅํ์ฌ ๊ฐ์ธ ๋๋ ๋ฒ์ธ์ด ์ฒด๊ฒฐํ ๊ณต๊ณต ๊ณ์ฝ ๋ชฉ๋ก์ ์กฐํํ ์ ์๋๋ก ํฉ๋๋ค. ์๋ต์๋ ๊ณ์ฝ์ ์ ๋ณด, ๊ณ์ฝ ๊ธ์ก, ๊ด๋ จ ๊ธฐ๊ด, ๊ณ์ฝ ๊ธฐ๊ฐ ๋ฑ ๊ฐ ๊ณ์ฝ์ ์ฃผ์ ์ ๋ณด๊ฐ ํฌํจ๋ฉ๋๋ค.
๋ณธ ์๋น์ค๋ ์ฝ๋กฌ๋น์ ์ ๋ถ์์ ๊ณต๊ณต ๊ณ์ฝ์ ํฌ๋ช ํ๊ฒ ๋ชจ๋ํฐ๋งํ ์ ์๋๋ก ์ง์ํฉ๋๋ค.
ํค๋(Headers)โ
| ์ด๋ฆ | ๊ฐ |
|---|---|
| Content-Type | application/json |
| Authorization | Bearer <token> |
๋งค๊ฐ๋ณ์(Parameters)โ
info
์ง์๋๋ ๋ฌธ์ ์ข ๋ฅ์ ์ ์ฒด ๋ชฉ๋ก๊ณผ ๊ฐ ์ข ๋ฅ๋ณ ํ์ ๋งค๊ฐ๋ณ์๋ Document Types ๊ฐ์ด๋๋ฅผ ์ฐธ๊ณ ํด ์ฃผ์ธ์.
| ์ด๋ฆ | ํ์ | ํ์ | ์ค๋ช |
|---|---|---|---|
documentType | string | ์ | ๋ฌธ์ ์ข ๋ฅ. ํ์ฉ ๊ฐ: CC, NIT. |
documentNumber | string | ์ | ์กฐํํ ๋ฌธ์ ๋ฒํธ. |
์์ฒญ(Request)โ
- JavaScript
- Python
- Swift
- PHP
import axios from 'axios';
const options = {
method: 'GET',
url: 'https://api.verifik.co/v2/co/contracts',
params: {documentType: 'CC', documentNumber: '123456789'},
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")
payload = ''
headers = {}
conn.request("GET", "/v2/co/contracts?documentType=CC&documentNumber=63535790", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
var request = URLRequest(url: URL(string: "https://api.verifik.co/v2/co/contracts?documentType=CC&documentNumber=63535790")!,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/co/contracts?documentType=CC&documentNumber=63535790');
$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 (๋งค๊ฐ๋ณ์ ๋๋ฝ)
- 409 (์๋ชป๋ ๋ฌธ์ ์ข ๋ฅ)
{
"value": {
"data": {
"contractor": [
{
"contractor": "123456789",
"contractor_name": "MATEO VERIFIK",
"count": 19
}
],
"contracts": [
{
"contractor_reference": "18486325807904513",
"contractor_id": "63535790",
"contractor": "DIANA ROCIO GARCIA PEรARANDA",
"entity_id": "824002672",
"entity": "CESAR ESE HOSPITAL CAMILO VILLAZON PUMAREJO PUEBLO BELLO",
"url": "https://www.contratos.gov.co/consultas/detalleProceso.do?numConstancia=18-4-8632580",
"value": 1250000,
"object": "PRESTACION DE SERVICIOS PARA EL MANTENIMIENTO PREVENTIVO PLANIFICADO Y CORRECTIVO DE LOS EQUIPOS BIOMEDICOS DE LAS DISTINTAS AREAS DE LA ESE HOSPITAL CAMILO VILLAZON PUMAREJO DE PUEBLO BELLO CESAR",
"process_id": "4",
"department": "CESAR",
"contract_start_date": "2018-11-01",
"contract_end_date": "2018-11-16"
}
]
},
"signature": {
"dateTime": "May 24, 2023 4:41 PM",
"message": "Certified by Verifik.co"
}
}
}
{
"code": "NotFound",
"message": "Record not found."
}
{
"code": "MissingParameter",
"message": "missing documentType\n. missing documentNumber\n"
}
{
"code": "MissingParameter",
"message": "documentType must be one of: [CC,NIT]"
}