tencent cloud

피드백

DescribeBillSummaryByProduct

마지막 업데이트 시간:2024-05-16 15:10:02

    1. API Description

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

    Gets the bill summarized according to product

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

    We recommend you to use API Explorer
    Try it
    API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

    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 Params. The value used for this API: DescribeBillSummaryByProduct.
    Version Yes String Common Params. The value used for this API: 2018-07-09.
    Region No String Common Params. This parameter is not required.
    BeginTime Yes String The value must be of the same month as EndTime. Query period must start and end on the same month and the query result returned will be of the entire month. For example, if both BeginTime and EndTime are 2018-09, the data returned will be for the entire month of September 2018.
    EndTime Yes String The value must be of the same month as BeginTime. Query period must start and end on the same month and the query result returned will be of the entire month. For example, if both BeginTime and EndTime are 2018-09, the data returned will be for the entire month of September 2018.
    PayerUin No String Queries bill data user's UIN
    PayType No String A bill type, which corresponds to a subtotal type of L0 bills.
    This parameter has become valid since v3.0 bills took effect in May 2021.
    Valid values:
    consume: consumption
    refund: refund
    adjustment: bill adjustment

    3. Output Parameters

    Parameter Name Type Description
    Ready Integer Indicates whether the data is ready. 0: Not ready. 1: Ready. If Ready is 0, it indicates that the current UIN is initializing billing for the first time. Wait for 5-10 minutes and try again.
    SummaryTotal BusinessSummaryTotal Total cost details
    Note: This field may return null, indicating that no valid value was found.
    SummaryOverview Array of BusinessSummaryOverviewItem Cost distribution of all products
    Note: This field may return null, indicating that no valid value was found.
    RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

    4. Example

    Example1 Getting the bill summarized by product

    This example shows you how to get the bill summarized by product.

    Input Example

    POST / HTTP/1.1Host: billing.tencentcloudapi.comContent-Type: application/jsonX-TC-Action: DescribeBillSummaryByProduct<Common request parameters>{    "EndTime": "2018-11",    "BeginTime": "2018-11"}
    

    Output Example

    {
        "Response": {
            "Ready": 1,
            "SummaryTotal": {
                "RealTotalCost": "1458.00000000",
                "TotalCost": "1458.00000000",
                "VoucherPayAmount": "0.00000000",
                "IncentivePayAmount": "0.00000000",
                "CashPayAmount": "1458.00000000",
                "TransferPayAmount": "0.00000000"
            },
            "SummaryOverview": [
                {
                    "BusinessCode": "p_ssl",
                    "RealTotalCost": "1458.00000000",
                    "TotalCost": "1458.00000000",
                    "CashPayAmount": "1458.00000000",
                    "IncentivePayAmount": "0.00000000",
                    "VoucherPayAmount": "0.00000000",
                    "TransferPayAmount": "0.00000000",
                    "RealTotalCostRatio": "100.00",
                    "BillMonth": "2022-07",
                    "BusinessCodeName": "SSL Certificates"
                }
            ],
            "RequestId": "67cd3369-b022-4a6a-818e-7ba5a05cb5d7"
        }
    }
    

    5. Developer Resources

    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

    The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

    Error Code Description
    AuthFailure.UnauthorizedOperation No permission.
    InternalError Internal error.
    InternalError.GatewayError Gateway error.
    InternalError.UnknownError Undefined exception.
    InvalidParameter Invalid parameter.
    InvalidParameterValue Invalid parameter value.