DescribeSplitItemBill

Updated at:
Copy as MD

Queries split bills.

Operation description

  • The query results for the current month's split bills are for reference only and cannot be used as the basis for reconciliation. The final bill for the current month can be queried after 12:00 on the 4th day of the next month. The split bill data for the current month does not include unsettled pay-as-you-go data (unbilled or being accumulated).

  • Split bill data is available for the last 12 months.

  • Split bill data is updated with a 48-hour delay compared to actual expenses. For split cloud services (such as CDN, OSS, and Internet Shared Bandwidth), the specific expenses for each attached resource (such as domain names, buckets, and EIPs) are updated with a 72-hour delay.

  • Split bill data is available only after you enable the feature on the Split Bill page in the console. The data becomes available 24 hours after you enable the feature.

  • The rate limit is 10 requests per second per user. If a timeout occurs, retry the request.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

bssapi:DescribeSplitItemBill

get

*All Resource

*

  • bssapi:ProductCode
  • bssapi:ProductType
None

Request parameters

Parameter

Type

Required

Description

Example

BillingCycle

string

Yes

The billing cycle. Format: YYYY-MM.

2020-03

ProductCode

string

No

The product code.

rds

ProductType

string

No

The product type.

rds

SubscriptionType

string

No

The subscription type. Valid values:

  • Subscription: subscription.

  • PayAsYouGo: pay-as-you-go.

Note

This parameter must be used together with the ProductCode parameter.

PayAsYouGo

NextToken

string

No

The token that specifies the position from which the current call starts to read data. The value must be empty or the value of NextToken returned in the previous response. Otherwise, an error occurs. An empty value indicates that the read operation starts from the beginning.

CAESEgoQCg4KCmd

MaxResults

integer

No

The maximum number of entries to return in the current call. Default value: 20. Maximum value: 300.

20

BillOwnerId

integer

No

The ID of the resource ownership account. The resource ownership account is the account that actually uses the resource.

123

InstanceID

string

No

The instance ID.

i-kjhdskjgshfdlkjfdh

SplitItemID

string

No

The ID of the attached resource.

i-kjhdskjgshfdlkjfdh

Granularity

string

No

The granularity at which bills are queried. Valid values:

  • MONTHLY: monthly. This value corresponds to the monthly bills on the Split Bill page in the User Center.

  • DAILY: daily. This value corresponds to the daily bills on the Split Bill page in the User Center.

Note

If you set this parameter to DAILY, you must specify the BillingDate parameter.

Monthly

BillingDate

string

No

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

2020-03-02

TagFilter

array<object>

No

The tag filter conditions. Multiple sets of TagValues query conditions are supported. The logical relationship between multiple sets of TagValues conditions is OR.

object

No

The tag filter conditions.

TagKey

string

No

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

  • If you specify only TagFilter.N.TagKey, all bills associated with the tag key are returned.

  • If you specify multiple tag key-value pairs, bills that match any of the tag key-value pairs are returned.

  • If the tags on a resource change, you can only query the bills generated during the period when the tags were attached to the resource.

TestKey

TagValues

array

No

TagValues.N is used to query bills that match the specified tag values. It consists of a list of strings. The tag value must be 1 to 128 characters in length. Valid values of N: 1 to 20.

  • If you specify TagValues.N, you must also specify TagFilter.N.TagKey. Otherwise, the InvalidParameter.TagValues error is reported.

  • If you specify multiple tag values, bills that match any of the tag values are returned.

TestValue

string

No

The tag value.

TestValue

IsHideZeroCharge

boolean

No

Specifies whether to filter out bills where both the original price (PretaxGrossAmount) and the payable amount (PretaxAmount) are 0. Valid values:

  • false: does not filter out the bills.

  • true: filters out the bills.

false

PipCode

string

No

The product code. This value is the same as the product code in the bills of the User Center.

rds

Response elements

Element

Type

Description

Example

object

Code

string

The status code.

Success

Data

object

The response data.

AccountID

string

The account ID.

185xxxx3489

AccountName

string

The user account.

test@test.aliyunid.com

BillingCycle

string

