文档中心 > API类目 > 本地生活API

alibaba.alsc.crm.customer.voucher.list (获取顾客优惠券列表)

获取顾客优惠券列表

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
customer_voucher_full_open_req CustomerVoucherFullOpenReq 可选 获取顾客优惠券列表
  • └ brand_id
  • String
  • 可选
  • 123
  • 品牌ID
  • └ customer_id
  • String
  • 可选
  • 3333
  • 顾客ID
  • └ out_brand_id
  • String
  • 可选
  • 111
  • 外部品牌ID
  • └ out_shop_id
  • String
  • 可选
  • 111222
  • 外部门店ID
  • └ page_no
  • Number
  • 可选
  • 1
  • 第几页,从1开始计数
  • └ page_size
  • Number
  • 可选
  • 20
  • 每页大小,默认20
  • └ shop_id
  • String
  • 可选
  • 222
  • SaaS门店ID
  • └ voucher_status_list
  • String []
  • 可选
  • NORMAL
  • 优惠券状态 NORMAL,DELETED,ISUSED

响应参数

名称 类型 示例值 描述
result CommonPageResult 1 分页返回模型
  • └ biz_success
  • Boolean
  • true
  • 成功状态
  • └ current_page
  • Number
  • 1
  • 当前页码
  • └ has_next_page
  • Boolean
  • true
  • 是否有下一页
  • └ page_size
  • Number
  • 20
  • 当前每页显示数量
  • result_list
  • CustomerVoucherFullOpenInfo []
  • Object
  • 1
  • └ amount
  • Number
  • 0
  • 优惠券金额
  • └ customer_id
  • Number
  • 123456
  • 顾客ID
  • └ end_time
  • String
  • 2019-08-08 05:33:20
  • 结束时间
  • └ gmt_created
  • String
  • 2019-08-07 18:22:52
  • 创建时间
  • └ start_fee
  • Number
  • 1
  • 满足金额阀值
  • └ start_time
  • String
  • 2019-08-07 18:20:00
  • 开始时间
  • └ status
  • String
  • NORMAL
  • 优惠券状态
  • └ title
  • String
  • 优惠券名称
  • 优惠券名称
  • └ voucher_id
  • String
  • 123
  • 优惠券ID
  • └ discount_rate
  • String
  • 8.88
  • 优惠率
  • └ voucher_template_id
  • String
  • 123
  • 优惠券模版ID
  • └ gift_point
  • Number
  • 100
  • 券实例有效点数
  • └ result_code
  • String
  • 0
  • 结果码
  • └ result_desc
  • String
  • 处理成功
  • 结果描述
  • └ result_view
  • String
  • 处理成功
  • 结果显示
  • └ total_page
  • Number
  • 10
  • 总页数
  • └ total_size
  • Number
  • 123
  • 总数量

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaAlscCrmCustomerVoucherListRequest req = new AlibabaAlscCrmCustomerVoucherListRequest();
AlibabaAlscCrmCustomerVoucherListRequest.CustomerVoucherFullOpenReq obj1 = new AlibabaAlscCrmCustomerVoucherListRequest.CustomerVoucherFullOpenReq();
obj1.setBrandId("123");
obj1.setCustomerId("3333");
obj1.setOutBrandId("111");
obj1.setOutShopId("111222");
obj1.setPageNo(1L);
obj1.setPageSize(20L);
obj1.setShopId("222");
obj1.setVoucherStatusList("NORMAL");
req.setCustomerVoucherFullOpenReq(obj1);
AlibabaAlscCrmCustomerVoucherListResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_alsc_crm_customer_voucher_list_response>
    <result>
        <biz_success>true</biz_success>
        <current_page>1</current_page>
        <has_next_page>true</has_next_page>
        <page_size>20</page_size>
        <result_list>
            <customer_voucher_full_open_info>
                <amount>0</amount>
                <customer_id>123456</customer_id>
                <end_time>2019-08-08 05:33:20</end_time>
                <gmt_created>2019-08-07 18:22:52</gmt_created>
                <start_fee>1</start_fee>
                <start_time>2019-08-07 18:20:00</start_time>
                <status>NORMAL</status>
                <title>优惠券名称</title>
                <voucher_id>123</voucher_id>
                <discount_rate>8.88</discount_rate>
                <voucher_template_id>123</voucher_template_id>
                <gift_point>100</gift_point>
            </customer_voucher_full_open_info>
        </result_list>
        <result_code>0</result_code>
        <result_desc>处理成功</result_desc>
        <result_view>处理成功</result_view>
        <total_page>10</total_page>
        <total_size>123</total_size>
    </result>
</alibaba_alsc_crm_customer_voucher_list_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

返回
顶部