文档中心 > API类目 > 千牛接口

taobao.qianniu.coupon.buyer.get (千牛优惠券接待买家查询)

卖家接待买家时,查询买家在卖家店铺已经领取的优惠券及可以领取的优惠券

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
buyer_nick String 必须 huazhao 买家nick

响应参数

名称 类型 示例值 描述
is_success Boolean true 是否成功
coupons CouponInfoDo [] 优惠券列表信息
  • └ id
  • String
  • demo
  • 优惠券id(uuid)
  • └ status
  • Number
  • 0, 1
  • 优惠券是否领取,0未领取 1已领取
  • └ amount
  • Number
  • 100
  • 优惠券面额
  • └ type
  • Number
  • 1
  • 优惠券类型:店铺优惠券或商品优惠券
  • └ start_fee
  • Number
  • 100
  • 优惠券使用前提
  • └ total_count
  • Number
  • 100
  • 优惠券总量
  • └ apply_count
  • Number
  • 100
  • 已经领用优惠券数量
  • └ has_limit
  • Boolean
  • true
  • 使用优惠券是否有前提条件
  • └ title
  • String
  • demo
  • 优惠券名字
  • └ start_time
  • Date
  • 2015-01-01 00:00:00
  • 优惠券有效起始时间
  • └ end_time
  • Date
  • 2015-01-01 00:00:00
  • 优惠券结束时间
  • └ template_id
  • Number
  • 100
  • 买家优惠券id
  • └ template_code
  • Number
  • 100
  • 卖家优惠券code
  • └ apply_url
  • String
  • demo
  • 优惠券领用链接

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
QianniuCouponBuyerGetRequest req = new QianniuCouponBuyerGetRequest();
req.setBuyerNick("huazhao");
QianniuCouponBuyerGetResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<qianniu_coupon_buyer_get_response>
    <is_success>true</is_success>
    <coupons>
        <coupon_info_do>
            <id>demo</id>
            <status>0, 1</status>
            <amount>100</amount>
            <type>1</type>
            <start_fee>100</start_fee>
            <total_count>100</total_count>
            <apply_count>100</apply_count>
            <has_limit>true</has_limit>
            <title>demo</title>
            <start_time>2015-01-01 00:00:00</start_time>
            <end_time>2015-01-01 00:00:00</end_time>
            <template_id>100</template_id>
            <template_code>100</template_code>
            <apply_url>demo</apply_url>
        </coupon_info_do>
    </coupons>
</qianniu_coupon_buyer_get_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

返回
顶部