All Products
Search
Document Center

BSS OpenAPI:QueryAccountBalance

Last Updated:Mar 01, 2024

Queries the balance of your account.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
bssapi:QueryAccountBalanceREAD
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
The current API does not require request parameters

Response parameters

ParameterTypeDescriptionExample
object
Codestring

The status code returned.

200
Messagestring

The message returned.

success
RequestIdstring

The ID of the request.

16176743-6DC7-4CB3-BB25-A13982D8DFAD
Successboolean

Indicates whether the request is successful.

true
Dataobject

The data returned.

AvailableAmountstring

The available balance of the account.

10000.00
CreditAmountstring

The credit balance of the account.

0.00
MybankCreditAmountstring

The credit line controlled by MYbank.

0.00
Currencystring

The type of the currency. Valid values:

  • CNY: Chinese Yuan
  • USD: US dollar
  • JPY: Japanese Yen
CNY
AvailableCashAmountstring

The available balance in cash.

10000.00

Examples

Sample success responses

JSONformat

{
  "Code": "200",
  "Message": "success",
  "RequestId": "16176743-6DC7-4CB3-BB25-A13982D8DFAD",
  "Success": true,
  "Data": {
    "AvailableAmount": "10000.00",
    "CreditAmount": "0.00",
    "MybankCreditAmount": "0.00",
    "Currency": "CNY",
    "AvailableCashAmount": "10000.00"
  }
}

Error codes

HTTP status codeError codeError message
400NotApplicableThis API is not applicable for caller.
400NotAuthorizedThis API is not authorized for caller.
400MissingParameter Some parameters arte mandatoryfor this request.
400InvalidParameterSome parametersare not valid.
400InvalidOwnerThe specifiedowner doesn’t belong to caller
400InternalErrorThe request processing has failed due to some unknown error, exception or failure.
500UndefinedErrorThe request processing has failed due to some unknown error.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-12-12The Error code has changed. The response structure of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
    delete Error Codes: 500
Output ParametersThe response structure of the API has changed.