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

alibaba.alsc.crm.customer.get (查询顾客详情)

查询顾客详情

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
param_customer_id_query_open_req CustomerIdQueryOpenReq 可选 顾客详情查询条件
  • └ brand_id
  • String
  • 可选
  • 20193947389475
  • 品牌ID 外部品牌id 2选1
  • └ customer_id
  • String
  • 可选
  • 20183846378465
  • 顾客ID
  • └ options
  • String []
  • 必须
  • ["CARD","RECHARGE"]
  • 查询选项,默认查询顾客基础信息, CARD:查询顾客名下的卡列表 ,RECHARGE:查询卡下的储值账户信息 ,POINT:查询顾客的积分信息.
  • └ shop_id
  • String
  • 可选
  • 201923878645
  • 店铺ID和外部门店ID必须一
  • └ mobile
  • String
  • 可选
  • 18900000000
  • 手机号码
  • └ physical_card_id
  • String
  • 可选
  • 12345678900998776
  • 物理卡号
  • └ card_id
  • String
  • 可选
  • 123455678987655
  • 电子卡号
  • └ out_brand_id
  • String
  • 可选
  • 123
  • 外部品牌id
  • └ out_shop_id
  • String
  • 可选
  • 12324
  • 外部门店ID,店铺ID和外部门店ID必须一
  • └ wechat_open_id
  • String
  • 可选
  • 2343
  • 微信openID
  • └ wechat_app_id
  • String
  • 可选
  • 544
  • 微信小程序ID
  • └ phone
  • String
  • 可选
  • 1343
  • 座机
  • └ alipay_id
  • String
  • 可选
  • 2323
  • 支付宝ID

响应参数

