Hàm lấy số dư tài khoản
Đây là hàm cơ bản đầu tiên mà bạn nên thử, hàm giúp bạn lấy về số dư trong tài khoản của bạn.
HTTP request
POST http://api-senbac.com/MainService.svc/json/GetBalance_json
Content Type: application/json
Response Type: application/json
curl --location 'http://api-senbac.com/MainService.svc/json/GetBalance_json' \
--header 'Content-Type: application/json' \
--data '{
"ApiKey":"{{ApiKey}}",
"SecretKey":"{{SecretKey}}"
}'Cấu trúc body của request:
Tham số
Kiểu dữ liệu
Tính bắt buộc
Mô tả
ApiKey
string
Yes
ApiKey của tài khoản.
SecretKey
string
Yes
SecretKey của tài khoản.
Response:
{
"Balance": 36693,
"CodeResponse": "100",
"UserID": 9999
}Request hợp lệ.
{
"Balance": 0,
"CodeResponse": "101",
"ErrorMessage": "Authorize Failed"
}Sai thông tin ApiKey/SecretKey.
Cấu trúc body của response:
Thuộc tính
Kiểu dữ liệu
Mô tả
Balance
string
Số dư tài khoản chính.
CodeResponse
string
Mã trả về.
UserID
string
Id user tài khoản của hệ thống.
Thông tin chi tiết mã lỗi xem ở bảng: Mã lỗi .
Last updated