最近更新时间:2025-08-15 18:26:13
本文档为您介绍查询计费项账单。只支持查询202111开始的数据。
注意:分页基于es search_after 进行深度分页查询,LastSortValue为上次查询排序字段结果名称 | 必选 | 类型 | 描述 |
|---|---|---|---|
Action | 是 | String | 操作接口名,系统规定参数,取值: |
Version | 是 | String | API版本,固定为 |
CustomerBillMonth | 是 | Integer | 账期,yyyyMM。如:202508 |
ProductGroupCode | 否 | String | 产品线 code |
InstanceId | 否 | String | 实例ID |
PayType | 否 | Integer | 计费类别,0(预付费),1(实时付费),2(后付费) |
SubAccountId | 否 | Long | 主账号所托管的账号Id |
LastSortValue | 否 | String | 上次查询排序值LastSortValue,基于es search_after |
Size | 否 | Integer | 每页条数,默认 20,最多1000 |
名称 | 类型 | 描述 |
|---|---|---|
RequestId | String | 当前请求的RequestId |
CustomerBillMonth | Integer | 账期 |
BillMonth | Integer | 账单月 |
UserId | Long | 客户Id |
UserName | String | 客户名称 |
SellerCompanyName | String | 合同主体 |
productGroupName | String | 产品线 |
productTypeName | String | 产品类型 |
billDetailTypeName | String | 账单类型 |
payTypeName | String | 计费类别 |
InstanceId | String | 实例Id |
InstanceName | String | 实例名称 |
ProjectId | Long | 项目 Id |
ProjectName | String | 项目名称 |
RegionName | String | 机房 |
AvailabilityZone | String | 可用区 |
BillStartTime | String | 账单开始时间 |
BillEndTime | String | 账单结束时间 |
ServiceBeginTime | String | 服务开始时间 |
Duration | String | 服务时长 |
DurationUnit | String | 时长单位 |
pkgCode | String | 实例规格 |
ConfigInfo | Array | 实例配置 |
ItemName | String | 计费项 |
ItemPrice | String | 单价 |
ItemPriceUnit | String | 单价单位 |
ItemPriceDesc | String | 单价描述 |
BillItemValue | String | 用量 |
BillItemUnit | String | 用量单位 |
BillItemCount | String | 计费个数 |
PriceFactorInfo | Array | 价格影响因子 |
ExtraInfo | JSON数组 | 附属信息 |
TagInfo | JSON数组 | 标签信息 |
OriginalAmount | String | 原价 |
Discount | String | 折扣 |
BillRealAmount | String | 成交价 |
Cash | String | 现金应付 |
Reward | String | 赠送金 |
Vouchers | String | 券抵扣 |
CloudTicketDenomination | String | 云票支付 |
CurrencyCode | String | 币种 |
billTypeName | String | 计费方式 |
RuleRemark | String | 说明 |
错误代码(Code) | 错误消息(Message) | HTTP 状态码 | 中文描述(语义) |
|---|---|---|---|
InvalidParameter | There is one or more invalid parameter(%s)." | 400 | 参数%s错误,具体参数名在%s说明 |
Forbidden Request | user %s forbidden request this api" | 400 | 用户禁止请求API,用户uid在%s指名 |
Server unavailable | Server error | 500 | 后端服务异常 |
请求示例
curl -X POST
'http://bill_union.api.ksyun.com/?Action=QueryItemBills&Version=2025-08-01'
-H 'authorization: xxx, SignedHeaders=content-type;host;x-amz-date, Signature=xxx'
-H 'cache-control: no-cache'
-H 'content-type: application/json'
-H 'host: bill-union.api.ksyun.com'
-H 'x-amz-date: 20170720T022802Z'
-d '{"CustomerBillMonth":"xxx","ProductGroupCode":"xxx","PayType":"xxx","InstanceId":"xxx","SubAccountId":"xxx","Size":20,"LastSortValue":"xxx"}'{
"Data": {
"LastSortValue": "H4sIAAAAAAAA/4s2NTK0MLbQUTIwMwtMjUp3Ko8PKfVIq8grTosvV4oFANHKjU4fAAAA",
"PageSize": 1,
"Results": [
{
"AliasName": "",
"AvailabilityZone": "",
"BillCycle": "日",
"BillDetailType": 1,
"BillDetailTypeName": "消费",
"BillEndTime": "2025-06-02 00:00:00",
"BillItemCode": "SpaceUsedBytes",
"BillItemCount": 1,
"BillItemType": 1,
"BillItemUnit": "GB",
"BillItemValue": "0.0268",
"BillMonth": 202506,
"BillRealAmount": 0,
"BillStartTime": "2025-06-01 00:00:00",
"BillType": 86,
"BillTypeName": "按量付费(流量)",
"Cash": 0,
"CloudTicketDenomination": 0,
"ConfigInfo": [
"存储空间(GB):0.0268",
"分区数量(个):1.0000"
],
"ContractItemPrice": "0.011",
"ContractItemPriceUnit": "GB/天",
"CurrencyCode": "CNY",
"CurrencyInfo": "CNY/1",
"CustomerBillMonth": 202506,
"Discount": "-",
"Duration": "86400",
"DurationNumber": 86400,
"DurationUnit": "秒",
"Email": "",
"ExchangeRate": 1,
"ExtraInfo": [
],
"Id": "00000000000",
"InstanceId": "instanceId",
"InstanceName": "",
"ItemName": "存储空间",
"ItemPrice": "0.011",
"ItemPriceUnit": "GB/天",
"KisCity": "",
"LoginName": "test",
"MembershipGroup": "",
"OriginalAmount": "0.0002948",
"PayType": 1,
"PayTypeName": "按量付费",
"PriceFactorInfo": [
],
"ProductGroupId": 232,
"ProductGroupName": "日志服务",
"ProductTypeId": 435,
"ProductTypeName": "日志服务",
"ProjectId": 0,
"ProjectName": "默认项目",
"RegionCode": "cn-beijing-6",
"RegionName": "华北1(北京)",
"ResourceDeductionInfo": [
],
"Reward": 0,
"RuleRemark": "",
"SellerCompanyName": "金山云",
"ServiceBeginTime": "2024-08-27 19:13:17",
"TagInfo": [
],
"UserId": 1234567,
"Vouchers": 0
}
]
},
"RequestId": "dfeba10e-3b3f-224c-0809-eabc2814c886",
"Success": true
}<OpenApiResp>
<Success>true</Success>
<RequestId>0fcf20f6-0470-158e-6743-b3c135bb735a</RequestId>
<Data>
<PageSize>1</PageSize>
<Results>
<AliasName/>
<Email/>
<UserId>1234567</UserId>
<UserName>北京哈米科技有限公司</UserName>
<SellerCompanyName>金山云</SellerCompanyName>
<BillMonth>202506</BillMonth>
<CustomerBillMonth>202506</CustomerBillMonth>
<CurrencyCode>CNY</CurrencyCode>
<CurrencyInfo>CNY/1</CurrencyInfo>
<ExchangeRate>1</ExchangeRate>
<LoginName/>
<Id>00000000000null</Id>
<BillStartTime>2025-06-01 00:00:00</BillStartTime>
<BillEndTime>2025-06-01 01:00:00</BillEndTime>
<InstanceId>instanceId</InstanceId>
<InstanceName/>
<ProductTypeId>398</ProductTypeId>
<ProductTypeName>普通快照</ProductTypeName>
<ProductGroupId>212</ProductGroupId>
<ProductGroupName>快照</ProductGroupName>
<PayType>1</PayType>
<BillRealAmount>0.02</BillRealAmount>
<OriginalAmount>0.02622167</OriginalAmount>
<RegionCode>TJWQRegion</RegionCode>
<ProjectId>0</ProjectId>
<ProjectName>默认项目</ProjectName>
<RegionName>华北1(北京)</RegionName>
<BillType>809</BillType>
<BillTypeName>按量付费 (小时用量)</BillTypeName>
<PayTypeName>按量付费</PayTypeName>
<BillDetailType>1</BillDetailType>
<BillDetailTypeName>消费</BillDetailTypeName>
<Duration>3600</Duration>
<DurationUnit>秒</DurationUnit>
<DurationNumber>3600</DurationNumber>
<RuleRemark/>
<AvailabilityZone/>
<Discount>-</Discount>
<Cash>0.02</Cash>
<Reward>0</Reward>
<Vouchers>0</Vouchers>
<CloudTicketDenomination>0</CloudTicketDenomination>
<ServiceBeginTime>2020-07-29 18:21:34</ServiceBeginTime>
<ConfigInfo>storage(G):154.2451</ConfigInfo>
<BillItemType>1</BillItemType>
<BillItemCode>storage</BillItemCode>
<ItemName>storage</ItemName>
<ItemPrice>0.00017</ItemPrice>
<ItemPriceUnit>G/小时</ItemPriceUnit>
<BillItemValue>154.2451</BillItemValue>
<BillItemUnit>G</BillItemUnit>
<BillItemCount>1</BillItemCount>
<ContractItemPrice>0.00017</ContractItemPrice>
<ContractItemPriceUnit>G/小时</ContractItemPriceUnit>
<BillCycle>小时</BillCycle>
<KisCity/>
</Results>
<LastSortValue>H4sIAAAAAAAA/4s2tDTRUUou9PZLjUp3Ko8PKfVIq8gzKIgwUooFAKPFyeUcAAAA</LastSortValue>
</Data>
<Error/>
</OpenApiResp>
纯净模式