名称 类型 示例值 描述
result CommonResult 接口结果
  • └ biz_success
  • Boolean
  • true
  • 成功状态
  • result
  • CustomerAggOpenInfo
  • 顾客详情信息
  • card_open_info_list
  • CardOpenInfo []
  • 卡模版列表
  • └ card_id
  • String
  • 2019387834657345
  • 电子卡号
  • └ card_template_id
  • String
  • 201934753467865
  • 卡模版ID
  • └ card_type
  • String
  • MEMBER
  • 卡类型,MEMBER:会员卡,GIFT:礼品卡
  • └ deleted
  • Boolean
  • false
  • 是否已删除
  • └ gmt_create
  • Date
  • 2019-01-01 23:59:59
  • 创建时间
  • └ gmt_modified
  • Date
  • 2019-01-01 23:59:59
  • 修改时间
  • └ open_operator_id
  • String
  • 2019394398475
  • 开卡人ID
  • └ open_operator_name
  • String
  • 张三
  • 开卡人姓名
  • └ open_shop_id
  • String
  • 20193847389465734
  • 开卡门店ID
  • └ open_shop_name
  • String
  • 杭州XXX门店
  • 开卡门店名称
  • └ open_time
  • Date
  • 2019-01-01 23:59:59
  • 开卡时间
  • physical_cards
  • PhysicalCardOpenInfo []
  • 物理卡
  • └ bind_operator_id
  • String
  • 12344
  • 绑定操作人
  • └ bind_shop_id
  • String
  • 23444
  • 绑定商店
  • └ bind_time
  • Date
  • 2022-10-01
  • 绑定时间
  • └ card_id
  • String
  • 234556677
  • 卡id
  • └ card_template_id
  • String
  • 3456777456
  • 卡模板
  • └ card_type
  • String
  • MEMBER
  • 卡类型
  • └ physical_card_id
  • String
  • 2342455355
  • 物理卡
  • └ publish_id
  • String
  • 2355642344
  • 卡id
  • └ status
  • String
  • SOLD
  • 状态
  • └ card_template_name
  • String
  • 超值卡
  • 卡方案名称
  • accounts
  • AccountOpenInfo []
  • 账户信息
  • └ account_id
  • String
  • 223445662
  • 账户id
  • └ account_type
  • String
  • ""
  • 账户类型
  • └ status
  • String
  • ""
  • 状态
  • └ balance
  • Number
  • 1
  • 余额
  • └ real
  • Number
  • 1
  • 实储
  • └ gift
  • Number
  • 1
  • 赠送
  • └ pre
  • Number
  • 1
  • 预储
  • └ currency
  • String
  • RMB
  • 币种
  • └ total_real
  • Number
  • 1
  • 实际储值
  • └ total_gift
  • Number
  • 1
  • 总赠送
  • └ total_pre
  • Number
  • 1
  • 累计预存
  • └ status
  • String
  • SOLD
  • 电子卡状态,SOLD:已出售,ACTIVED:已激活,STOP:已停用,INVALID:已作废,EXPIRED:已过期,REFUND:已退卡
  • └ expire_start
  • Date
  • 2023-01-01 11:11:11
  • 有效期开始时间
  • └ expire_end
  • Date
  • 2023-01-01 11:11:11
  • 有效期结束时间
  • customer_open_info
  • CustomerOpenInfo
  • 顾客基础信息
  • └ address
  • String
  • 杭州市西湖区XXXX阶段
  • 地址
  • └ avg_consume
  • Number
  • 12300
  • 客单价,单位:分
  • └ birthday
  • Date
  • 2019-01-01 00:00:00
  • 生日
  • └ channel
  • Number
  • mobile_app
  • 渠道
  • └ consume_amount
  • Number
  • 12837863700
  • 累计消费总金额,单位:分
  • └ consume_num
  • Number
  • 145
  • 累计消费次数
  • └ create_by
  • String
  • 20183465783465
  • 创建人
  • └ customer_id
  • String
  • 201834378465
  • 顾客ID
  • └ customer_store_id
  • String
  • 201934673465
  • 顾客加入门店id
  • └ customer_time
  • Date
  • 2019-01-01 23:59:59
  • 成为顾客时间
  • └ customer_type
  • Number
  • 0
  • 顾客类型,顾客:0,会员:1
  • └ deleted
  • Boolean
  • false
  • 是否已删除
  • └ email
  • String
  • xx@xx.com
  • 电子邮件
  • └ follow_wx_time
  • Date
  • 2019-01-01 23:59:59
  • 关注微信时间(微信公众号)
  • └ gender
  • Number
  • 0
  • 性别 0女 1男
  • └ gmt_create
  • Date
  • 2019-01-01 23:59:59
  • 创建时间
  • └ gmt_modified
  • Date
  • 2019-01-01 23:59:59
  • 修改时间
  • └ invoice
  • String
  • 杭州市西湖区
  • 发票抬头
  • └ last_consume_time
  • Date
  • 2019-01-01 23:59:59
  • 最后消费时间
  • └ level_desc
  • String
  • VIP1
  • 等级描述
  • └ level_id
  • String
  • 20109283197
  • 等级ID
  • └ level_no
  • Number
  • 1
  • 等级序号
  • └ member_store_id
  • String
  • 203489457384
  • 成为会员店铺ID
  • └ member_time
  • Date
  • 2019-01-01 23:59:59
  • 成为会员时间
  • └ mobile
  • String
  • 129XXXXXXX
  • 手机号
  • └ name
  • String
  • 王五
  • 姓名
  • └ phone
  • String
  • 0571-11112222
  • 固定电话
  • └ remark
  • String
  • ceshi
  • 备注
  • └ state
  • Number
  • 1
  • 会员状态,可用1、停用0(停用:所有会员的权益不可用)
  • └ tags
  • String []
  • []
  • 标签列表
  • └ update_by
  • String
  • 2019237428364
  • 2019237428364
  • └ growth
  • Number
  • 100
  • 成长值
  • └ has_password
  • Boolean
  • false
  • 是否设置了支付密码
  • customer_out_info_list
  • CustomerOutInfo []
  • 外部信息
  • └ out_type
  • String
  • MOBILE
  • 外部类型 /** * 手机号 */ MOBILE("mobile","手机号注册"), /** * 微信openId */ WECHAT("wechat","微信openid注册"), /** * 微信小程序Id */ WEAPP("weapp","微信小程序注册"), /** * 支付宝用户ID */ ALIPAY("alipay","支付宝id注册"), /** * 面部ID */ FACE_CODE("faceCode","faceCode注册"), /** * 座机注册 */ PHONE_CUSTOMER("phone_customer","座机注册")
  • └ out_id
  • String
  • 13555555555
  • 外部id
  • customer_voucher_full_open_info_list
  • CustomerVoucherFullOpenInfo []
  • 券列表
  • └ amount
  • Number
  • 10000
  • 优惠券金额,单位:分
  • └ customer_id
  • Number
  • 201298927384
  • 顾客ID
  • └ end_time
  • String
  • 2019-01-01 23:59:59
  • 券失效时间
  • └ gmt_created
  • String
  • 2019-01-01 23:59:59
  • 获取时间
  • └ shop_id
  • Number
  • 2012893784
  • 门店ID
  • └ start_fee
  • Number
  • 10000
  • 满足金额阀值,单位:分
  • └ start_time
  • String
  • 2019-01-01 23:59:59
  • 券生效时间
  • └ status
  • String
  • NORMAL
  • 优惠券状态
  • └ title
  • String
  • 5元代金券
  • 券名称
  • └ voucher_id
  • String
  • 2019734836475
  • 优惠券实例ID
  • └ voucher_type
  • String
  • GIFT
  • 优惠券类型,CASH:代金券,DISCOUNT:折扣券,GIFT:礼品券
  • point_account
  • PointAccountOpenInfo
  • 积分账户
  • └ available_point
  • Number
  • 23972836
  • 可用的积分总数
  • └ customer_id
  • String
  • 20193893475
  • 会员ID
  • └ freeze_point
  • Number
  • 0
  • 冻结积分数
  • └ total_expired_point
  • Number
  • 0
  • 累计过期积分数
  • └ total_point
  • Number
  • 123123
  • 累计积分总数
  • └ total_used_point
  • Number
  • 345345345
  • 累计可用积分数
  • └ result_code
  • String
  • 结果码
  • 结果码
  • └ result_desc
  • String
  • 结果描述
  • 结果描述
  • └ result_view
  • String
  • 错误结果显示
  • 错误结果显示

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaAlscCrmCustomerGetRequest req = new AlibabaAlscCrmCustomerGetRequest();
AlibabaAlscCrmCustomerGetRequest.CustomerIdQueryOpenReq obj1 = new AlibabaAlscCrmCustomerGetRequest.CustomerIdQueryOpenReq();
obj1.setBrandId("20193947389475");
obj1.setCustomerId("20183846378465");
obj1.setOptions(""CARD","RECHARGE"");
obj1.setShopId("201923878645");
obj1.setMobile("18900000000");
obj1.setPhysicalCardId("12345678900998776");
obj1.setCardId("123455678987655");
obj1.setOutBrandId("123");
obj1.setOutShopId("12324");
obj1.setWechatOpenId("2343");
obj1.setWechatAppId("544");
obj1.setPhone("1343");
obj1.setAlipayId("2323");
req.setParamCustomerIdQueryOpenReq(obj1);
AlibabaAlscCrmCustomerGetResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_alsc_crm_customer_get_response>
    <result>
        <biz_success>true</biz_success>
        <result>
            <card_open_info_list>
                <card_open_info>
                    <card_id>2019387834657345</card_id>
                    <card_template_id>201934753467865</card_template_id>
                    <card_type>MEMBER</card_type>
                    <deleted>false</deleted>
                    <gmt_create>2019-01-01 23:59:59</gmt_create>
                    <gmt_modified>2019-01-01 23:59:59</gmt_modified>
                    <open_operator_id>2019394398475</open_operator_id>
                    <open_operator_name>张三</open_operator_name>
                    <open_shop_id>20193847389465734</open_shop_id>
                    <open_shop_name>杭州XXX门店</open_shop_name>
                    <open_time>2019-01-01 23:59:59</open_time>
                    <physical_cards>
                        <physical_card_open_info>
                            <bind_operator_id>12344</bind_operator_id>
                            <bind_shop_id>23444</bind_shop_id>
                            <bind_time>2022-10-01</bind_time>
                            <card_id>234556677</card_id>
                            <card_template_id>3456777456</card_template_id>
                            <card_type>MEMBER</card_type>
                            <physical_card_id>2342455355</physical_card_id>
                            <publish_id>2355642344</publish_id>
                            <status>SOLD</status>
                            <card_template_name>超值卡</card_template_name>
                        </physical_card_open_info>
                    </physical_cards>
                    <accounts>
                        <account_open_info>
                            <account_id>223445662</account_id>
                            <account_type>&quot;&quot;</account_type>
                            <status>&quot;&quot;</status>
                            <balance>1</balance>
                            <real>1</real>
                            <gift>1</gift>
                            <pre>1</pre>
                            <currency>RMB</currency>
                            <total_real>1</total_real>
                            <total_gift>1</total_gift>
                            <total_pre>1</total_pre>
                        </account_open_info>
                    </accounts>
                    <status>SOLD</status>
                    <expire_start>2023-01-01 11:11:11</expire_start>
                    <expire_end>2023-01-01 11:11:11</expire_end>
                </card_open_info>
            </card_open_info_list>
            <customer_open_info>
                <address>杭州市西湖区XXXX阶段</address>
                <avg_consume>12300</avg_consume>
                <birthday>2019-01-01 00:00:00</birthday>
                <channel>mobile_app</channel>
                <consume_amount>12837863700</consume_amount>
                <consume_num>145</consume_num>
                <create_by>20183465783465</create_by>
                <customer_id>201834378465</customer_id>
                <customer_store_id>201934673465</customer_store_id>
                <customer_time>2019-01-01 23:59:59</customer_time>
                <customer_type>0</customer_type>
                <deleted>false</deleted>
                <email>xx@xx.com</email>
                <follow_wx_time>2019-01-01 23:59:59</follow_wx_time>
                <gender>0</gender>
                <gmt_create>2019-01-01 23:59:59</gmt_create>
                <gmt_modified>2019-01-01 23:59:59</gmt_modified>
                <invoice>杭州市西湖区</invoice>
                <last_consume_time>2019-01-01 23:59:59</last_consume_time>
                <level_desc>VIP1</level_desc>
                <level_id>20109283197</level_id>
                <level_no>1</level_no>
                <member_store_id>203489457384</member_store_id>
                <member_time>2019-01-01 23:59:59</member_time>
                <mobile>129XXXXXXX</mobile>
                <name>王五</name>
                <phone>0571-11112222</phone>
                <remark>ceshi</remark>
                <state>1</state>
                <tags>
                    <string>[]</string>
                </tags>
                <update_by>2019237428364</update_by>
                <growth>100</growth>
                <has_password>false</has_password>
                <customer_out_info_list>
                    <customer_out_info>
                        <out_type>MOBILE</out_type>
                        <out_id>13555555555</out_id>
                    </customer_out_info>
                </customer_out_info_list>
            </customer_open_info>
            <customer_voucher_full_open_info_list>
                <customer_voucher_full_open_info>
                    <amount>10000</amount>
                    <customer_id>201298927384</customer_id>
                    <end_time>2019-01-01 23:59:59</end_time>
                    <gmt_created>2019-01-01 23:59:59</gmt_created>
                    <shop_id>2012893784</shop_id>
                    <start_fee>10000</start_fee>
                    <start_time>2019-01-01 23:59:59</start_time>
                    <status>NORMAL</status>
                    <title>5元代金券</title>
                    <voucher_id>2019734836475</voucher_id>
                    <voucher_type>GIFT</voucher_type>
                </customer_voucher_full_open_info>
            </customer_voucher_full_open_info_list>
            <point_account>
                <available_point>23972836</available_point>
                <customer_id>20193893475</customer_id>
                <freeze_point>0</freeze_point>
                <total_expired_point>0</total_expired_point>
                <total_point>123123</total_point>
                <total_used_point>345345345</total_used_point>
            </point_account>
        </result>
        <result_code>结果码</result_code>
        <result_desc>结果描述</result_desc>
        <result_view>错误结果显示</result_view>
    </result>
</alibaba_alsc_crm_customer_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

返回
顶部