taobao.mobile.promotion.coupon.apply (优惠券领取(手淘专用))

优惠券领取

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
trace_id String 必须 demo 请求唯一id,问题排查
spread_id Number 必须 123 传播id
feed_id String 必须 demo 广播id
biz_id String 必须 demo 三方活动id

响应参数

名称 类型 示例值 描述
coupon_apply_result CouponApplyResult 优惠券领取结果
  • └ trace_id
  • String
  • demo
  • 请求唯一id,问题排查
  • └ apply_success
  • Boolean
  • false
  • 领取结果,领取成功为true,否则为false

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
MobilePromotionCouponApplyRequest req = new MobilePromotionCouponApplyRequest();
req.setTraceId("demo");
req.setSpreadId(123L);
req.setFeedId("demo");
req.setBizId("demo");
MobilePromotionCouponApplyResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<mobile_promotion_coupon_apply_response>
    <coupon_apply_result>
        <trace_id>demo</trace_id>
        <apply_success>false</apply_success>
    </coupon_apply_result>
</mobile_promotion_coupon_apply_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>

错误码解释

错误码 错误描述 解决方案
isp.INVALID_PARAM 需要传递onecode参数 传递onecode参数request.putOtherTextParam("top_one_code",ticket);
isp.APPLY_SINGLE_COUPON_COUNT_EXCEED_LIMIT 买家领取单张券的限制(personLimit) 买家领取单张券的限制(personLimit)
isp.COUPON_TOTAL_COUNT_EXCEED_LIMIT 领取的总量超过限制 领取的总量超过限制

API工具

如何获得此API

FAQ

返回
顶部