All Products
Search
Document Center

BSS OpenAPI:QueryBillOverview

Last Updated:Mar 01, 2024

Queries the bill overview information in a billing cycle.

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:QueryBillOverviewREAD
  • All Resources
    *
  • bssapi:ProductCode
  • bssapi:ProductType
none

Request parameters

ParameterTypeRequiredDescriptionExample
BillingCyclestringYes

The billing cycle, in the YYYY-MM format.

2018-07
ProductCodestringNo

The code of the service.

rds
ProductTypestringNo

The type of the service.

rds
SubscriptionTypestringNo

The billing method. Valid values:

  • Subscription: the subscription billing method
  • PayAsYouGo: the pay-as-you-go billing method
Subscription
BillOwnerIdlongNo

The ID of the member. If you specify a value for this parameter, you can query the bills of the specified member. If you leave this parameter empty, the bills of the current account are queried by default.

1234

Response parameters

ParameterTypeDescriptionExample
object
Codestring

The status code returned.

Success
Messagestring

The message returned.

Successful!
RequestIdstring

The ID of the request.

BCB1E1BC-05BF-4217-80EE-BF09A29407BA
Successboolean

Indicates whether the request is successful.

true
Dataobject

The data returned.

BillingCyclestring

The billing cycle, in the YYYY-MM format.

2020-03
AccountIDstring

The ID of the account.

185766xxxx
AccountNamestring

The name of the account.

test@test.aliyunid.com
Itemsobject []

The details of the bills.

RoundDownDiscountstring

The round down discount.

0
Itemstring

The type of the bill. Valid values:

  • SubscriptionOrder
  • PayAsYouGoBill
  • Refund
  • Adjustment
PayAsYouGoBill
Currencystring

The type of the currency. Valid values:

  • CNY
  • USD
  • JPY
CNY
SubscriptionTypestring

The billing method. Valid values:

  • Subscription: the subscription billing method
  • PayAsYouGo: the pay-as-you-go billing method
Subscription
DeductedByCashCouponsfloat

The amount deducted by using vouchers.

0
BillAccountNamestring

The name of the account to which the bill belongs.

test@test.aliyunid.com
BizTypestring

The business type.

trusteeship
DeductedByCouponsfloat

The amount deducted by using coupons.

0
OutstandingAmountfloat

The unsettled amount or the amount deducted by using credits. This may be an unsettled amount of a regular user or credits consumed by a credit user.

0
PipCodestring

The code of the service. The service code is the same as that displayed in User Center.

rds
PretaxAmountfloat

The pretax amount.

100
ProductNamestring

The name of the service.

NAT Gateway
CommodityCodestring

The code of the commodity. The commodity code is the same as that displayed in User Center.

rds
AdjustAmountfloat

The amount deducted by using credit refunds.

0
ProductDetailstring

The details of the service.

NAT Gateway (Pay-As-You-Go)
OwnerIDstring

The ID of the bill owner.

1222
DeductedByPrepaidCardfloat

The amount deducted by using prepaid cards.

0
BillAccountIDstring

The ID of the account to which the bill belongs.

185766xxxx
ProductTypestring

The type of the service.

rds
InvoiceDiscountfloat

The discount amount.

0
PaymentAmountfloat

The amount paid in cash. The amount that was deducted by using credit refunds is included.

100
PretaxGrossAmountfloat

The pretax gross amount.

100
ProductCodestring

The code of the service.

rds
CashAmountfloat

The amount paid in cash. The amount that was deducted by using credit refunds is not included.

0

Examples

Sample success responses

JSONformat

{
  "Code": "Success",
  "Message": "Successful!",
  "RequestId": "BCB1E1BC-05BF-4217-80EE-BF09A29407BA",
  "Success": true,
  "Data": {
    "BillingCycle": "2020-03",
    "AccountID": "185766xxxx",
    "AccountName": "test@test.aliyunid.com",
    "Items": {
      "Item": [
        {
          "RoundDownDiscount": "0",
          "Item": "PayAsYouGoBill",
          "Currency": "CNY",
          "SubscriptionType": "Subscription",
          "DeductedByCashCoupons": 0,
          "BillAccountName": "test@test.aliyunid.com",
          "BizType": "trusteeship",
          "DeductedByCoupons": 0,
          "OutstandingAmount": 0,
          "AfterTaxAmount": 0,
          "PretaxAmountLocal": 0,
          "Tax": 0,
          "PipCode": "rds",
          "PretaxAmount": 100,
          "ProductName": "NAT Gateway\n",
          "CommodityCode": "rds",
          "AdjustAmount": 0,
          "ProductDetail": "NAT Gateway (Pay-As-You-Go)",
          "PaymentCurrency": "USD",
          "OwnerID": "1222",
          "DeductedByPrepaidCard": 0,
          "BillAccountID": "185766xxxx",
          "ProductType": "rds",
          "InvoiceDiscount": 0,
          "PaymentAmount": 100,
          "PretaxGrossAmount": 100,
          "ProductCode": "rds",
          "CashAmount": 0
        }
      ]
    }
  }
}

Error codes

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