tencent cloud

文档反馈

DescribeVoucherInfo

最后更新时间:2022-08-25 10:25:26

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 No String Common Params. This parameter is not required for this API.
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 time of the promotional campaign.
TimeTo No String The end time of the promotional campaign.
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.

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, which is returned for each request. RequestId is required for locating a problem.

4. Example

Example1 Querying vouchers

Input Example

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

Output Example

{
    "Response": {
        "TotalCount": 0,
        "TotalBalance": 0,
        "VoucherInfos": [
            {
                "Status": "overdue",
                "OwnerUin": "xx",
                "PayMode": "*postPay*",
                "NominalValue": 0,
                "PayScene": "all",
                "VoucherId": "xx",
                "EndTime": "xx",
                "Balance": 0,
                "BeginTime": "xx",
                "ApplicableProducts": {
                    "GoodsName": "All",
                    "PayMode": "*"
                },
                "ExcludedProducts": [
                    {
                        "GoodsName": "xxx",
                        "PayMode": "*"
                    },
                    {
                        "GoodsName": "xxx",
                        "PayMode": "*"
                    },
                    {
                        "GoodsName": "xxx",
                        "PayMode": "*"
                    },
                    {
                        "GoodsName": "xxx",
                        "PayMode": "*"
                    },
                    {
                        "GoodsName": "xxx",
                        "PayMode": "*"
                    },
                    {
                        "GoodsName": "xxx",
                        "PayMode": "*"
                    },
                    {
                        "GoodsName": "xxx",
                        "PayMode": "*"
                    },
                    {
                        "GoodsName": "xxx",
                        "PayMode": "*"
                    },
                    {
                        "GoodsName": "xxx",
                        "PayMode": "*"
                    }
                ]
            }
        ],
        "RequestId": "xx"
    }
}

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.
联系我们

联系我们,为您的业务提供专属服务。

技术支持

如果你想寻求进一步的帮助,通过工单与我们进行联络。我们提供7x24的工单服务。

7x24 电话支持