1. 入金,入信用
POST /v1/api/account/balance
Request Headers
Name | Required | Type | Description |
---|---|---|---|
x-api-tenantId | yes | string | 租户编号 |
x-api-token | yes | string | 认证token |
x-api-signature | yes | string | 签名方式:SHA1WithRSA,签名格式:“T001117,serverId=XXX,accountId=XXX,amount=XXX”,XXX为Body里的真实数据 |
Request Body Parameters
Name | Required | Type | Description | ||
---|---|---|---|---|---|
serverId | yes | string | server编码 | ||
accountId | yes | Long | 账户login | ||
amount | yes | double | 额度 | ||
type | yes | string | 操作类型,CREDIT_IN。 | ||
comment | no | string | 备注 |
Response
Name | Type | Description |
---|---|---|
result | boolean | 成功标识,返回true,表示请求成功,false表示请求失败 |
mcode | string | 错误码,成功时返回m00000,失败时返回对应的错误码,见文档默认错误码说明 |
errorMessage | List | 错误提示信息,部分错误码时有值 |
Example
请求示例
POST /v1/api/account/balance
RequestBody
{
"accountId":2109730462,
"serverId":"428",
"amount":5.5,
"type":"DEPOSITE",
"comment":"123"
}
签名数据:
T001117,serverId=428,accountId=2109730462,amount=5.5
返回示例:成功
{
"mcode": "m0000000",
"result": true
}
返回示例:失败
{
"mcode":"m0000001",
"errorMessage":"",
"result":false
}
2. Error 错误处理
错误码表(Error Code)
mcode | Message |
---|---|
BW_API_0000002 | 无效签名 |
BW_INVALID_PARAM | 参数错误 |
BW_INVALID_SERVERID | 无效serverId |
-1 | 服务异常,请稍后再试 |