查询消费配额-ShowPartnerConsumptionQuota
功能介绍
伙伴通过该接口可以查询消费配额。
接口约束
该接口只允许使用解决方案提供商或华为云总经销商(一级经销商)的AK/SK或者Token调用。
调试
您可以在API Explorer中调试该接口,支持自动认证鉴权。API Explorer可以自动生成SDK代码示例,并提供SDK代码示例调试功能。
授权信息
接口对应的权限项如下:
| 权限项 | 权限项名称 |
|---|---|
| BPC_ITEM_ACCOUNT_010500 | 伙伴信息-基本信息-消费配额-查看消费配额 |
URI
GET /v2/partners/credit/consumption-quota
GET https://bss-intl.myhuaweicloud.com/v2/partners/credit/consumption-quota HTTP/1.1 Content-Type: application/json X-Auth-Token:MIIPAgYJKoZIhvcNAQcCo...ggg1BBIINPXsidG9rZ
响应消息
响应参数
| 参数 | 参数类型 | 取值范围 | 描述 |
|---|---|---|---|
| error_code | String | 最大长度:20 | 状态码。具体请参考状态码。只有失败才返回该字段。 |
| error_msg | String | 最大长度:1000 | 错误描述信息。只有失败才返回该字段。 |
| consumption_quota | String | 最大长度:64 | 总消费配额。 |
| amount | String | 最大长度:64 | 账户余额。 |
| coupon_amount | String | 最大长度:64 | 代金券余额。 说明: 每月出账日前几天,优惠券余额展示金额由两部分组成: ①上月过期优惠券余额和上月预估消费相抵的额度 ②当前生效中的优惠券余额 |
| due_amount | String | 最大长度:64 | 应还金额。 |
| unbilled_amount | String | 最大长度:64 | 未出账预估金额。 |
| used_consumption_quota | String | 最大长度:64 | 已使用消费配额。 used_consumption_quota = due_amount + unbilled_amount - amount - coupon_amount。 说明: 当账户余额或代金券余额比消费金额高时,已使用消费配额会返回负数,表示未使用消费配额。 |
| currency | String | 最大长度:20 | 币种。 USD:美元。 |
| measure_id | Integer | 4 | 度量单位标识。 1: 美元 |
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: length
Date: response time
{
"consumption_quota": "10000",
"amount": "10.18",
"coupon_amount": "10.03",
"due_amount": "500.28",
"unbilled_amount": "100.01",
"used_consumption_quota": "580.08",
"measure_id": 1,
"currency": "USD"
}
