阿里云交易和账单管理API账号账单查询服务

接口名

QueryAccountBill

描述

查询用户某个账期内的消费,并以资源所有者的维度进行汇总。注:

  1. 由实例账单汇总,一般存在一天延迟。
  2. 暂时不包括阿里通信和万网产品。

请求参数

名称 类型 是否必填 说明
Action String 要执行的操作,取值:QueryAccountBill
BillingCycle String 账期,YYYY-MM。样例:2018-07
PageNum String 页码,默认值为1
PageSize String 每页数量,默认值20,最大值:300
OwnerID String 指定资源所有者的阿里云账号ID
IsGroupByProduct Boolean 是否增加产品Code汇总,默认false, 仅以OwnerId汇总
Product code String 按照product code筛选订单,仅当IsGroupByProduct为true生效

返回参数

名称 类型 说明
BillingCycle String 账期,格式:YYYY-MM
AccountID String 账号ID
AccountName String 账号
TotalCount String 总记录数
PageNum String 页码
PageSize String 每页数量
Items Item 账单详情

Item:

名称 类型 说明
OwnerID String 子账号的阿里云Id)
OwnerName String 子账号名称
CostUnit String 财务单元
ProductCode String 产品code,仅当IsGroupByProduct为true时返回
ProductName String 产品名称,仅当IsGroupByProduct为true时返回
SubscriptionType String 产品订阅类型,预付费:Subscription,后付费:PayAsYouGo,仅当IsGroupByProduct为true时返回
PretaxGrossAmount Double 原始金额
InvoiceDiscount Double 优惠金额
DeductedByCoupons Double 优惠券抵扣
PretaxAmount Double 应付金额
DeductedByCashCoupons Double 代金券抵扣(仅中国站)
DeductedByPrepaidCard Double 储值卡抵扣(仅中国站)
PaymentAmount Double 现金支付(仅中国站)
OutstandingAmount Double 未结清金额或信用结算金额(普通用户的欠费, 或者信用客户信用额度消耗,仅中国站)
Currency String 币种 CNY/USD/JPY

请求示例

  1. &Action=QueryAccountBill
  2. &BillingCycle=2019-09
  3. &其他公共参数

返回示例

  1. {
  2. "Data": {
  3. "Items": {
  4. "Item": [
  5. {
  6. "PaymentAmount": 0,
  7. "OutstandingAmount": 0,
  8. "DeductedByPrepaidCard": 0,
  9. "DeductedByCashCoupons": 0,
  10. "PretaxAmount": 0,
  11. "CostUnit": "未分配",
  12. "OwnerID": "1369168081849304",
  13. "Currency": "CNY",
  14. "DeductedByCoupons": 0,
  15. "PretaxGrossAmount": 0,
  16. "OwnerName": "aligzncloudtest2",
  17. "InvoiceDiscount": 0
  18. },
  19. {
  20. "PaymentAmount": 0,
  21. "OutstandingAmount": 0,
  22. "DeductedByPrepaidCard": 0,
  23. "DeductedByCashCoupons": 0,
  24. "PretaxAmount": 0,
  25. "CostUnit": "财务单元1",
  26. "OwnerID": "1369168081849304",
  27. "Currency": "CNY",
  28. "DeductedByCoupons": 0,
  29. "PretaxGrossAmount": 0,
  30. "OwnerName": "aligzncloudtest2",
  31. "InvoiceDiscount": 0
  32. }
  33. ]
  34. },
  35. "TotalCount": 2,
  36. "BillingCycle": "2019-09",
  37. "AccountID": "1369168081849304",
  38. "PageSize": 100,
  39. "AccountName": "aligzncloudtest2",
  40. "PageNum": 1
  41. },
  42. "Message": "Successful!",
  43. "RequestId": "A522988D-706B-4C2A-AEDA-7CF686FD8505",
  44. "Success": true,
  45. "Code": "Success"
  46. }

原创文章,作者:网友投稿,如若转载,请注明出处:https://www.cloudads.cn/archives/33922.html

发表评论

登录后才能评论