All Products
Search
Document Center

BSS OpenAPI:DescribeSplitItemBill

更新時間:Oct 21, 2024

Queries split bills.

Operation description

  • The data that you query by calling this operation is the same as the data that is queried by billing cycles in the Split Bill module of Cost Allocation.
  • You can query split bills that were generated within the last 12 months by calling this operation.
  • You can query split bills only after you enable the Split Bill service in the User Center console.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
BillingCyclestringYes

The billing cycle. Specify the parameter in the YYYY-MM format.

2020-03
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. This parameter must be used with the ProductCode parameter.

PayAsYouGo
NextTokenstringNo

The token that is used for the next query. The parameter must be left empty or set to the value of the NextToken parameter returned in the last call. Otherwise, an error is returned. If the parameter is left empty, the data is queried from the first entry.

CAESEgoQCg4KCmd
MaxResultsintegerNo

The maximum number of entries to query. Default value: 20. Maximum value: 300.

20
BillOwnerIdlongNo

The ID of the member. If you specify this parameter, the bills of the member are queried. If you do not specify this parameter, the bills of the current account are queried by default.

123
InstanceIDstringNo

The ID of the instance.

i-kjhdskjgshfdlkjfdh
SplitItemIDstringNo

The ID of the split item.

i-kjhdskjgshfdlkjfdh
GranularitystringNo

The granularity at which bills are queried. Valid values:

  • MONTHLY: queries bills on a monthly basis. The data that you query is the same as the data that is queried by billing cycles in the Split Bill module of the User Center console.
  • DAILY: queries bills on a daily basis. The data that you query is the same as the data that is queried by days in the Split Bill module of the User Center console.

If you specify DAILY for this parameter, the BillingDate parameter is required.

Monthly
BillingDatestringNo

The billing date. This parameter is required only when the Granularity parameter is set to DAILY. Format: YYYY-MM-DD.

2020-03-02
TagFilterarray<object>No

The tags that are used to filter split bills. You can specify multiple tag values. If you specify multiple tag values, split bills that match one of the tag values are queried.

objectNo

The information about tags that are used to filter split bills

TagValuesarrayNo

You can specify the TagValues.N parameter to query bills that match the specified tag value. The value of the TagValues.N parameter must be a string. The tag value must be 1 to 128 characters in length. Valid values of N: 1 to 20.

  • If you specify the TagValues.N parameter, the TagFilter.N.TagKey parameter is required. Otherwise, the error message InvalidParameter.TagValues is returned.
  • If you specify multiple tag values, split bills that match one of the tag values are queried.
stringNo

The information about tag keys.

TestValue
TagKeystringNo

The TagFilter.N parameter is used to query bills that match a specified tag. The value of the TagFilter.N parameter must be a key-value pair. The tag key must be 1 to 128 characters in length. Valid values of N: 1 to 20.

  • If only the TagFilter.N.TagKey parameter is specified, all bills associated with the tag key are queried.
  • If you specify multiple tag key-value pairs at the same time, bills that meet any one of the tag key-value pairs are queried.
  • If the tags added to resources change, you can query only the bills that are generated within the period in which the tags and resources are associated.
TestKey
IsHideZeroChargebooleanNo

Specifies whether to filter bills if both the pretax gross amount and pretax amount are 0. Valid values:

  • false: does not filter bills.
  • true: filters bills.
false
PipCodestringNo

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

rds

Response parameters

ParameterTypeDescriptionExample
object
Codestring

The status code.

Success
Messagestring

The error message returned.

Successful!
RequestIdstring

The ID of the request.

79EE7556-0CFD-44EB-9CD6-B3B526E3A85F
Successboolean

Indicates whether the request was successful.

true
Dataobject

The data returned.

NextTokenstring

The token used for the next query. If this parameter is empty, all the results are returned. When you perform the next query, you must set the NextToken parameter to this value.

CAESEgoQCg4K
BillingCyclestring

The billing cycle. Format: YYYY-MM.

2020-03
MaxResultsinteger

The maximum number of entries returned.

20
AccountIDstring

The ID of the account.

185xxxx3489
TotalCountinteger

The total number of entries returned.

20
AccountNamestring

The ID of the account.

test@test.aliyunid.com
Itemsarray<object>

The details of the bill.

Itemobject
SplitAccountIDstring

The ID of the account to which the split bill belongs.

12**122
BillAccountNamestring

The name of the account to which the bill belongs.

test@test.aliyunid.com
SubscriptionTypestring

The billing method. Valid values: Subscription: the subscription billing method. PayAsYouGo: the pay-as-you-go billing method.

PayAsYouGo
InstanceSpecstring

The type of the instance.

ecs.sn1ne.3xlarge
DeductedByCouponsfloat

The amount deducted with coupons.

0
Regionstring

The ID of the region.

China (Hangzhou)
PipCodestring

The code of the service. The code is the same as that displayed in the Split Bill module of the User Center console.

rds
CommodityCodestring

The code of the commodity. The code is the same as that displayed in the Split Bill module of the User Center console.

rds
NickNamestring

The name of the instance.

nick
ProductDetailstring

The details of the service.

ApsaraDB RDS
Usagestring

The amount of resource usage.

100
IntranetIPstring

The private IP address.

192.xx.xx.xx
UsageUnitstring

The unit of usage.

GB
SplitCommodityCodestring

The code of the split item.

rds
BillAccountIDstring

The ID of the account to which the bill belongs.

185xxxx3489
ProductTypestring

The type of the service.

rds
DeductedByResourcePackagestring

The amount deducted with resource plans.

