Danh sách tài khoản
API Reference
Cập nhật: 23/03/2026
Tài khoản ngân hàng
Danh sách tài khoản
GET /api/v1/bank-accounts
Authorization: Bearer YOUR_API_KEY
Response
{
"status": true,
"messages": "Thành công",
"bank_accounts": [
{
"id": 2,
"bank": "ACB",
"account_number": "7465441",
"account_name": "TRUNG DANG LE",
"status": "active",
"created_at": "2026-03-22 07:55:23"
}
]
}
Mô tả trường
| Trường | Kiểu | Mô tả |
|---|---|---|
id | integer | ID tài khoản |
bank | string | Mã ngân hàng (ACB, VCB, BIDV, MBB, CTG) |
account_number | string | Số tài khoản |
account_name | string | Tên chủ tài khoản |
status | string | active, inactive, pending, error |
created_at | string | Ngày liên kết |
Thống kê tài khoản
GET /api/v1/bank-accounts/summary
Authorization: Bearer YOUR_API_KEY
Trả về thống kê giao dịch chi tiết theo ngày, tuần, tháng cho từng tài khoản.
Response
{
"status": true,
"messages": "Thành công",
"banks": [
{
"id": 2,
"account_number": "7465441",
"bank": "ACB",
"account_name": "TRUNG DANG LE",
"status": "active",
"transaction_count": 35,
"total_amount": 4766800,
"today_transaction_count": 5,
"today_total_amount": 342000,
"week_transaction_count": 35,
"week_total_amount": 4766800,
"month_transaction_count": 35,
"month_total_amount": 4766800
}
]
}
Mô tả trường
| Trường | Kiểu | Mô tả |
|---|---|---|
transaction_count | integer | Tổng số giao dịch |
total_amount | integer | Tổng số tiền (VND) |
today_transaction_count | integer | Giao dịch hôm nay |
today_total_amount | integer | Số tiền hôm nay |
week_transaction_count | integer | Giao dịch tuần này |
week_total_amount | integer | Số tiền tuần này |
month_transaction_count | integer | Giao dịch tháng này |
month_total_amount | integer | Số tiền tháng này |
Bật/Tắt tài khoản
PATCH /api/v1/bank-accounts/{id}/toggle
Authorization: Bearer YOUR_API_KEY
Response
{
"status": true,
"messages": "Đã kích hoạt",
"bank_account": {
"id": 2,
"bank": "ACB",
"account_number": "7465441",
"account_name": "TRUNG DANG LE",
"status": "active",
"created_at": "2026-03-22 07:55:23"
}
}
Ví dụ cURL
# Danh sách tài khoản
curl -s "https://thueapi.vn/api/v1/bank-accounts" \
-H "Authorization: Bearer YOUR_API_KEY"
# Thống kê
curl -s "https://thueapi.vn/api/v1/bank-accounts/summary" \
-H "Authorization: Bearer YOUR_API_KEY"
# Bật/tắt
curl -sX PATCH "https://thueapi.vn/api/v1/bank-accounts/2/toggle" \
-H "Authorization: Bearer YOUR_API_KEY"