tmall.oversea.promotion.coupon.send (天猫海外优惠券发放接口)

天猫海外优惠券发放接口

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
param_benefit_send_request BenefitSendRequest 可选 权益发放入参
  • └ app_name
  • String
  • 必须
  • pathfinder
  • 调用方应用名称
  • └ asac
  • String
  • 可选
  • secdeuyi15y
  • 安全码
  • └ code
  • String
  • 必须
  • yyu1codeuu
  • 投放code
  • └ idempotent_id
  • String
  • 可选
  • u_100
  • 幂等id
  • └ user_id
  • String
  • 必须
  • 2021100965
  • 用户id
  • └ user_type
  • String
  • 必须
  • alipay
  • 用户类型

响应参数

名称 类型 示例值 描述
data Number 2261887387361 券实例id
result_code String COUPON_NOT_EXISTS 调用错误码,只有调用失败的时候才会有
error_msg String 卡券不存在 失败详细描述
apply_result Boolean true 发券是否成功

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
TmallOverseaPromotionCouponSendRequest req = new TmallOverseaPromotionCouponSendRequest();
TmallOverseaPromotionCouponSendRequest.BenefitSendRequest obj1 = new TmallOverseaPromotionCouponSendRequest.BenefitSendRequest();
obj1.setAppName("pathfinder");
obj1.setAsac("secdeuyi15y");
obj1.setCode("yyu1codeuu");
obj1.setIdempotentId("u_100");
obj1.setUserId("2021100965");
obj1.setUserType("alipay");
req.setParamBenefitSendRequest(obj1);
TmallOverseaPromotionCouponSendResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<tmall_oversea_promotion_coupon_send_response>
    <data>2261887387361</data>
    <result_code>COUPON_NOT_EXISTS</result_code>
    <error_msg>卡券不存在</error_msg>
    <apply_result>true</apply_result>
</tmall_oversea_promotion_coupon_send_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

返回
顶部