DescribeSplitItemBill

Updated at:
Copy as MD

Queries split bills.

Operation description

  • Split bill data for the current month is for reference only and cannot be used for reconciliation. The finalized bill for the current month is available after 12:00 on the 4th of the following month. Split bill data for the current month does not include unsettled (unbilled or accumulating) pay-as-you-go data.

  • Split bill data is available for the most recent 12 months.

  • Split bill data is updated with a 48-hour delay from actual cost consumption. For attached resources of cloud services that support splitting (such as CDN, OSS, and Internet Shared Bandwidth), the costs of individual attached resources (such as domain names, buckets, and EIPs) are updated with a 72-hour delay.

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

  • The rate limit for a single user is 10 queries per second. 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 in the YYYY-MM format.

2020-03

ProductCode

string

No

The code of the product.

rds

ProductType

string

No

The type of the product.

rds

SubscriptionType

string

No

The subscription type. Valid values:

  • Subscription: upfront.

  • 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 NextToken value returned in the previous call. Otherwise, an error is returned. An empty value indicates that data is read from the beginning.

CAESEgoQCg4KCmd

MaxResults

integer

No

The maximum number of data records to read in the current request. 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 of the bill query. Valid values:

  • MONTHLY: monthly. Consistent with the billing cycle bill on the Split Bill page in User Center.

  • DAILY: daily. Consistent with the daily bill on the Split Bill page in User Center.

Note

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

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 groups of TagValues query conditions are supported. The relationship between multiple groups of TagValues conditions is OR.

object

No

The tag filter conditions.

TagKey

string

No

TagFilter.N is used to find bills that match the specified tag. It consists of a key-value pair. Valid values of the tag key length: 1 to 128. Valid values of N: 1 to 20.

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

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

  • If the tags on a resource change, you can query bills only for the period during which the tags existed.

TestKey

TagValues

array

No

TagValues.N is used to find bills that match the specified tag values. It consists of a list of strings. Valid values of the tag value length: 1 to 128. Valid values of N: 1 to 20.

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

  • If multiple tag values are specified, 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 for which both the original price (PretaxGrossAmount) and the payable amount (PretaxAmount) are 0. Valid values:

  • false.

  • true.

false

PipCode

string

No

The product code, which is consistent with the product code on the bills in User Center.

rds

Response elements

Element

Type

Description

Example

object

Code

string

The status code.

Success

Data

object

The returned data.

AccountID

string

The account ID.

185xxxx3489

AccountName

string

The username.

test@test.aliyunid.com

BillingCycle

string

The billing date in the format of YYYY-MM.

2020-03

Items

array<object>

The bill details.

object

AfterDiscountAmount

number

The amount after discount. This value includes the payable amount after coupon deductions. Calculation rule: After-discount amount = List price - Discount amount.

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 format of YYYY-MM-DD. Not supported.

2020-01-20

BillingItem

string

The billable item.

Bandwidth

BillingItemCode

string

The code of the billable item.

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 User Center.

rds

CostUnit

string

The cost center.

Unallocated

Currency

string

The currency. Valid values: CNY. USD. JPY.

CNY

DeductedByCoupons

number

The amount deducted by using coupons.

0

DeductedByResourcePackage

string

The amount deducted by using resource plans.

0

InstanceConfig

string

The detailed configuration of the instance.

CPU:12

InstanceID

string

The instance ID.

i-kjhdskjgshfdlkjfdh

InstanceSpec

string

The instance type.

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 list price.

0.12

ListPriceUnit

string

The unit of the list price.

USD/GB

NickName

string

The nickname of the instance.

nick

OwnerID

string

The account ID of the resource owner. This parameter is used in multi-account payment scenarios.

169***013

PipCode

string

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

rds

PretaxAmount

number

The payable amount.

0

PretaxGrossAmount

number

The original amount.

0

ProductCode

string

The code of the product.

rds

ProductDetail

string

The product detail.

ApsaraDB RDS

ProductName

string

The product name.

ApsaraDB RDS

ProductType

string

The type of the product.

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 to which the attached resource belongs.

12**122

SplitAccountName

string

The account name to which the attached resource belongs.

test**1122

SplitBillingCycle

string

The split billing month.

2021-06

SplitBillingDate

string

The split billing day.

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 changes, bills generated during the remaining period carry the new tag.

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

Usage

string

The usage.

100

UsageUnit

string

The unit of usage.

GB

Zone

string

The zone.

China North 1

MaxResults

integer

The maximum number of records returned in this request.

20

NextToken

string

The position from which the current call starts reading. An empty value indicates that all data has been read. In the next call, set the NextToken request parameter to this value.

CAESEgoQCg4K

TotalCount

integer

The total number of records.

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": "带宽",
        "BillingItemCode": "disk",
        "BillingType": "其它",
        "BizType": "trusteeship",
        "CommodityCode": "rds",
        "CostUnit": "未分配",
        "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": "元/GB",
        "NickName": "nick",
        "OwnerID": "169***013",
        "PipCode": "rds",
        "PretaxAmount": 0,
        "PretaxGrossAmount": 0,
        "ProductCode": "rds",
        "ProductDetail": "云数据库RDS",
        "ProductName": "云数据库RDS",
        "ProductType": "rds",
        "Region": "杭州",
        "ResourceGroup": "默认资源组",
        "ServicePeriod": "20",
        "ServicePeriodUnit": "小时",
        "SplitAccountID": "12**122",
        "SplitAccountName": "test**1122",
        "SplitBillingCycle": "2021-06",
        "SplitBillingDate": "2021-06-01",
        "SplitCommodityCode": "rds",
        "SplitItemID": "i-28bycvyb4",
        "SplitItemName": "iZ28bycvyb4Z",
        "SplitProductDetail": "云数据库",
        "SubscriptionType": "PayAsYouGo",
        "Tag": "key:testKey value:testValue; key:testKey1 value:testValues1",
        "Usage": "100",
        "UsageUnit": "GB",
        "Zone": "华北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.