0
SplitBillingCyclestring

The billing cycle in which the bill is split.

2021-06
ServicePeriodstring

The duration of the service.

20
SplitItemNamestring

The name of the split item.

iZ28bycvyb4Z
ListPricestring

The unit price.

0.12
Zonestring

The zone.

Qingdao Zone B
PretaxGrossAmountfloat

The pretax gross amount.

0
InstanceConfigstring

The configurations of the instance.

CPU:12
BillingDatestring

The billing date. Format: YYYY-MM-DD. This parameter is not supported.

2020-01-20
InternetIPstring

The public IP address.

34.xx.x.x
Itemstring

The type of the bill. Valid values: SubscriptionOrder: the subscription bill. PayAsYouGoBill: the pay-as-you-go bill. Refund: the refund. Adjustment: the adjustment bill.

PayAsYouGoBill
SplitItemIDstring

The ID of the split item.

i-28bycvyb4
InstanceIDstring

The ID of the instance.

i-kjhdskjgshfdlkjfdh
Tagstring

The tag of the resource. If tags added to resources change, the bills generated during the period in which resources and tags are associated are returned.

key:testKey value:testValue; key:testKey1 value:testValues1
Currencystring

The type of currency. Valid values: CNY, USD, and JPY.

CNY
BizTypestring

The type of the business.

trusteeship
BillingItemstring

The billable item.

Bandwidth
BillingItemCodestring

The code of the billable item.

disk
CostUnitstring

The cost center.

Not allocated
ListPriceUnitstring

The unit of the unit price.

CNY/GB
ResourceGroupstring

The ID of the resource group.

Default resource group
PretaxAmountfloat

The pretax amount.

0
ServicePeriodUnitstring

The unit of the service duration.

Hour
SplitBillingDatestring

The day on which the bill is split.

2021-06-01
ProductNamestring

The name of the service.

ApsaraDB RDS
SplitProductDetailstring

The details of the service.

ApsaraDB RDS
OwnerIDstring

The ID of the account that owns the resource. This parameter is returned in multi-account scenario.

169***013
InvoiceDiscountfloat

The discount amount.

0
SplitAccountNamestring

The name of the account to which the split item belongs.

test**1122
BillingTypestring

The billing method.

Other
ProductCodestring

The code of the service.

rds
ItemNamestring

The name of the split item.

iZ28bycvyb4Z

Examples

Sample success responses

JSONformat

{
  "Code": "Success",
  "Message": "Successful!",
  "RequestId": "79EE7556-0CFD-44EB-9CD6-B3B526E3A85F",
  "Success": true,
  "Data": {
    "NextToken": "CAESEgoQCg4K",
    "BillingCycle": "2020-03",
    "MaxResults": 20,
    "AccountID": "185xxxx3489",
    "TotalCount": 20,
    "AccountName": "test@test.aliyunid.com",
    "Items": [
      {
        "SplitAccountID": "12**122",
        "BillAccountName": "test@test.aliyunid.com",
        "SubscriptionType": "PayAsYouGo",
        "InstanceSpec": "ecs.sn1ne.3xlarge",
        "DeductedByCoupons": 0,
        "Region": "China (Hangzhou)\n",
        "OutstandingAmount": 0.1,
        "PipCode": "rds",
        "CommodityCode": "rds",
        "NickName": "nick",
        "ProductDetail": "ApsaraDB RDS\n",
        "Usage": "100",
        "IntranetIP": "192.xx.xx.xx",
        "UsageUnit": "GB",
        "SplitCommodityCode": "rds",
        "BillAccountID": "185xxxx3489",
        "ProductType": "rds",
        "DeductedByResourcePackage": "0",
        "PaymentAmount": 0,
        "SplitBillingCycle": "2021-06",
        "ServicePeriod": "20",
        "SplitItemName": "iZ28bycvyb4Z",
        "ListPrice": "0.12",
        "Zone": "Qingdao Zone B\n",
        "PretaxGrossAmount": 0,
        "CashAmount": 0,
        "InstanceConfig": "CPU:12",
        "BillingDate": "2020-01-20",
        "InternetIP": "34.xx.x.x",
        "Item": "PayAsYouGoBill",
        "SplitItemID": "i-28bycvyb4",
        "InstanceID": "i-kjhdskjgshfdlkjfdh",
        "Tag": "key:testKey value:testValue; key:testKey1 value:testValues1",
        "Currency": "CNY",
        "DeductedByCashCoupons": 0,
        "BizType": "trusteeship",
        "BillingItem": "Bandwidth\n",
        "BillingItemCode": "disk",
        "CostUnit": "Not allocated\n",
        "ListPriceUnit": "CNY/GB\n",
        "ResourceGroup": "Default resource group\n",
        "PretaxAmount": 0,
        "ServicePeriodUnit": "Hour\n",
        "SplitBillingDate": "2021-06-01",
        "ProductName": "ApsaraDB RDS\n",
        "SplitProductDetail": "ApsaraDB RDS\n",
        "AdjustAmount": 0,
        "OwnerID": "169***013",
        "DeductedByPrepaidCard": 0,
        "InvoiceDiscount": 0,
        "SplitAccountName": "test**1122",
        "BillingType": "Other\n",
        "ProductCode": "rds",
        "ItemName": "iZ28bycvyb4Z"
      }
    ]
  }
}

Error codes

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

Change history

Change timeSummary of changesOperation
2024-06-18The request parameters of the API has changedView Change Details
2023-11-21API Description Update. The request parameters of the API has changedView Change Details
2021-09-23The response structure of the API has changedView Change Details