The billing cycle. Format: YYYY-MM.

2020-03

Items

array<object>

The bill details.

object

AfterDiscountAmount

number

The amount after discount, which includes the payable amount after coupon deduction. Calculation rule: Amount after discount = List price - Discount amount.

0

BillAccountID

string

The ID of the account to which the bill belongs.

185xxxx3489

BillAccountName

string

The name of the account to which the bill belongs.

test@test.aliyunid.com

BillingDate

string

The billing date in the YYYY-MM-DD format. This parameter is not supported.

2020-01-20

BillingItem

string

The billing item.

Bandwidth

BillingItemCode

string

The billing item code.

disk

BillingType

string

The billing method.

Other

BizType

string

The business type.

trusteeship

CommodityCode

string

The commodity code, which is the same as the product detail code in the User Center.

rds

CostUnit

string

The cost unit.

Unallocated

Currency

string

The currency. Valid values:

  • CNY

  • USD

  • JPY

CNY

DeductedByCoupons

number

The coupon discount amount.

0

DeductedByResourcePackage

string

The amount deducted by resource plans.

0

InstanceConfig

string

The detailed instance configuration.

CPU:12

InstanceID

string

The instance ID.

i-kjhdskjgshfdlkjfdh

InstanceSpec

string

The instance specifications.

ecs.sn1ne.3xlarge

InternetIP

string

The public IP address.

34.xx.x.x

IntranetIP

string

The internal IP address.

192.xx.xx.xx

InvoiceDiscount

number

The discount amount.

0

Item

string

The bill type. Valid values:

  • SubscriptionOrder: Subscription order.

  • PayAsYouGoBill: Pay-as-you-go bill.

  • Refund: Refund.

  • Adjustment: Adjustment.

PayAsYouGoBill

ItemName

string

The item name.

iZ28bycvyb4Z

ListPrice

string

The unit price.

0.12

ListPriceUnit

string

The unit of the unit price.

CNY/GB

NickName

string

The instance nickname.

nick

OwnerID

string

The account ID of the resource owner in multi-account payment scenarios.

169***013

PipCode

string

The product code, which is the same as the bill product code in the User Center.

rds

PretaxAmount

number

The payable amount.

0

PretaxGrossAmount

number

The original amount.

0

ProductCode

string

The product code.

rds

ProductDetail

string

The product detail.

ApsaraDB RDS

ProductName

string

The product name.

ApsaraDB RDS

ProductType

string

The product type.

rds

Region

string

The region.

Hangzhou

ResourceGroup

string

The resource group.

Default resource group

ServicePeriod

string

The service duration.

20

ServicePeriodUnit

string

The unit of the service duration.

Hour

SplitAccountID

string

The account ID of the attached resource.

12**122

SplitAccountName

string

The account name of the attached resource.

test**1122

SplitBillingCycle

string

The split bill month.

2021-06

SplitBillingDate

string

The split bill date.

2021-06-01

SplitCommodityCode

string

The commodity code of the attached resource.

rds

SplitItemID

string

The ID of the attached resource.

i-28bycvyb4

SplitItemName

string

The name of the attached resource.

iZ28bycvyb4Z

SplitProductDetail

string

The product detail name of the attached resource.

ApsaraDB

SubscriptionType

string

The subscription type. Valid values:

  • Subscription: Subscription.

  • PayAsYouGo: Pay-as-you-go.

PayAsYouGo

Tag

string

The resource tag. If a tag on a resource is changed, the bills generated during the validity period will include this tag.

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

Usage

string

The usage.

100

UsageUnit

string

The usage unit.

GB

Zone

string

The zone.

China North 1

MaxResults

integer

The maximum number of entries returned for the current request.

20

NextToken

string

The token that indicates the position where the current call stops reading. An empty value indicates that all data has been read. Set this value to the NextToken request parameter in the next call.

CAESEgoQCg4K

TotalCount

integer

The total number of entries.

20

Message

string

The error message.

Successful!

RequestId

string

The request ID.

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

Success

boolean

Indicates whether the request is successful.

true

Examples

Success response

JSON format

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

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.