tencent cloud

フィードバック

DescribeVoucherInfo

最終更新日:2024-05-16 15:10:21

    1. API Description

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

    This API is used to query vouchers.

    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: DescribeVoucherInfo.
    Version Yes String Common Params. The value used for this API: 2018-07-09.
    Region Yes String Common Params. For more information, please see the list of regions supported by the product.
    Limit Yes Integer The number of records per page. The default is 20, and the maximum is 1,000.
    Offset Yes Integer The page number the records start from. The default is 1.
    Status No String The voucher status. Valid values: unUsed, used, delivered, cancel, overdue.
    VoucherId No String The voucher ID.
    CodeId No String The voucher order ID.
    ProductCode No String The product code.
    ActivityId No String The campaign ID.
    VoucherName No String The voucher name.
    TimeFrom No String The start date of the voucher issuance, such as 2021-01-01.
    TimeTo No String The end date of the voucher issuance, such as 2021-01-01.
    SortField No String The field used to sort the records. Valid values: BeginTime, EndTime, CreateTime.
    SortOrder No String Whether to sort the records in ascending or descending order. Valid values: desc, asc.
    PayMode No String The payment mode. Valid values: postPay: pay-as-you-go; prePay: prepaid; riPay: reserved instance; empty or *: all. If this parameter is empty or *, productCode and subProductCode must also be empty.
    PayScene No String If PayMode is postPay, this parameter may be spotpay (spot instance) or settle account (regular pay-as-you-go). If PayMode is prePay, this parameter may be purchase, renew, or modify (downgrade/upgrade). If PayMode is riPay, this parameter may be oneOffFee (prepayment of reserved instance) or hourlyFee (hourly billing of reserved instance). * means to query vouchers that support all billing scenarios.
    Operator No String The operator. The default is the UIN of the current user.
    VoucherMainType No String The primary types of vouchers are has_price and no_price, which represent the cash voucher with a price and the cash voucher without a price respectively.
    VoucherSubType No String Voucher subtype: Discount is a discount voucher, and deduct is a deduction voucher.

    3. Output Parameters

    Parameter Name Type Description
    TotalCount Integer The total number of vouchers.
    TotalBalance Integer The total voucher balance. The value of this parameter is the total balance (USD, rounded to 8 decimal places) multiplied by 100,000,000.
    VoucherInfos Array of VoucherInfos The voucher information.
    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 Querying vouchers

    This example shows you how to query vouchers.

    Input Example

    https://billing.tencentcloudapi.com/?Action=DescribeVoucherInfo
    &Limit=10
    &Offset=1
    &<Common request parameters>
    

    Output Example

    {
        "Response": {
            "RequestId": "9988deda-d6b4-4c74-9bbf-b3f0cd4f5dba",
            "TotalBalance": 42000000000,
            "TotalCount": 2,
            "VoucherInfos": [
                {
                    "ApplicableProducts": {
                        "GoodsName": "All",
                        "PayMode": "*"
                    },
                    "Balance": 12000000000,
                    "BeginTime": "2023-01-10 14:42:17",
                    "EndTime": "2023-04-10 14:42:17",
                    "ExcludedProducts": [
                        {
                            "GoodsName": "Domains",
                            "PayMode": "*"
                        },
                        {
                            -
                            "PayMode": "*"
                        },
                        {
                            -
                            "PayMode": "*"
                        },
                        {
                            -
                            "PayMode": "*"
                        },
                        {
                            "GoodsName": "Savings Plan",
                            "PayMode": "*"
                        }
                    ],
                    "NominalValue": 30000000000,
                    "OwnerUin": "100026601318",
                    "PayMode": "*",
                    "PayScene": "settle account",
                    "Status": "unUsed",
                    "VoucherId": "OZRCGNAV5AB9H9ECMP1VVP"
                },
                {
                    "ApplicableProducts": {
                        "GoodsName": "All",
                        "PayMode": "*"
                    },
                    "Balance": 30000000000,
                    "BeginTime": "2023-02-07 16:40:45",
                    "EndTime": "2023-05-08 16:40:45",
                    "ExcludedProducts": [
                        {
                            "GoodsName": "Domains",
                            "PayMode": "*"
                        },
                        {
                            -
                            "PayMode": "*"
                        },
                        {
                            -
                            "PayMode": "*"
                        },
                        {
                            -
                            "PayMode": "*"
                        },
                        {
                            "GoodsName": "Savings Plan",
                            "PayMode": "*"
                        }
                    ],
                    "NominalValue": 30000000000,
                    "OwnerUin": "100026601318",
                    "PayMode": "*",
                    "PayScene": "settle account",
                    "Status": "unUsed",
                    "VoucherId": "OZRCGNAV8D9BMI9KMG1FIQ"
                }
            ]
        }
    }
    

    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.InvalidAppId Invalid App ID.
    InternalError Internal error.
    InternalError.GatewayError Gateway error.
    InvalidParameter Invalid parameter.
    UnauthorizedOperation.CamNoAuth The account does not have CAM permission.
    お問い合わせ

    カスタマーサービスをご提供できるため、ぜひお気軽にお問い合わせくださいませ。

    テクニカルサポート

    さらにサポートが必要な場合は、サポートチケットを送信して弊社サポートチームにお問い合わせください。24時間365日のサポートをご提供します。

    電話サポート(24 時間365日対応)