1. 接口描述
接口请求域名: billing.tencentcloudapi.com 。
查询分账账单明细
默认接口请求频率限制:20次/秒。
推荐使用 API Explorer
点击调试
API Explorer 提供了在线调用、签名验证、SDK 代码生成和快速检索接口等能力。您可查看每次调用的请求内容和返回结果以及自动生成 SDK 调用示例。
2. 输入参数
以下请求参数列表仅列出了接口请求参数和部分公共参数,完整公共参数列表见 公共请求参数。
参数名称 | 必选 | 类型 | 描述 |
---|---|---|---|
Action | 是 | String | 公共参数,本接口取值:DescribeAllocationBillDetail。 |
Version | 是 | String | 公共参数,本接口取值:2018-07-09。 |
Region | 否 | String | 公共参数,此参数为可选参数。 |
Limit | 是 | Integer | 数量,最大值为1000 示例值:10 |
Offset | 是 | Integer | 分页偏移量,Offset=0表示第一页,如果Limit=100,则Offset=100表示第二页,Offset=200表示第三页,以此类推 示例值:0 |
Month | 否 | String | 账单月份,格式为2024-02,不传默认当前月 示例值:2024-02 |
TreeNodeUniqKeys.N | 否 | Array of String | 分账单元唯一标识,用作筛选 示例值:xxx |
Sort | 否 | String | 排序字段,枚举值如下: RiTimeSpan - 预留实例抵扣时长 ExtendPayAmount1 - 预留实例抵扣组件原价 RealCost - 折后总价 CashPayAmount - 现金金额 VoucherPayAmount - 代金券金额 IncentivePayAmount - 赠送金金额 TransferPayAmount -分成金金额 Cost - 组件原价 示例值:realCost |
SortType | 否 | String | 排序类型,枚举值如下: asc - 升序 desc - 降序 示例值:asc |
BusinessCodes.N | 否 | Array of String | 产品编码,用作筛选 示例值:p_cvm |
OwnerUins.N | 否 | Array of String | 使用者UIN,用作筛选 示例值:909619400 |
OperateUins.N | 否 | Array of String | 操作者UIN,用作筛选 示例值:909619400 |
PayModes.N | 否 | Array of String | 计费模式编码,用作筛选 示例值:postPay |
ActionTypes.N | 否 | Array of String | 交易类型编码,用作筛选 示例值:prepay_renew |
ProductCodes.N | 否 | Array of String | 子产品编码,用作筛选 示例值:sp_cvm_c4 |
RegionIds.N | 否 | Array of String | 地域ID,用作筛选 示例值:0 |
ZoneIds.N | 否 | Array of String | 可用区ID,用作筛选 示例值:0 |
InstanceTypes.N | 否 | Array of String | 实例类型编码,用作筛选 示例值:ri |
Tag.N | 否 | Array of String | 标签,用作筛选 示例值:tagKey:tagValue |
ComponentCodes.N | 否 | Array of String | 组件类型编码,用作筛选 示例值:virtual_v_cvm_compute |
ItemCodes.N | 否 | Array of String | 组件名称编码,用作筛选 |
SearchKey | 否 | String | 模糊搜索:支持标签、资源id、资源别名 示例值:xxx |
ProjectIds.N | 否 | Array of Integer | 项目ID,用作筛选 示例值:0 |
3. 输出参数
参数名称 | 类型 | 描述 |
---|---|---|
RecordNum | Integer | 总条数 注意:此字段可能返回 null,表示取不到有效值。 示例值:123 |
Total | AllocationOverviewTotal | 分账账单概览金额汇总 注意:此字段可能返回 null,表示取不到有效值。 |
Detail | Array of AllocationDetail | 分账账单明细 |
RequestId | String | 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 |
4. 示例
示例1 查询分账明细
查询分账明细
输入示例
POST / HTTP/1.1
Host: billing.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeAllocationBillDetail
<公共请求参数>
{
"Month": "2023-02-01 00:00:00",
"Limit": 2,
"Offset": 1
}
输出示例
{
"Response": {
"Detail": [
{
"ActionType": "postpay_deduct_h",
"ActionTypeName": "按量计费小时结",
"BillDate": "2023-02-05",
"BillId": "20230205400491987853552",
"BlendedDiscount": "0.33548100",
"BusinessCode": "p_eks",
"BusinessCodeName": "Serverless 容器服务",
"CashPayAmount": "0.01677073",
"ComponentCode": "v_eks_mem",
"ComponentCodeName": "内存",
"ContractPrice": "0.00000466",
"Discount": "0.33548100",
"FeeBeginTime": "2023-02-05 10:00:00",
"FeeEndTime": "2023-02-05 10:59:59",
"IncentivePayAmount": "0.00000000",
"InstanceType": null,
"InstanceTypeName": "-",
"ItemCode": "sv_eks_mem",
"ItemCodeName": "弹性容器服务EKS-内存",
"OperateUin": "909619400",
"OrderId": "-",
"OwnerUin": "909619400",
"PayMode": "postPay",
"PayModeName": "按量计费",
"PayTime": "2023-02-05 11:46:29",
"PayerUin": "909619400",
"ProductCode": "sp_eks_standard_pod",
"ProductCodeName": "弹性容器服务EKS-Pod",
"ProjectId": 0,
"ProjectName": null,
"RICost": "0.00000000",
"RITimeSpan": "0.00000000",
"RealTotalCost": "0.01677073",
"RegionId": 1,
"RegionName": "华南地区(广州)",
"RegionType": "domestic",
"RegionTypeName": "国内",
"ReserveDetail": "",
"ResourceId": "eks-bzmzprry",
"ResourceName": null,
"SPCost": "0.00000000",
"SinglePrice": "0.00001389",
"SinglePriceUnit": "元/GiB/秒",
"SplitRatio": "0.00000000",
"Tag": null,
"TimeSpan": "3599.00000000",
"TimeUnit": "秒",
"TotalCost": "0.04999011",
"TransferPayAmount": "0.00000000",
"TreeNodeUniqKey": null,
"TreeNodeUniqKeyName": "未分配",
"UsedAmount": "1.00000000",
"UsedAmountUnit": "GiB",
"VoucherPayAmount": "0.00000000",
"ZoneId": 100004,
"ZoneName": "广州四区"
},
{
"ActionType": "postpay_deduct_h",
"ActionTypeName": "按量计费小时结",
"BillDate": "2023-02-05",
"BillId": "20230205400491961266162",
"BlendedDiscount": "0.33548100",
"BusinessCode": "p_eks",
"BusinessCodeName": "Serverless 容器服务",
"CashPayAmount": "0.01677073",
"ComponentCode": "v_eks_mem",
"ComponentCodeName": "内存",
"ContractPrice": "0.00000466",
"Discount": "0.33548100",
"FeeBeginTime": "2023-02-05 09:00:00",
"FeeEndTime": "2023-02-05 09:59:59",
"IncentivePayAmount": "0.00000000",
"InstanceType": null,
"InstanceTypeName": "-",
"ItemCode": "sv_eks_mem",
"ItemCodeName": "弹性容器服务EKS-内存",
"OperateUin": "909619400",
"OrderId": "-",
"OwnerUin": "909619400",
"PayMode": "postPay",
"PayModeName": "按量计费",
"PayTime": "2023-02-05 11:09:31",
"PayerUin": "909619400",
"ProductCode": "sp_eks_standard_pod",
"ProductCodeName": "弹性容器服务EKS-Pod",
"ProjectId": 0,
"ProjectName": null,
"RICost": "0.00000000",
"RITimeSpan": "0.00000000",
"RealTotalCost": "0.01677073",
"RegionId": 1,
"RegionName": "华南地区(广州)",
"RegionType": "domestic",
"RegionTypeName": "国内",
"ReserveDetail": "",
"ResourceId": "eks-bzmzprry",
"ResourceName": null,
"SPCost": "0.00000000",
"SinglePrice": "0.00001389",
"SinglePriceUnit": "元/GiB/秒",
"SplitRatio": "0.00000000",
"Tag": null,
"TimeSpan": "3599.00000000",
"TimeUnit": "秒",
"TotalCost": "0.04999011",
"TransferPayAmount": "0.00000000",
"TreeNodeUniqKey": null,
"TreeNodeUniqKeyName": "未分配",
"UsedAmount": "1.00000000",
"UsedAmountUnit": "GiB",
"VoucherPayAmount": "0.00000000",
"ZoneId": 100004,
"ZoneName": "广州四区"
}
],
"RecordNum": 33751,
"RequestId": "48d52cbc-2297-4ba5-a322-de477fed6329",
"Total": {
"CashPayAmount": "99034.51148297",
"IncentivePayAmount": "0.00000000",
"RealTotalCost": "99067.91144815",
"TransferPayAmount": "0.00000000",
"VoucherPayAmount": "130.94995680"
}
}
}
5. 开发者资源
腾讯云 API 平台
腾讯云 API 平台 是综合 API 文档、错误码、API Explorer 及 SDK 等资源的统一查询平台,方便您从同一入口查询及使用腾讯云提供的所有 API 服务。
API Inspector
用户可通过 API Inspector 查看控制台每一步操作关联的 API 调用情况,并自动生成各语言版本的 API 代码,也可前往 API Explorer 进行在线调试。
SDK
云 API 3.0 提供了配套的开发工具集(SDK),支持多种编程语言,能更方便的调用 API。
- Tencent Cloud SDK 3.0 for Python: GitHub Gitee
- Tencent Cloud SDK 3.0 for Java: GitHub Gitee
- Tencent Cloud SDK 3.0 for PHP: GitHub Gitee
- Tencent Cloud SDK 3.0 for Go: GitHub Gitee
- Tencent Cloud SDK 3.0 for Node.js: GitHub Gitee
- Tencent Cloud SDK 3.0 for .NET: GitHub Gitee
- Tencent Cloud SDK 3.0 for C++: GitHub Gitee
- Tencent Cloud SDK 3.0 for Ruby: GitHub Gitee
命令行工具
6. 错误码
以下仅列出了接口业务逻辑相关的错误码,其他错误码详见 公共错误码。
错误码 | 描述 |
---|---|
AuthFailure | CAM签名/鉴权错误。 |
AuthFailure.UnauthorizedOperation | 没有权限。 |
InternalError | 内部错误。 |
InvalidParameter | 参数错误。 |
InvalidParameterValue | 参数取值错误。 |
MissingParameter | 缺少参数错误。 |