tencent cloud

文档反馈

DescribeBundleDiscount

最后更新时间:2023-12-04 16:31:53

    1. API Description

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

    This API is used to query the discount information of a package.

    A maximum of 10 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: DescribeBundleDiscount.
    Version Yes String Common Params. The value used for this API: 2020-03-24.
    Region No String Common Params. This parameter is not required for this API.
    BundleId Yes String Package ID.

    3. Output Parameters

    Parameter Name Type Description
    Currency String Currency: CNY, USD.
    DiscountDetail Array of DiscountDetail Discount tier details. The information of each tier includes the duration, discounted quantity, total price, discounted price, and discount details (user discount, official website discount, or final discount).
    RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

    4. Example

    Example1 Querying package discount (succeeded)

    This example shows you how to query package discount.

    Input Example

    https://lighthouse.tencentcloudapi.com/?Action=DescribeBundleDiscount
    &BundleId=bundle2022_gen_01
    &<Common request parameters>
    

    Output Example

    {
        "Response": {
            "Currency": "USD",
            "DiscountDetail": [
                {
                    "TimeSpan": 1,
                    "TimeUnit": "m",
                    "Discount": 100,
                    "PolicyDetail": {
                        "UserDiscount": 100,
                        "CommonDiscount": 100,
                        "ActivityDiscount": null,
                        "FinalDiscount": 100,
                        "DiscountType": null
                    },
                    "TotalCost": 50,
                    "RealTotalCost": 50
                },
                {
                    "TimeSpan": 2,
                    "TimeUnit": "m",
                    "Discount": 100,
                    "PolicyDetail": {
                        "UserDiscount": 100,
                        "CommonDiscount": 100,
                        "ActivityDiscount": null,
                        "FinalDiscount": 100,
                        "DiscountType": null
                    },
                    "TotalCost": 100,
                    "RealTotalCost": 100
                },
                {
                    "TimeSpan": 3,
                    "TimeUnit": "m",
                    "Discount": 100,
                    "PolicyDetail": {
                        "UserDiscount": 100,
                        "CommonDiscount": 100,
                        "ActivityDiscount": null,
                        "FinalDiscount": 100,
                        "DiscountType": null
                    },
                    "TotalCost": 150,
                    "RealTotalCost": 150
                },
                {
                    "TimeSpan": 4,
                    "TimeUnit": "m",
                    "Discount": 100,
                    "PolicyDetail": {
                        "UserDiscount": 100,
                        "CommonDiscount": 100,
                        "ActivityDiscount": null,
                        "FinalDiscount": 100,
                        "DiscountType": null
                    },
                    "TotalCost": 200,
                    "RealTotalCost": 200
                },
                {
                    "TimeSpan": 5,
                    "TimeUnit": "m",
                    "Discount": 100,
                    "PolicyDetail": {
                        "UserDiscount": 100,
                        "CommonDiscount": 100,
                        "ActivityDiscount": null,
                        "FinalDiscount": 100,
                        "DiscountType": null
                    },
                    "TotalCost": 250,
                    "RealTotalCost": 250
                },
                {
                    "TimeSpan": 6,
                    "TimeUnit": "m",
                    "Discount": 88,
                    "PolicyDetail": {
                        "UserDiscount": 100,
                        "CommonDiscount": 88,
                        "ActivityDiscount": 100,
                        "FinalDiscount": 88,
                        "DiscountType": "common"
                    },
                    "TotalCost": 300,
                    "RealTotalCost": 264
                },
                {
                    "TimeSpan": 7,
                    "TimeUnit": "m",
                    "Discount": 88,
                    "PolicyDetail": {
                        "UserDiscount": 100,
                        "CommonDiscount": 88,
                        "ActivityDiscount": 100,
                        "FinalDiscount": 88,
                        "DiscountType": "common"
                    },
                    "TotalCost": 350,
                    "RealTotalCost": 308
                },
                {
                    "TimeSpan": 8,
                    "TimeUnit": "m",
                    "Discount": 88,
                    "PolicyDetail": {
                        "UserDiscount": 100,
                        "CommonDiscount": 88,
                        "ActivityDiscount": 100,
                        "FinalDiscount": 88,
                        "DiscountType": "common"
                    },
                    "TotalCost": 400,
                    "RealTotalCost": 352
                },
                {
                    "TimeSpan": 9,
                    "TimeUnit": "m",
                    "Discount": 88,
                    "PolicyDetail": {
                        "UserDiscount": 100,
                        "CommonDiscount": 88,
                        "ActivityDiscount": 100,
                        "FinalDiscount": 88,
                        "DiscountType": "common"
                    },
                    "TotalCost": 450,
                    "RealTotalCost": 396
                },
                {
                    "TimeSpan": 10,
                    "TimeUnit": "m",
                    "Discount": 88,
                    "PolicyDetail": {
                        "UserDiscount": 100,
                        "CommonDiscount": 88,
                        "ActivityDiscount": 100,
                        "FinalDiscount": 88,
                        "DiscountType": "common"
                    },
                    "TotalCost": 500,
                    "RealTotalCost": 440
                },
                {
                    "TimeSpan": 11,
                    "TimeUnit": "m",
                    "Discount": 88,
                    "PolicyDetail": {
                        "UserDiscount": 100,
                        "CommonDiscount": 88,
                        "ActivityDiscount": 100,
                        "FinalDiscount": 88,
                        "DiscountType": "common"
                    },
                    "TotalCost": 550,
                    "RealTotalCost": 484
                },
                {
                    "TimeSpan": 12,
                    "TimeUnit": "m",
                    "Discount": 85,
                    "PolicyDetail": {
                        "UserDiscount": 100,
                        "CommonDiscount": 85,
                        "ActivityDiscount": 100,
                        "FinalDiscount": 85,
                        "DiscountType": "common"
                    },
                    "TotalCost": 600,
                    "RealTotalCost": 510
                },
                {
                    "TimeSpan": 24,
                    "TimeUnit": "m",
                    "Discount": 85,
                    "PolicyDetail": {
                        "UserDiscount": 100,
                        "CommonDiscount": 85,
                        "ActivityDiscount": 100,
                        "FinalDiscount": 85,
                        "DiscountType": "common"
                    },
                    "TotalCost": 1200,
                    "RealTotalCost": 1020
                },
                {
                    "TimeSpan": 36,
                    "TimeUnit": "m",
                    "Discount": 85,
                    "PolicyDetail": {
                        "UserDiscount": 100,
                        "CommonDiscount": 85,
                        "ActivityDiscount": 100,
                        "FinalDiscount": 85,
                        "DiscountType": "common"
                    },
                    "TotalCost": 1800,
                    "RealTotalCost": 1530
                },
                {
                    "TimeSpan": 48,
                    "TimeUnit": "m",
                    "Discount": 85,
                    "PolicyDetail": {
                        "UserDiscount": 100,
                        "CommonDiscount": 85,
                        "ActivityDiscount": 100,
                        "FinalDiscount": 85,
                        "DiscountType": "common"
                    },
                    "TotalCost": 2400,
                    "RealTotalCost": 2040
                },
                {
                    "TimeSpan": 60,
                    "TimeUnit": "m",
                    "Discount": 85,
                    "PolicyDetail": {
                        "UserDiscount": 100,
                        "CommonDiscount": 85,
                        "ActivityDiscount": 100,
                        "FinalDiscount": 85,
                        "DiscountType": "common"
                    },
                    "TotalCost": 3000,
                    "RealTotalCost": 2550
                }
            ],
            "RequestId": "859918e4-78c9-4aa5-a2fc-c2e00fea4d33"
        }
    }
    

    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
    FailedOperation Operation failed.
    FailedOperation.DescribeBundleDiscountFailed
    FailedOperation.RequestError A request error occurred.
    FailedOperation.TradeGetPriceFailed Failed to query the price.
    InternalError.InvalidCommandNotFound The command is not found.
    InternalError.RequestError There was an error in the request.
    InternalError.TradeGetPriceFailed Failed to get the price.
    InvalidParameter.BundleIdNotFound Undefined service package ID.
    ResourceUnavailable.BundleUnavailable The package is not available.