产品月度账单
更新时间:2026-08-04
OPEN API 产品月度账单
产品月度账单接口
接口描述
获取产品月度账单详情。企业组织财务管理中的主账户可以查询子账户的账单详情。加入财务圈的子账户会屏蔽代金券之外的其他金额。子用户要发起该请求,需要具有多用户访问控制的管理员权限或者 FCFullControlPolicy 多用户访问控制策略管理权限。默认接口请求频率限制:20 次/秒。
支持两种查询口径:
- 按月查询:传
billMonth(yyyy-MM)。 - 按天区间查询:传
startDay+endDay(yyyy-MM-dd),须为同一自然月。
两者至少传一组;若同时传入,billMonth 须与天区间同月。
权限说明
请求发起人需要具有合法的 AccessKeyID 和 SecretAccessKey 才能发起请求,请参考鉴权认证。
注意事项
如果请求中没有用户验证信息(即匿名访问),返回 403 Forbidden,错误信息:AccessDenied。
请求结构与示例
Http
1GET /v{version}/bill/month/summary?billMonth={month}&startDay={startDay}&endDay={endDay}&productType={productType}&serviceType={serviceType}&queryAccountId={queryAccountId} HTTP/1.1
2Host: billing.baidubce.com
3ContentType: application/json
4Authorization: authorization string
按月查询示例:
Http
1GET /v1/bill/month/summary?billMonth=2026-08 HTTP/1.1
按天区间查询示例:
Http
1GET /v1/bill/month/summary?startDay=2026-08-01&endDay=2026-08-03 HTTP/1.1
请求头域
除公共头域外,无其它特殊头域。
请求参数
| 名称 | 类型 | 参数位置 | 是否必填 | 描述 |
|---|---|---|---|---|
| billMonth | String | Query 参数 | 否 | 查询账单月份,yyyy-MM 字符串。与 startDay/endDay 二选一;若与天区间同传,须为同一自然月。 |
| startDay | String | Query 参数 | 否 | 查询天区间起始日,yyyy-MM-dd 字符串。须与 endDay 成对出现且为同一自然月;传入后按天区间查询。 |
| endDay | String | Query 参数 | 否 | 查询天区间结束日,yyyy-MM-dd 字符串。须与 startDay 成对出现,endDay ≥ startDay(可为同一天);支持查当天,不支持查未来。 |
| serviceType | String | Query 参数 | 否 | 产品名称。 |
| productType | String | Query 参数 | 否 | 产品计费类型,取值 prepay(预付费)/ postpay(后付费),不传为全部。 |
| queryAccountId | String | Query 参数 | 否 | 查询账号 id。 |
参数约束说明
billMonth与(startDay,endDay)至少传一组;两者可同时传,但必须为同一自然月。startDay/endDay必须成对出现,只传其一返回 400。- 天区间必须在同一自然月内,不支持跨月;
endDay不早于startDay(允许相等)。 - 查询起始日不早于 2019-02-01。
- 天区间支持查当天、不支持查未来(
endDay不得晚于今天);查当天为近实时数据,约有 2 小时延迟。
返回参数
ProductMonthBillSummaryResponse
| 名称 | 类型 | 描述 |
|---|---|---|
| billBeginTime | String | 账单查询起始时间。按月查询返回当月起始日;按天区间查询返回所查区间起始日(yyyy-MM-dd)。 |
| billEndTime | String | 账单查询结束时间。按月查询返回当月结束日;按天区间查询返回所查区间结束日(yyyy-MM-dd)。 |
| accountId | String | 当前账户不是财务圈子账户时,返回当前账户 accountId;是财务圈子账户时,返回当前账户主账户的 accountId。 |
| loginName | String | 账户登录名,若查询子账户,则为主账户登录名。 |
| subAccountId | String | 当前账户不是财务圈子账户时,返回"/";是财务圈子账户时,返回当前账户的 accountId。 |
| subLoginName | String | 当前账户不是财务圈子账户时,返回"/";是财务圈子账户时,返回当前账户的登录名。 |
| ouName | String | 当前账户不是财务圈子账户时,返回"/";是财务圈子账户时,返回当前账户所在组织单元的单元名。 |
| data | ProductMonthBillItem | 账单金额详情。 |
ProductMonthBillItem
| 名称 | 类型 | 描述 |
|---|---|---|
| serviceType | String | 产品名;all 则为全部产品。 |
| serviceTypeName | String | 产品中文名;all 则为全部产品。 |
| productType | String | 付费类型。 |
| originPrice | BigDecimal | 账单金额。 |
| promotionPrice | BigDecimal | 促销优惠金额。 |
| catalogPrice | BigDecimal | 目录价。 |
| financePrice | BigDecimal | 应付金额。 |
| cash | BigDecimal | 现金支付。 |
| rebate | BigDecimal | 返点支付。 |
| creditCost | BigDecimal | 账期未还。 |
| creditRefund | BigDecimal | 账期退款。 |
| creditRefundDeduct | BigDecimal | 账期退款抵扣。 |
| debt | BigDecimal | 欠费金额。 |
| noPaidPrice | BigDecimal | 优惠金额。 |
| couponPrice | BigDecimal | 代金券支付。 |
| discountCouponPrice | BigDecimal | 折扣券支付。 |
| discountPrice | BigDecimal | 折扣金额。 |
| cashEquivalentCouponPrice | BigDecimal | 现金等额券金额。 |
| sysGold | BigDecimal | 销账金额。 |
| unconfirmPrice | BigDecimal | 待确认金额。 |
| deductPrice | BigDecimal | 特殊调减总金额。 |
| deductCash | BigDecimal | 现金调减退款。 |
| deductRebate | BigDecimal | 返点调减退款。 |
| deductCreditCost | BigDecimal | 账期调减退款。 |
| deductCouponPrice | BigDecimal | 代金券调减。 |
| deductDiscountCouponPrice | BigDecimal | 折扣券调减金额。 |
| deductDiscountPrice | BigDecimal | 折扣调减金额。 |
| deductCashEquivalentCouponPrice | BigDecimal | 现金券调减金额。 |
| savingPlanDeductPrice | BigDecimal | 节省计划抵扣金额。 |
| items | ProductMonthBillItem | 子项(各产品明细)。 |
说明:
data为全部产品汇总(serviceType=all),其items为各产品明细。响应结构在按月/按天区间两种查询下完全一致,字段无增减。
响应示例
以下为按天区间查询 startDay=2026-08-01&endDay=2026-08-03 的响应示例(金额为示意):
JSON
1{
2 "billBeginTime": "2026-08-01",
3 "billEndTime": "2026-08-03",
4 "accountId": "{accountId}",
5 "loginName": "{loginName}",
6 "subAccountId": "/",
7 "subLoginName": "/",
8 "ouName": "/",
9 "data": {
10 "serviceType": "all",
11 "serviceTypeName": "全部产品",
12 "productType": "all",
13 "originPrice": 22524189.76,
14 "promotionPrice": 85975315.94,
15 "catalogPrice": 108499505.70,
16 "financePrice": 21997241.69,
17 "cash": 0,
18 "rebate": 0,
19 "creditCost": 15315696.81,
20 "creditRefund": 0,
21 "creditRefundDeduct": 0,
22 "debt": 0,
23 "noPaidPrice": 526948.07,
24 "couponPrice": 0,
25 "discountCouponPrice": 0,
26 "discountPrice": 526948.07,
27 "cashEquivalentCouponPrice": 0,
28 "sysGold": 0,
29 "unconfirmPrice": 6681544.88,
30 "deductPrice": 0,
31 "deductCash": 0,
32 "deductRebate": 0,
33 "deductCreditCost": 0,
34 "deductCouponPrice": 0,
35 "deductDiscountCouponPrice": 0,
36 "deductDiscountPrice": 0,
37 "deductCashEquivalentCouponPrice": 0,
38 "savingPlanDeductPrice": 0,
39 "items": [
40 {
41 "serviceType": "AIHC",
42 "serviceTypeName": "百度百舸·AI计算平台 AIHC",
43 "productType": "all",
44 "originPrice": 19525501.04,
45 "promotionPrice": 77770255.90,
46 "catalogPrice": 97295756.94,
47 "financePrice": 19525501.04,
48 "cash": 0,
49 "rebate": 0,
50 "creditCost": 14891865.01,
51 "creditRefund": 0,
52 "creditRefundDeduct": 0,
53 "debt": 0,
54 "noPaidPrice": 0,
55 "couponPrice": 0,
56 "discountCouponPrice": 0,
57 "discountPrice": 0,
58 "cashEquivalentCouponPrice": 0,
59 "sysGold": 0,
60 "unconfirmPrice": 4633636.03,
61 "deductPrice": 0,
62 "deductCash": 0,
63 "deductRebate": 0,
64 "deductCreditCost": 0,
65 "deductCouponPrice": 0,
66 "deductDiscountCouponPrice": 0,
67 "deductDiscountPrice": 0,
68 "deductCashEquivalentCouponPrice": 0,
69 "savingPlanDeductPrice": 0,
70 "items": null
71 },
72 {
73 "serviceType": "BOS",
74 "serviceTypeName": "对象存储 BOS",
75 "productType": "all",
76 "originPrice": 2002866.38,
77 "promotionPrice": 4009321.81,
78 "catalogPrice": 6012188.19,
79 "financePrice": 1575958.98,
80 "cash": 0,
81 "rebate": 0,
82 "creditCost": 0,
83 "creditRefund": 0,
84 "creditRefundDeduct": 0,
85 "debt": 0,
86 "noPaidPrice": 426907.40,
87 "couponPrice": 0,
88 "discountCouponPrice": 0,
89 "discountPrice": 426907.40,
90 "cashEquivalentCouponPrice": 0,
91 "sysGold": 0,
92 "unconfirmPrice": 0,
93 "deductPrice": 0,
94 "deductCash": 0,
95 "deductRebate": 0,
96 "deductCreditCost": 0,
97 "deductCouponPrice": 0,
98 "deductDiscountCouponPrice": 0,
99 "deductDiscountPrice": 0,
100 "deductCashEquivalentCouponPrice": 0,
101 "savingPlanDeductPrice": 0,
102 "items": null
103 }
104 ]
105 }
106}
评价此篇文章
