tmall.promotion.coupon.query (查询可用优惠券列表)

查询用户的可用优惠券列表,仅包含优惠券基本信息和用户nick

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
biz_type String 必须 suning 业务类型
buyer_id String 可选 123456 buyer_id、buyer_nick至少填一个, 都填写以id为准
buyer_nick String 可选 我是测试 buyer_id、buyer_nick至少填一个, 都填写以id为准
extra Json 可选 {"seller_id":111111} 扩展字段

响应参数

名称 类型 示例值 描述
result Result result
  • data_list
  • Data []
  • data
  • └ discount
  • String
  • discount
  • └ start_fee
  • String
  • startFee
  • └ coupon_name
  • String
  • couponName
  • └ end_time
  • Date
  • endTime
  • └ start_time
  • Date
  • startTime
  • └ supplier_id
  • String
  • supplierId
  • └ coupon_template_id
  • String
  • couponTemplateId
  • └ id
  • String
  • id
  • └ error_msg
  • String
  • errorMsg
  • └ result_code
  • String
  • resultCode

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
TmallPromotionCouponQueryRequest req = new TmallPromotionCouponQueryRequest();
req.setBizType("suning");
req.setBuyerId("123456");
req.setBuyerNick("我是测试");
req.setExtraString("{\"seller_id\":111111}");
TmallPromotionCouponQueryResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<tmall_promotion_coupon_query_response>
    <result>
        <data_list>
            <data>
                <discount></discount>
                <start_fee></start_fee>
                <coupon_name></coupon_name>
                <end_time></end_time>
                <start_time></start_time>
                <supplier_id></supplier_id>
                <coupon_template_id></coupon_template_id>
                <id></id>
            </data>
        </data_list>
        <error_msg></error_msg>
        <result_code></result_code>
    </result>
</tmall_promotion_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

返回
顶部