文档中心 > API类目 > 客户运营平台API

taobao.opencrm.coupon.query (优惠券查询接口)

优惠券查询接口

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
coupon_type Number 可选 0 优惠券类型,0-店铺优惠券,1-商品优惠券
uuid String 可选 eb3f2031942c41f09d2b17df4ac776d8 优惠券唯一标识

响应参数

名称 类型 示例值 描述
result_list CouponDto [] 优惠券列表
  • └ amount
  • Number
  • 100
  • 面额,单位:分
  • └ start_time
  • Date
  • 2017-01-01 00:00:00
  • 优惠券可使用开始时间
  • └ total_count
  • String
  • 1000
  • 总张数
  • └ uuid
  • String
  • eb3f2031942c41f09d2b17df4ac776d8
  • 优惠券唯一标识
  • └ condition
  • String
  • 满100元使用
  • 使用门槛
  • └ end_time
  • Date
  • 2017-02-01 23:59:59
  • 优惠券可使用结束时间
  • └ coupon_type
  • Number
  • 1
  • 类型,0-店铺优惠券,1-商品优惠券
  • └ title
  • String
  • 1元店铺优惠券
  • 标题

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
OpencrmCouponQueryRequest req = new OpencrmCouponQueryRequest();
req.setCouponType(0L);
req.setUuid("eb3f2031942c41f09d2b17df4ac776d8");
OpencrmCouponQueryResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<opencrm_coupon_query_response>
    <result_list>
        <coupon_dto>
            <amount>100</amount>
            <start_time>2017-01-01 00:00:00</start_time>
            <total_count>1000</total_count>
            <uuid>eb3f2031942c41f09d2b17df4ac776d8</uuid>
            <condition>满100元使用</condition>
            <end_time>2017-02-01 23:59:59</end_time>
            <coupon_type>1</coupon_type>
            <title>1元店铺优惠券</title>
        </coupon_dto>
    </result_list>
</opencrm_coupon_query_response>

异常示例

  • XML示例
  • JSON示例
<error_response>
    <code>50</code>
    <msg>Remote service error</msg>
    <sub_code>isv.invalid-parameter</sub_code>
    <sub_msg>非法参数</sub_msg>
</error_response>

错误码解释

错误码 错误描述 解决方案

API工具

如何获得此API

FAQ

返回
顶部