QueryCashCoupons - 查询用户代金券信息

更新时间:

查询用户代金券信息。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息

下表是API对应的授权信息,可以在RAM权限策略语句的Action元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:

  • 操作:是指具体的权限点。
  • 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。
  • 资源类型:是指操作中支持授权的资源类型。具体说明如下:
    • 对于必选的资源类型,用前面加 * 表示。
    • 对于不支持资源级授权的操作,用全部资源表示。
  • 条件关键字:是指云产品自身定义的条件关键字。
  • 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。
操作访问级别资源类型条件关键字关联操作
bss:DescribeCouponsget
*全部资源
*

请求参数

名称类型必填描述示例值
ExpiryTimeEndstring

代金券终止过期时间,格式:yyyy-MM-ddTHH:mm:ssZ

2018-08-01T00:00:00Z
ExpiryTimeStartstring

代金券起始过期时间,格式:yyyy-MM-ddTHH:mm:ssZ

2018-09-01T00:00:00Z
EffectiveOrNotboolean

代金券是否生效。取值范围:

  • true
  • false
true

返回参数

名称类型描述示例值
object
Codestring

状态码

Success
Messagestring

执行结果说明

Successful!
RequestIdstring

请求 ID

147B566E-DB4C-4E43-BDBB-5DB1D9D268DB
Successboolean

是否调用成功。true:调用成功,false:调用失败

true
Dataarray<object>

返回数据

CashCouponobject
Statusstring

取值:

  • Available:有效
  • Expired:过期
  • Cancelled:作废
Available
ExpiryTimestring

代金券过期时间

2018-08-10T00:00:00Z
GrantedTimestring

代金券发放时间

2018-08-02T15:15:50Z
NominalValuestring

面额

100.00
EffectiveTimestring

代金券生效时间

2018-08-02T15:15:50Z
ApplicableScenariosstring

适用场景描述

阿里云按量付费账单,阿里云新购
CashCouponIdlong

代金券 ID

34534253254325
ApplicableProductsstring

适用产品描述

通用
CashCouponNostring

代金券编码

Q-b1485def8f04a
Balancestring

余额

100.00
Descriptionstring

备注

该代金券用于产品功能验证的测试

示例

正常返回示例

JSON格式

{
  "Code": "Success",
  "Message": "Successful!",
  "RequestId": "147B566E-DB4C-4E43-BDBB-5DB1D9D268DB",
  "Success": true,
  "Data": {
    "CashCoupon": [
      {
        "Status": "Available",
        "ExpiryTime": "2018-08-10T00:00:00Z",
        "GrantedTime": "2018-08-02T15:15:50Z",
        "NominalValue": 100,
        "EffectiveTime": "2018-08-02T15:15:50Z",
        "ApplicableScenarios": "阿里云按量付费账单,阿里云新购",
        "CashCouponId": 34534253254325,
        "ApplicableProducts": "通用",
        "CashCouponNo": "Q-b1485def8f04a",
        "Balance": 100,
        "Description": "该代金券用于产品功能验证的测试"
      }
    ]
  }
}

错误码

HTTP status code错误码错误信息描述
400NotApplicableThis API is not applicable for caller.-
400NotAuthorizedThis API is not authorized for caller.-
400MissingParameter Some parameters arte mandatoryfor this request.-
400InvalidParameterSome parameter sare not valid.-
400InvalidOwnerThe specifiedowner doesn’t belong to caller-
400InternalErrorThe request processing has failed due to some unknown error, exception or failure.-
400NotApplicableYou are not authorized to call the API operation. Please check whether the caller site matches the API domain regionId.用户不可调用该API。请检查调用用户站点和API域名的地域信息是否匹配。
500UndefinedErrorThe request processing has failed due to some unknown error.-

访问错误中心查看更多错误码。

变更历史

变更时间变更内容概要操作
2023-07-19OpenAPI 错误码发生变更、OpenAPI 返回结构发生变更查看变更详情