文档中心 > API类目 > 客户运营平台API

taobao.opencrm.activity.coupons.query (CRM客户关系管理券查询开放)

CRM客户关系管理券查询开放

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
crm_coupon_query CrmCouponQuery 可选 客户关系管理券查询参数
  • └ coupon_type
  • String
  • 必须
  • "self"
  • "self" - 自定义人群券 "new" - 新客券 "old" - 老客券 "fans" - 粉丝券
  • └ crowd_id
  • Number
  • 可选
  • 123456
  • 人群ID

响应参数

名称 类型 示例值 描述
result Result 接口返回模型
  • └ msg
  • String
  • "查询错误信息"
  • 错误信息
  • activity_coupon_list
  • ActivityCouponDto []
  • 返回客户关系管理券信息
  • └ title
  • String
  • "CRM客户关系管理券"
  • 优惠券权益名称
  • └ condition
  • String
  • "满1000.00元使用"
  • 优惠券使用条件
  • └ limit_get
  • Number
  • -1
  • 优惠券领取条件,-1表示无限制
  • └ start_time
  • Date
  • "2021-12-01 00:00:00"
  • 优惠券开始时间
  • └ end_time
  • Date
  • "2021-12-31 00:00:00"
  • 优惠券结束时间
  • └ coupon_count
  • Number
  • 999
  • 券库存
  • └ apply_count
  • Number
  • 1
  • 已领用量
  • └ template_code
  • Number
  • 40000000
  • 优惠券templateCode
  • └ amount
  • Number
  • 100
  • 优惠券金额,单位为分
  • └ start_fee
  • Number
  • 100000
  • 满足金额阈值,单位为分
  • └ crowd_type
  • String
  • "CRM_COUPON"
  • 客户关系管理券人群类型
  • └ crowd_id
  • Number
  • 123333333
  • 客户关系管理券人群ID
  • └ crowd_name
  • String
  • "店铺会员人群"
  • 客户关系管理券人群名称
  • └ activity_id
  • Number
  • 123456
  • 客户关系管理券活动ID
  • └ uuid
  • String
  • "193214289bbe43738c57d645698e3fef"
  • 优惠券uuid
  • └ code
  • Number
  • 104
  • 错误码
  • └ success
  • Boolean
  • true
  • 是否成功

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
OpencrmActivityCouponsQueryRequest req = new OpencrmActivityCouponsQueryRequest();
OpencrmActivityCouponsQueryRequest.CrmCouponQuery obj1 = new OpencrmActivityCouponsQueryRequest.CrmCouponQuery();
obj1.setCouponType("\"self\"");
obj1.setCrowdId(123456L);
req.setCrmCouponQuery(obj1);
OpencrmActivityCouponsQueryResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<opencrm_activity_coupons_query_response>
    <result>
        <msg>&quot;查询错误信息&quot;</msg>
        <activity_coupon_list>
            <activity_coupon_dto>
                <title>&quot;CRM客户关系管理券&quot;</title>
                <condition>&quot;满1000.00元使用&quot;</condition>
                <limit_get>-1</limit_get>
                <start_time>&quot;2021-12-01 00:00:00&quot;</start_time>
                <end_time>&quot;2021-12-31 00:00:00&quot;</end_time>
                <coupon_count>999</coupon_count>
                <apply_count>1</apply_count>
                <template_code>40000000</template_code>
                <amount>100</amount>
                <start_fee>100000</start_fee>
                <crowd_type>&quot;CRM_COUPON&quot;</crowd_type>
                <crowd_id>123333333</crowd_id>
                <crowd_name>&quot;店铺会员人群&quot;</crowd_name>
                <activity_id>123456</activity_id>
                <uuid>&quot;193214289bbe43738c57d645698e3fef&quot;</uuid>
            </activity_coupon_dto>
        </activity_coupon_list>
        <code>104</code>
        <success>true</success>
    </result>
</opencrm_activity_coupons_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

返回
顶部