文档中心 > API类目 > 阿里健康-CRM

alibaba.alihealth.nr.crm.coupon.querycoupon (ERP调用CRM - 查询优惠券)

erp或者其他渠道发放优惠券给用户,通过此接口把 发放优惠券的信息传给crm

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
query_d_t_o ErpCouponQueryDto 可选 查询对象
  • └ page_size
  • Number
  • 必须
  • 10
  • 每页数量
  • └ page_num
  • Number
  • 必须
  • 1
  • 页码
  • └ channel
  • String
  • 可选
  • erp
  • 渠道
  • └ phone
  • String
  • 可选
  • 18612255668
  • 手机号
  • └ card_no
  • String
  • 可选
  • 11112222
  • 会员卡号
  • └ coupon_code
  • String
  • 可选
  • 11111
  • 优惠券code

响应参数

名称 类型 示例值 描述
result ResponseResult response
  • └ error_code
  • String
  • QUERY_RESULT_EMPTY
  • 错误码
  • └ error_msg
  • String
  • 查询为空
  • 中文描述
  • result
  • PageResponse
  • 结果
  • └ current_page
  • Number
  • 1
  • 当前页数
  • result_arr_list
  • ErpCouponDTO []
  • 对象
  • └ status
  • String
  • 0
  • 状态,0,未使用
  • └ start_date
  • String
  • 2018-11-11
  • 优惠券生效日期
  • └ serller_id
  • String
  • 111
  • 连锁id
  • └ phone
  • String
  • 18612255668
  • 会员手机号
  • └ order_amount
  • String
  • 199
  • 满多少金额可以用
  • └ end_date
  • String
  • 2018-11-11
  • 优惠券失效日期
  • └ describe
  • String
  • 全场通用
  • 描述
  • └ coupon_name
  • String
  • 满199减99
  • 优惠券名称
  • └ coupon_id
  • String
  • 11
  • 优惠券模板id
  • └ coupon_code
  • String
  • 111aaa
  • 优惠券code
  • └ coupon_amount
  • String
  • 99
  • 优惠券金额
  • └ channel
  • String
  • erp
  • 渠道
  • └ card_no
  • String
  • 1231321111
  • 会员卡号
  • └ bill_date
  • String
  • 2018-11-11
  • 发放日期
  • └ attribute
  • String
  • { "firstName":"Bill" , "lastName":"Gates" }
  • 额外属性
  • └ shop
  • String
  • 01,02
  • 使用的门店
  • └ category
  • String
  • 1001,10012
  • 适用的品类
  • └ total_count
  • Number
  • 11
  • 总共有多少记录
  • └ total_page
  • Number
  • 2
  • 总共有多少页
  • └ success
  • Boolean
  • false
  • 调用是否成功

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaAlihealthNrCrmCouponQuerycouponRequest req = new AlibabaAlihealthNrCrmCouponQuerycouponRequest();
AlibabaAlihealthNrCrmCouponQuerycouponRequest.ErpCouponQueryDto obj1 = new AlibabaAlihealthNrCrmCouponQuerycouponRequest.ErpCouponQueryDto();
obj1.setPageSize(10L);
obj1.setPageNum(1L);
obj1.setChannel("erp");
obj1.setPhone("18612255668");
obj1.setCardNo("11112222");
obj1.setCouponCode("11111");
req.setQueryDTO(obj1);
AlibabaAlihealthNrCrmCouponQuerycouponResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_alihealth_nr_crm_coupon_querycoupon_response>
    <result>
        <error_code>QUERY_RESULT_EMPTY</error_code>
        <error_msg>查询为空</error_msg>
        <result>
            <current_page>1</current_page>
            <result_arr_list>
                <erp_coupon_d_t_o>
                    <status>0</status>
                    <start_date>2018-11-11</start_date>
                    <serller_id>111</serller_id>
                    <phone>18612255668</phone>
                    <order_amount>199</order_amount>
                    <end_date>2018-11-11</end_date>
                    <describe>全场通用</describe>
                    <coupon_name>满199减99</coupon_name>
                    <coupon_id>11</coupon_id>
                    <coupon_code>111aaa</coupon_code>
                    <coupon_amount>99</coupon_amount>
                    <channel>erp</channel>
                    <card_no>1231321111</card_no>
                    <bill_date>2018-11-11</bill_date>
                    <attribute>{ &quot;firstName&quot;:&quot;Bill&quot; , &quot;lastName&quot;:&quot;Gates&quot; }</attribute>
                    <shop>01,02</shop>
                    <category>1001,10012</category>
                </erp_coupon_d_t_o>
            </result_arr_list>
            <total_count>11</total_count>
            <total_page>2</total_page>
        </result>
        <success>false</success>
    </result>
</alibaba_alihealth_nr_crm_coupon_querycoupon_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

返回
顶部