# eVerify API: dùng với VS Code REST Client hoặc JetBrains HTTP Client.
# 1. Thay @apiKey bằng key của bạn (không commit file có key thật).
# 2. Bấm "Send Request" phía trên từng request.

@baseUrl = https://everify.vtsi.vn/api/v1
@apiKey = evf_live_...
# Đổi giá trị cho mỗi thao tác mới. Giữ nguyên khi gửi lại cùng thao tác.
@idempotencyKey = hs-2026-000123-1

### Xem số dư
GET {{baseUrl}}/balance
X-API-Key: {{apiKey}}

### Lịch sử giao dịch (20 mục mới nhất)
GET {{baseUrl}}/transactions?limit=20
X-API-Key: {{apiKey}}

### Sổ biến động ví (năm 2026)
GET {{baseUrl}}/ledger?from=2026-01-01&to=2026-12-31
X-API-Key: {{apiKey}}

### Tổng hợp sử dụng theo tháng
GET {{baseUrl}}/usage/summary?from=2026-01-01&to=2026-12-31&group_by=month
X-API-Key: {{apiKey}}

### Xác thực CCCD gắn chip (eID C06)
# Thay <...> bằng dữ liệu base64 đọc từ chip của một thẻ CCCD thật.
POST {{baseUrl}}/eid/verify
X-API-Key: {{apiKey}}
Idempotency-Key: {{idempotencyKey}}
Content-Type: application/json

{
  "chip": {
    "sod": "<base64 SOD từ chip>",
    "dg1": "<base64 DG1 từ chip>",
    "dg13": "<base64 DG13 từ chip>"
  },
  "client_ref": "HS-2026-000123"
}
