文档中心 费用中心 API文档 后付费账单接口(不建议使用) 获取预估消耗汇总

获取预估消耗汇总

最近更新时间:2024-02-26 15:54:09

getMonthConsume(获取预估消耗汇总)

本文档介绍如何查询用户预估消耗汇总信息,支持分产品类型汇总。
注意:只支持查询最近两个月的数据。

请求参数

名称

类型

必须

长度限制(字符)

参数格式

描述

Action

String

确定值

操作接口名,系统规定参数,取值:getMonthConsume

Version

String

确定值

API版本,固定为2018-06-01

BillMonth

String

YYYY-MM

必选参数,账单月份

返回数据(调用成功)

名称

类型

描述

RequestId

String

当前请求的RequestId

BeginDate

String

此次汇总的消耗开始计量日期

EndDate

String

此次汇总的消耗结束计量日期

MonthBillSet

MonthConsume 数组

消耗月账单汇总数据

错误码(调用不成功)

错误代码(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

后端服务异常

示例(调用成功)

请求示例

https://bill.api.ksyun.com/?Action=getMonthConsume
&Version=2018-06-01
&BillMonth=2019-08
&公共请求参数

返回示例

  • XML格式

<GetMonthConsumeResponse>
    <BeginDate>2019-08-01</BeginDate>
    <EndDate>2019-08-28</EndDate>
    <RequestId>9a12cb1f-85bc-4a69-a4f5-5f669f22d8eb</RequestId>
    <MonthBillSet>
        <Item>
            <BillProductSet>
                <Item>
                    <Code>KSS</Code>
                    <Cost>8207703.66</Cost>
                    <Name>KSS存储</Name>
                </Item>
            </BillProductSet>
            <BillId>KSYZD0073406772201908</BillId>
            <Sum>8207703.66</Sum>
            <BillType>postpay</BillType>
            <BillMonth>2019-08</BillMonth>
        </Item>
    </MonthBillSet>
</GetMonthConsumeResponse>
  • JSON示例

{
    "BeginDate": "2019-08-01",
    "EndDate": "2019-08-28",
    "RequestId": "9a12cb1f-85bc-4a69-a4f5-5f669f22d8eb",
    "MonthBillSet": [
        {
            "BillProductSet": [
                {
                    "Code": "KSS",
                    "Cost": 8207703.66,
                    "Name": "KSS存储"
                }
            ],
            "BillId": "KSYZD0073406772201908",
            "Sum": 8207703.66,
            "BillType": "postpay",
            "BillMonth": "2019-08"
        }
    ]
}

上一篇:产品线映射关系
下一篇:获取预估消耗明细
以上内容是否对您有帮助?
有帮助
没帮助