DescribeBillDetail

Last updated: 2020-02-10 12:57:08

PDF

1. API Description

Domain name for API request: billing.tencentcloudapi.com.

This API is used to query bill details.

A maximum of 5 requests can be initiated per second for this API.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common parameter. The value used for this API: DescribeBillDetail
Version Yes String Common parameter. The value used for this API: 2018-07-09
Region No String Common parameter. This parameter is not required for this API.
Offset Yes Integer Offset
Limit Yes Integer Quantity, maximum is 100
PeriodType Yes String The period type. byUsedTime: By usage period; byPayTime: By payment period. Must be the same as the period of the current monthly bill of the Billing Center. You can check your bill statistics period type at the top of the Bill Overview page.
Month No String Month; format: yyyy-mm. You only have to enter either Month or BeginTime and EndTime. When you enter values for BeginTime and EndTime, Month becomes invalid. This value must be no earlier than the month when Bill 2.0 is activated; last 24 months data are available.
BeginTime No String The start time of the period; format: Y-m-d H:i:s. You only have to enter either Month or BeginTime and EndTime. When you enter values for BeginTime and EndTime, Month becomes invalid. BeginTime and EndTime must be inputted as a pair. This value must be no earlier than the month when Bill 2.0 is activated; last 24 months data are available.
EndTime No String The end time of the period; format: Y-m-d H:i:s. You only have to enter either Month or BeginTime and EndTime. When you enter values for BeginTime and EndTime, Month becomes invalid. BeginTime and EndTime must be inputted as a pair. This value must be no earlier than the month when Bill 2.0 is activated; last 24 months data are available.
NeedRecordNum No Integer Indicates whether or not the total number of records of accessing the list is required, used for frontend pages.
1 = yes, 0 = no
ProductCode No String Queries information on a specified product
PayMode No String Billing mode: prePay/postPay
ResourceId No String Queries information on a specified resource

3. Output Parameters

Parameter Name Type Description
DetailSet Array of BillDetail Details list
Total Integer Total number of records
Note: This field may return null, indicating that no valid value was found.
RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

4. Example

Example1 Getting bill details

Input Example

https://billing.tencentcloudapi.com/?Action=DescribeBillDetail
&Month=2018-07
&PeriodType=byPayTime
&Offset=0
&Limit=1
&BeginTime=2018-11-01 00:00:00
&EndTime=2018-11-01 23:59:59
&NeedRecordNum=1
&ResourceId=ins-49zhx6z1
&<Common request parameters>

Output Example

{
    "Response": {
        "DetailSet": [
            {
                "PayerUin": "2384822478",
                "OwnerUin": "2384822478",
                "OperateUin": "2384822478",
                "BusinessCodeName": "CVM",
                "ProductCodeName": "CVM-Standard S2",
                "PayModeName": "Pay-as-you-go",
                "ProjectName": "Default project",
                "RegionName": "East China (Shanghai)",
                "ZoneName": "Shanghai Zone 2",
                "ResourceId": "ins-49zhx6z1",
                "ResourceName": "batch.env-g3bxot00",
                "ActionTypeName": "Pay-as-you-go deduction",
                “OrderId": "2018110100",
                "BillId": "20181101020000206326013129313996",
                "PayTime": "11/1/2018 12:10:03 AM",
                "FeeBeginTime": "10/31/2018 11:00:00 PM",
                "FeeEndTime": "11/1/2018 12:00:00 AM",
                "ComponentSet": [
                    {
                        "ComponentCodeName": "",
                        "ItemCodeName": "",
                        "SinglePrice": "0.25",
                        "SpecifiedPrice": "0.25",
                        "PriceUnit": "",
                        "UsedAmount": 1,
                        "UsedAmountUnit": "",
                        "TimeSpan": 2,
                        "TimeUnitName": "Second",
                        "Cost": "0.25",
                        "Discount": "1",
                        “ReduceType": "Discount",
                        "RealCost": "0.25",
                        "VoucherPayAmount": "0",
                        "CashPayAmount": "0.25",
                        "IncentivePayAmount": "0"
                    }
                ]
            }
        ],
        "Total": 593,
        "RequestId": "001053bd-c491-404d-abd6-a737d92726f7"
    }
}

5. Developer Resources

API Explorer

This tool allows online call, signature authentication, SDK code generation and quick search of APIs to greatly improve the efficiency of using TencentCloud APIs.

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

There is no error code related to the API business logic. For other error codes, please see Common Error Codes.