Tài liệu kết nối API

Số dư

API URL: https://vlclone.com/api/v1/balance

Method: POST

Body:


{
    "api_key" : "API KEY"
}
            

Response:


{
    "status": true,
    "balance": 100000
}
            

API lấy danh mục chính

API URL: https://vlclone.com/api/v1/categories

Method: GET

Response:


{
    "data": [
        {
            "id": 1,
            "name": "Via",
            "icon": null
        },
        {
            "id": 18,
            "name": "Via phi",
            "icon": "/public/assets/media/country/187-philippines.png"
        }
    ]
}

API lấy danh sách sản phẩm

API URL: https://vlclone.com/api/v1/category/1?api_key=xxx

Method: GET

Response:


{
    "data": [
        {
            "id_product": 2,
            "name": "Via limit 350$ cổ",
            "desc": "Ngoại, Trắng, Limit 50$, Chưa VeryMai",
            "price": 25000,
            "quantity": 0
        },
        {
            "id_product": 5,
            "name": "VIA NGOẠI - LIMIT 5M8 -350$",
            "desc": "Bao login HC Quảng Cáo, Limit ẩn",
            "price": 150000,
            "quantity": 0
        }
    ]
}

Api order

API URL: https://vlclone.com/api/v1/buy

Method: POST

Body:


{
    "api_key" : "API KEY",
    "id_product" : 1,
    "quantity" : 10
}

Response:


{
    "status": true,
    "order_id": 20
}

Code demo PHP


$dataPost = [
    "api_key"      => "API_KEY",
    "id_product"   => 1,
    "quantity"     => 10,
];
$curl = curl_init();
curl_setopt_array($curl, array(
    CURLOPT_URL => "https://vlclone.com/api/v1/buy",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_POSTFIELDS => $dataPost,
));

$response = curl_exec($curl);
$json = json_decode($response);
if (($json->status ?? false) == false) {
    // That bai
    echo $json->msg;
} else {
    // Thanh cong
    echo json_encode($json, JSON_UNESCAPED_UNICODE);
}



API lấy danh sách orders

API URL: https://vlclone.com/api/v1/orders

Method: POST

Body:


{
    "api_key" : "API KEY"
}

Response:


{
    "data": [
        {
            "id": 14,
            "quantity": 1,
            "price": 9600,
            "total_price": 9600,
            "type": "Via ngoại no very",
            "created_at": "2024-08-19T04:55:13.000000Z"
        },
        {
            "id": 13,
            "quantity": 1,
            "price": 9600,
            "total_price": 9600,
            "type": "Via ngoại no very",
            "created_at": "2024-08-19T04:55:01.000000Z"
        }
    ]
}

API xem chi tiết order

API URL: https://vlclone.com/api/v1/order

Method: POST

Body:


{
    "api_key" : "API KEY",
    "order_id" : 1
}

Response:


{
    "id": 1,
    "quantity": 1,
    "price": 1300,
    "total_price": 1300,
    "type": "Via ngoại no very",
    "created_at": "2021-06-07T14:50:51.000000Z",
    "export_format": [
        "uid",
        "password"
    ],
    "data": [
        {
            "uid": "3456345435465",
            "full_info": "3456345435465|pass|cookie|2fa",
            "link_backup": "http://abc.com/download_backup/18/3456345435465"
        }
    ]
}