Hướng dẫn API

Gọi API bằng identifier + secret (API key tài khoản) tới https://api-khachhang.gizadata.vn/api. Tích hợp trực tiếp từ script, ứng dụng hoặc Postman — không cần đăng nhập website.

Chưa có API key? Liên hệ admin để được cấp identifiersecret.

1. Xác thực

Mọi request bảo vệ gửi kèm identifiersecret:

{
  "action": "balance",
  "identifier": "YOUR_IDENTIFIER",
  "secret": "YOUR_SECRET"
}

Tùy chọn: frontend_source (domain hoặc tên app của bạn).

2. Gọi cơ bản (curl)

curl -s -X POST 'https://api-khachhang.gizadata.vn/api' \
  -H 'Content-Type: application/json' \
  -d '{
    "action": "balance",
    "identifier": "YOUR_IDENTIFIER",
    "secret": "YOUR_SECRET"
  }'

3. Nhóm action thường dùng

Bảng tóm tắt — xem phần Hướng dẫn bên dưới để biết cách gọi từng nhóm.

NhómactionMô tả
balanceSố dư ví
deposit_sepay, get_sepay_order, check_sepay_paymentNạp tiền Sepay
transactionsLịch sử giao dịch
Cataloglist_plans, hosting_list_plans, email_list_plans, key_list_productsDanh sách gói (public / GET)
Mua DVcreate_vps, create_hosting, create_emailTạo dịch vụ (trừ ví)
Mua DVkey_buy, license_buy, bantaikhoan_create_orderProxy, license, bán TK
Quản lýlist_vps, list_vps_with_node, list_hosting, list_emailDanh sách dịch vụ
VPSvps_action, vps_status, vps_vncBật/tắt, trạng thái, VNC
VPSvps_change_rootpass, change_vps_hostname, vps_reinstall_osĐổi pass, hostname, cài lại OS
Hosting/Emailget_hosting_login_info, get_email_login_infoThông tin đăng nhập panel
Gia hạnrenew_service_price_matrix, renew_service, key_renewalBáo giá & gia hạn
Hóa đơnhoadon, pay_invoiceHóa đơn & thanh toán
Hồ sơuser_profile, update_user_profileThông tin tài khoản
Ticketticket_create, ticket_list, ticket_get, ticket_replyHỗ trợ / ticket

4. Quy ước response

5. Lưu ý triển khai

Hướng dẫn chi tiết từng nhóm

Mỗi ví dụ bên dưới là JSON gửi POST https://api-khachhang.gizadata.vn/api. Click khối code để copy.

💰 Ví — xem số dư

  1. Gửi action balance kèm identifier + secret.
  2. Đọc số dư trong response.
{
  "action": "balance",
  "identifier": "YOUR_IDENTIFIER",
  "secret": "YOUR_SECRET"
}

💰 Ví — nạp tiền Sepay

  1. Gọi deposit_sepay với số tiền (amount).
  2. Nhận thông tin chuyển khoản / mã đơn trong response.
  3. Poll get_sepay_order hoặc check_sepay_payment đến khi thành công.
{
  "action": "deposit_sepay",
  "identifier": "YOUR_IDENTIFIER",
  "secret": "YOUR_SECRET",
  "amount": 500000
}
{
  "action": "check_sepay_payment",
  "identifier": "YOUR_IDENTIFIER",
  "secret": "YOUR_SECRET",
  "order_id": "ORDER_ID_TU_BUOC_1"
}

💰 Ví — lịch sử giao dịch

  1. Gọi transactions để lấy danh sách biến động ví.
{
  "action": "transactions",
  "identifier": "YOUR_IDENTIFIER",
  "secret": "YOUR_SECRET"
}

📦 Catalog — xem gói dịch vụ (public)

  1. Có thể gọi GET không cần secret.
  2. Hoặc POST như các action khác.
GET https://api-khachhang.gizadata.vn/api?action=list_plans
{
  "action": "hosting_list_plans",
  "identifier": "YOUR_IDENTIFIER",
  "secret": "YOUR_SECRET"
}

🖥️ Mua dịch vụ — tạo VPS

  1. Lấy planid từ list_plans.
  2. Gọi create_vps — tiền trừ từ ví.
  3. Tương tự: create_hosting, create_email cho hosting/email.
{
  "action": "create_vps",
  "identifier": "YOUR_IDENTIFIER",
  "secret": "YOUR_SECRET",
  "planid": 26,
  "hostname": "api-vps-01",
  "password": "StrongPass@123",
  "os": "ubuntu-22.04",
  "billingcycle": "monthly"
}

📋 Quản lý — danh sách dịch vụ

  1. Gọi list_vps / list_hosting / list_email để lấy ID dịch vụ.
{
  "action": "list_vps",
  "identifier": "YOUR_IDENTIFIER",
  "secret": "YOUR_SECRET"
}

🖥️ VPS — bật / tắt / reboot

  1. Lấy vpsid từ list_vps.
  2. Gọi vps_action với vps_action: start, stop, reboot
{
  "action": "vps_action",
  "identifier": "YOUR_IDENTIFIER",
  "secret": "YOUR_SECRET",
  "vpsid": 12345,
  "vps_action": "start"
}
{
  "action": "vps_status",
  "identifier": "YOUR_IDENTIFIER",
  "secret": "YOUR_SECRET",
  "vpsid": 12345
}

🔄 Gia hạn dịch vụ

  1. renew_service_price_matrix — xem giá gia hạn.
  2. renew_service — thực hiện gia hạn.
{
  "action": "renew_service",
  "identifier": "YOUR_IDENTIFIER",
  "secret": "YOUR_SECRET",
  "serviceid": 12345,
  "type": "vps"
}

🎫 Ticket — hỗ trợ (tạo / xem / trả lời)

  1. ticket_list — danh sách ticket (có phân trang page, limit, lọc status).
  2. ticket_get — chi tiết + lịch sử trả lời theo ticket_id.
  3. ticket_create — tạo ticket mới (subject, message).
  4. ticket_reply — trả lời ticket đã có.
{
  "action": "ticket_list",
  "identifier": "YOUR_IDENTIFIER",
  "secret": "YOUR_SECRET",
  "page": 1,
  "limit": 20,
  "status": ""
}
{
  "action": "ticket_get",
  "identifier": "YOUR_IDENTIFIER",
  "secret": "YOUR_SECRET",
  "ticket_id": 123
}
{
  "action": "ticket_create",
  "identifier": "YOUR_IDENTIFIER",
  "secret": "YOUR_SECRET",
  "subject": "VPS không ping được",
  "message": "Mô tả chi tiết lỗi...",
  "attachment_urls": []
}
{
  "action": "ticket_reply",
  "identifier": "YOUR_IDENTIFIER",
  "secret": "YOUR_SECRET",
  "ticket_id": 123,
  "message": "Nội dung trả lời...",
  "attachment_urls": []
}

👤 Hồ sơ tài khoản

  1. user_profile xem thông tin · update_user_profile cập nhật.
{
  "action": "user_profile",
  "identifier": "YOUR_IDENTIFIER",
  "secret": "YOUR_SECRET"
}

Cập nhật: 2026-06-06

Đã copy!