tmall.promotion.coupon.use (券核销接口)

核销用户的一张优惠券,返回核销结果

公共参数

请求参数

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

响应参数

名称 类型 示例值 描述
data UseResultDo data
  • └ is_used
  • Boolean
  • true
  • isUsed
result_code String resultCode
error_msg String errorMsg

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
TmallPromotionCouponUseRequest req = new TmallPromotionCouponUseRequest();
req.setBizType("suning");
req.setBuyerId("123456");
req.setBuyerNick("我是测试");
req.setSellerId("1111111");
req.setCouponId("222222");
req.setExtraString("{\"suning_coupon_id\":33333}");
TmallPromotionCouponUseResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<tmall_promotion_coupon_use_response>
    <data>
        <is_used>true</is_used>
    </data>
    <result_code></result_code>
    <error_msg></error_msg>
</tmall_promotion_coupon_use_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

返回
顶部