会员数据

接口说明

二维火提供商户会员数据接口,第三方系统可通过此接口获取商户会员数据

二维火商户和第三方系统商户进行id匹配;

接口定义

请求URL:

http://{servename}/router(二维火提供查询)

1、查询会员卡信息列表

method="dfire.shop.member.card.list"

传递参数为:

字段说明 字段名 类型 可空(Y/N) 举例
总部id entityId String N 所属总部
会员手机号码 mobile String Y  
会员卡号 code String Y  

传递form表单参数实例:

appKey:cdc08577b61942442aa89390dacb25ad
timestamp:1476255107097
sign:DF0719FCD2B0CE188307595BB39F5DE9488DD57E
v:1.0
locale:zh_CN
method:dfire.shop.member.card.list
entityId:99932175
mobile:
code:

返回参数为:

字段说明 字段名 类型 可空(Y/N) 默认值
会员卡信息 cardVoList List<CardVo> N  

CardVo

字段说明 字段名 类型 可空(Y/N) 默认值
实体Id entityId String N  
会员卡Id id String N  
会员Id customerId String N  
名字 customerName String N  
电话 customerMobile String Y  
性别 customerSex Integer N 0/未知;1/男;2/女
生日 customerBirthday String Y  
卡号 code String N  
内部ID号 innerCode String Y  
应收金额 pay BigDecimal N 0.00
预充值金额 preFee BigDecimal N 0.00
余额 balance BigDecimal N 0.00
赠送金额 giftBalance BigDecimal N 0.00
充值实际金额 realBalance BigDecimal N 0.00
积分 degree BigDecimal N 0.00
支付累积金额 payAmount BigDecimal N 0.00
消费累积金额 consumeAmount BigDecimal N 0.00
折扣累积金额 ratioAmount BigDecimal N 0.00
发卡时间 activeDate String N  
销售方Id sellerId String Y  
状态 status Integer N 0/未使用 1/正常 2/挂失 /3注销
领用状态 getStatus Integer N 0/未领用1/已领用
版本号 lastVer Integer N  
扩展字段 extendFields String N  

返回参数 实例:

{
        "success": true,
        "model": [
                {
                        "entityId": "99932175",

                        "id": "999299115920c56d0159210290070017",

                        "customerId": "999299115920c56d015921028fe30015",

                        "customerName": "无名氏",

                        "customerMobile": "13222224444",

                        "customerSex": 1,

                        "code": "8001",

                        "innerCode": "8001",

                        "pay": 0,

                        "preFee": 0,

                        "balance": 1313,

                        "giftBalance": 500,

                        "realBalance": 1000,

                        "degree": 0,

                        "payAmount": 187,

                        "consumeAmount": 0,

                        "ratioAmount": 0,

                        "activeDate": "1482317533",

                        "sellerId": "99929911591c25b601592088390e0100",

                        "status": 1,

                        "getStatus": 1,

                        "lastVer": 1,

                        "extendFields": "{}"

                }
        ],

        "totalRecord": 0
}

2、查询会员金额流水记录(按天)

method="dfire.shop.member.moneyflow.list"

传递参数为:

字段说明 字段名 类型 可空(Y/N) 举例
总部id entityId String N 所属总部
门店id shopEntityId String Y 所属门店
消费日期 currDate String N  
会员卡号 code String Y  
操作 action Integer Y 1/充值;2/支付;3/红冲; 4/支付回充

传递form表单参数实例:

appKey:cdc08577b61942442aa89390dacb25ad
timestamp:1476255107097
sign:DF0719FCD2B0CE188307595BB39F5DE9488DD57E
v:1.0
locale:zh_CN
method:dfire.shop.member.moneyflow.list
entityId:99932175
shopEntityId:
currDate:20161221
code:8001
action:1

返回参数为:

字段说明 字段名 类型 可空(Y/N) 默认值
金额流水记录 moneyFlowVoList List<MoneyFlowVo> N  

MoneyFlowVo

字段说明 字段名 类型 可空(Y/N) 默认值
实体Id entityId String N  
Id id String N  
会员卡Id cardId String N  
会员卡号 code String N  
操作门店 shopEntityId String N  
店铺名字 shopName String N  
生成时间 creatTime String N  
实收额 pay BigDecimal N  
发生额 fee BigDecimal N  
余额 balance BigDecimal N  
操作 action Integer N 1/充值;2/支付;3/红冲;4/支付回充
状态 status Integer N 1/充值;0/红冲
扩展字段 extendFields String Y  

返回参数 实例:

{
        "success": true,
        "model": [
                {
                        "entityId": "99932175",

                        "id": "9992991159205cf9015920b0cd1a002d",

                        "cardId": "9992991159205cf9015920a80d230018",

                        "code": "8001",

                        "shopEntityId": "XQCSMD1",

                        "creatTime": "1482312174",

                        "pay": 48,

                        "fee": 48,

                        "action": 2,

                        "balance": 1417,

                        "status": 1,

                        "shopName": "需求测试门店1",

                        "consumeDate": "1482312174"
                },

                {
                        "entityId": "99932175",

                        "id": "9992991159205cf9015920af16230029",

                        "cardId": "9992991159205cf9015920a80d230018",

                        "code": "8001",

                        "shopEntityId": "4003",

                        "creatTime": "1482312062",

                        "pay": 35,

                        "fee": 35,

                        "action": 2,

                        "balance": 1465,

                        "status": 1,

                        "shopName": "需求测试门店2",

                        "consumeDate": "1482312062"

                }
        ],
        "totalRecord": 0
}

3、查询会员积分流水记录(按天)

method="dfire.shop.member.degreeflow.list"

传递参数为:

字段说明 字段名 类型 可空(Y/N) 举例
总部id entityId String N 所属总部
门店Id shopEntityId String Y 所属门店
消费日期 currDate String N 20161001
会员卡号 code String Y  
操作 action Integer Y 1/消费积分;2/积分红冲;3/赠分;4/积分兑换

传递form表单参数实例:

appKey:cdc08577b61942442aa89390dacb25ad
timestamp:1476255107097
sign:DF0719FCD2B0CE188307595BB39F5DE9488DD57E
v:1.0
locale:zh_CN
method:dfire.shop.member.degreeflow.list
entityId:99932175
shopEntityId:
currDate:20161222
code:8001
action:1

返回参数为:

字段说明 字段名 类型 可空(Y/N) 默认值
金额流水记录 degreeFlowVoList List<DegreeFlowVo> N  

DegreeFlowVo

字段说明 字段名 类型 可空(Y/N) 默认值
实体Id entityId String N  
会员卡Id cardId String N  
会员卡编号 code String N  
所属门店 shopEntityId String N  
生成时间 creatTime String N  
积分变动额 num BigDecimal N  
所兑商品名 giftName String Y  
所兑商品数 quantity Integer Y  
操作 action Integer N 1/消费积分;2/积分红冲;3/赠分;4/积分兑换
积分 degree BigDecimal N  
扩展字段 extendFields String Y  
状态 status Integer N 赠分=1,红冲=0
操作时间 opTime String N  
店铺名字 shopName String N  
手机号码 customerMobile String Y  
会员名字 customerName String N  

返回参数 实例:

{
        "success": true,

        "model": [
                {
                        "entityId": "99932175",

                        "cardId": "999299115920c56d0159210290070017",

                        "code": "8001",

                        "shopEntityId": "99929913",

                        "num": 50,

                        "quantity": 0,

                        "action": 1,

                        "degree": 180,

                        "status": 1,

                        "creatTime": "20161222171",

                        "opTime": "20161222171",

                        "shopName": "002店",

                        "customerMobile": "13222224444",

                        "customerName": "无名氏"
                },
                {
                        "entityId": "99932175",

                        "cardId": "999299115920c56d0159210290070017",

                        "code": "8001",

                        "shopEntityId": "99929912",

                        "num": 70,

                        "quantity": 0,

                        "action": 1,

                        "degree": 130,

                        "status": 1,

                        "creatTime": "20161222171",

                        "opTime": "20161222171",

                        "shopName": "001店",

                        "customerMobile": "13222224444",

                        "customerName": "无名氏"
                }
        ],
        "totalRecord": 0
}

4、查询会员操作流水记录(按天)

method="dfire.shop.member.operate.list"

传递参数为:

字段说明 字段名 类型 可空(Y/N) 举例
总部Id entityId String N 所属总部
门店Id shopEntityId String Y 门店Id
消费日期 currDate String N 20161001
会员卡号 code String Y  
操作 action Integer Y 1/制卡 2/挂失 3/解挂 4/注销 5/领卡 6/还卡 7/激活 8/换卡 9/关联 10/失联 11/修改密码

传递form表单参数实例:

appKey:cdc08577b61942442aa89390dacb25ad
timestamp:1476255107097
sign:DF0719FCD2B0CE188307595BB39F5DE9488DD57E
v:1.0
locale:zh_CN
method:dfire.shop.member.operate.list
entityId:99932175
shopEntityId:
currDate:20161221
code:8001
action:1

返回参数为:

字段说明 字段名 类型 可空(Y/N) 默认值
金额流水记录 operateFlowVoList List<OperateFlowVo> N  

DegreeFlowVo

字段说明 字段名 类型 可空(Y/N) 默认值
实体Id entityId String N  
会员卡Id cardId String N  
会员卡编号 code String N  
所属门店 shopEntityId String N  
店铺名称 shopName String N  
生成时间 creatTime String N  
操作 action Integer N 1/制卡 2/挂失 3/解挂 4/注销 5/领卡 6/还卡 7/激活 8/换卡 9/关联 10/失联 11/修改密码
状态 status Integer N 领用=1,还回=0
操作时间 opTime String N  
手机号码 customerMobile String N  
会员名字 customerName String N  
金额操作 moneyflowAction Integer N  
金额状态 moneyflowStatus Integer N  
金额支付 moneyflowPay BigDecimal N  

返回参数 实例:

{
        "success": true,

        "model": [
                {
                        "entityId": "99932175",

                        "cardId": "9992991159205cf9015920a80d230018",

                        "code": "8001",

                        "shopEntityId": "XQCSMD1",

                        "action": 7,

                        "status": 1,

                        "creatTime": "1482311601",

                        "opTime": "1482311601",

                        "customerMobile": "13000010002",

                        "customerName": "无名氏"
                }
        ],
        "totalRecord": 0
}

5、保存会员信息

method="dfire.member.save"

传递参数为:

字段说明 字段名 类型 可空(Y/N) 说明
店铺entityId entityId String N  
会员卡列表 cardList String N MemberVo

MemberVo

字段说明 字段名 类型 可空(Y/N) 备注
会员来源 source Short N 必填
卡类型名称 kindCardName String N 必填
卡号 code String N 必填
内部卡号 innerCode String Y 没有会创建,有的话会检验是否重复
适用门店列表 applyShopEntityIdList List<String> Y 可不填,(连锁卡需填写使用门店)
手机号码 mobile String N 必填
手机区号 countryCode String N 必填
会员卡类型 kindCardType Short Y 可不填,(1:普通卡,2:特权卡)
卡状态 status Short Y 可不填,默认 1,(0:未使用1:正常2:挂失)
优惠方式 mode Integer Y 可不填 1/使用会员价;2/使用打折方案;3/设置折扣率
折扣率 ratio Integer Y 可不填,(按100为满单位)
密码 pwd String Y 可不填,(MD5加密)
会员名 customerName String Y 可不填
性别 sex Short Y 可不填,0-未知,1-男,2-女
生日 birth String Y 可不填 (年/月/日)
身份证号码 certificate String Y 可不填
公司 company String Y 可不填
备注 memo String Y 可不填
邮箱 email String Y 可不填
邮编 zipcode String Y 可不填
地址 address String Y 可不填
职务 pos String Y 可不填
职业 job String Y 可不填
微信号 weixin String Y 可不填
车牌 carNo String Y 可不填
本金余额 baseBalance Long Y 可不填 但不能为负数,(单位:分)
赠送部分余额 giveBalance Long Y 可不填 但不能为负数,(单位:分)
累计赠送金额 giftBalance Long Y 可不填 但不能为负数,(单位:分)
累计充值金额 realBalance Long Y 可不填 但不能为负数,(单位:分)
支付累计 payAmount Long Y 可不填 但不能为负数,(单位:分)
折扣累计 ratioAmount Long Y 可不填 但不能为负数,(单位:分)
消费累计 consumeAmount Long Y 可不填,(单位:分)
最后消费时间 lastConsumeTime Long Y 可不填
消费次数 consumeNum Integer Y 可不填
押金 pledge Long Y 可不填,(单位:分)

传递form表单参数实例:

method:dfire.member.registe,
appKey:4b6049876d240748ffdfff4d2ba694ac,
v:1.0,
locale:zh_CN,
timestamp:1491362593408,
entityId:99932175,
cardList:[{"source":3,"kindCardName":"金卡","code":"1004","innerCode":"1003","customerName":"毛豆","mobile":"15057162790","countryCode":"+86","sex":1,"birth":"2017/07/21","balance":0,"baseBalance":0,"giveBalance":0,"giftBalance":0,"realBalance":0,"degree":0,"payAmount":0,"ratioAmount":0,"status":1,"pay":0,"consumeAmount":0,"lastConsumeTime":0,"consumeNum":0,"kindCardType":1,"pledge":0,"refundAmount":0,"mode":3,"ratio":100,"applyShopEntityIdList":["99932176"]}],
sign:637E92125C7A2675823C2FC096BEBD8CA921E4DE

返回参数 实例:

{
        "success": true,

        "model": {

        },

        "totalRecord": 0
}

6、会员卡充值

method="dfire.shop.member.card.charge"

传递参数为:

字段说明 字段名 类型 可空(Y/N) 备注
总部店铺id entityId String N  
会员卡号 code String N  
手机号码 mobile String N  
充值金额 pay String N 充值金额(单位:分)
支付方式 payMode String N 1, "现金",2, "银行卡"3, "第三方支付",4, "赠送",5, "其它",6, "微信",7, "支付宝",8, "QQ支付";
充值方式 channelType String N 1:实体店 2:网上商店
充值日期 currDate String N yyyyMMdd
交易流水 thirdPayFlowId String N 第三方交易流水号
操作者姓名 operatorName String N  

传递form表单参数实例:

method:dfire.shop.member.card.charge,
appKey:4b6049876d240748ffdfff4d2ba694ac,
v:1.0,
locale:zh_CN,
timestamp:1491362593408,
entityId:99932175,
code:1001,
mobile:150********
pay:1000,
payMode:1,
channelType:2,
currDate:20170801,
thirdPayFlowId:201708010001,
operatorName:毛豆,
sign:637E92125C7A2675823C2FC096BEBD8CA921E4DE


返回参数为:

字段说明 字段名 类型 可空(Y/N) 默认值
交易流水ID   String N  

返回参数 实例:

{
        "success": true,
        "model": {bf2985f2b52f4536bd9e740be9683887},
        "totalRecord": 0
}

7、会员卡支付

method="dfire.shop.member.card.pay"

传递参数为:

字段说明 字段名 类型 可空(Y/N) 备注
店铺id entityId String N  
会员卡号 code String N  
手机号码 mobile String N  
订单Id orderId String N  
支付额度 needPayFee String N  
原始额度 originFee String N  
描述 title String N  

传递form表单参数实例:

method:dfire.shop.member.card.pay,
appKey:4b6049876d240748ffdfff4d2ba694ac,
v:1.0,
locale:zh_CN,
timestamp:1491362593408,
entityId:99932175,
mobile:150********
code:1001,
orderId:9918007951234567889,
needPayFee:100,
originFee:100.5,
title:商品名,
sign:637E92125C7A2675823C2FC096BEBD8CA921E4DE

返回参数为:

字段说明 字段名 类型 可空(Y/N) 默认值
交易流水ID   String N  

返回参数 实例:

{
        "success": true,
        "model": {bf2985f2b52f4536bd9e740be9683887},
        "totalRecord": 0
}

8、会员卡红冲

method="dfire.shop.member.card.cancel.charge"

传递参数为:

字段说明 字段名 类型 可空(Y/N) 备注
店铺id entityId String N  
会员卡号 code String N  
手机号码 mobile String N  
充值日期 currDate String N  
交易流水ID thirdPayFlowId String N  
操作者姓名 operatorName String N  

传递form表单参数实例:

method:dfire.shop.member.card.pay,
appKey:4b6049876d240748ffdfff4d2ba694ac,
v:1.0,
locale:zh_CN,
timestamp:1491362593408,
entityId:99932175,
mobile:150********
code:1001,
currDate:20170801,
thirdPayFlowId:201708010001,
operatorName:毛豆,
sign:637E92125C7A2675823C2FC096BEBD8CA921E4DE

返回参数 实例:

{
        "success": true,
        "model": {},
        "totalRecord": 0
}

9、更新会员卡状态

method="dfire.shop.member.card.status.update"

传递参数为:

字段说明 字段名 类型 可空(Y/N) 备注
店铺id entityId String N  
会员卡号 code String N  
手机号码 mobile String N  
卡状态 type String N 1-启用,2-挂失
操作者姓名 operatorName String N  

传递form表单参数实例:

method:dfire.shop.member.card.pay,
appKey:4b6049876d240748ffdfff4d2ba694ac,
v:1.0,
locale:zh_CN,
timestamp:1491362593408,
entityId:99932175,
mobile:150********
code:1001,
type:2,
operatorName:毛豆,
sign:637E92125C7A2675823C2FC096BEBD8CA921E4DE

返回参数 实例:

{
        "success": true,
        "model": {},
        "totalRecord": 0
}

10、会员消息推送(POST)

传递参数为:

字段说明 字段名 类型 可空(Y/N) 默认值
方法名 method String N dfire.shop.member.messages.push
用户key appKey String N  
时间戳 timestamp String N  
签名数字 sign String N  
版本号 v String N  
店铺Id entityId String N  
推送类型 eventType String N 1:会员卡消息,2:金额流水,3:操作流水
变更前 before String N JSON数据
变更后 after String N JSON数据

传递form表单参数实例:

appKey:cdc08577b61942442aa89390dacb25ad
timestamp:1476255107097
sign:DF0719FCD2B0CE188307595BB39F5DE9488DD57E
v:1.0
method:dfire.shop.member.messages.push
entityId:99932175
eventType:1
before:
after:

推送数据参数为:

1:会员卡消息

字段说明 字段名 类型 可空(Y/N) 默认值
会员卡Id id String N  
会员Id customerId String N  
名字 customerName String N  
电话 customerMobile String Y  
性别 customerSex Integer N 0/未知;1/男;2/女
生日 customerBirthday String Y  
卡号 code String Y  
内部卡号 innerCode String N  
余额 balance BigDecimal N  
赠送金额 giftBalance BigDecimal N  
充值金额 realBalance BigDecimal N  
积分 degree BigDecimal N  
支付累积金额 payAmount BigDecimal N  
消费累积金额 consumeAmount BigDecimal N  
折扣累积金额 ratioAmount BigDecimal N  
发卡时间 activeDate String N  
销售方Id sellerId String Y  
状态 status Integer N 0/未使用 1/正常 2/挂失 /3注销
领用状态 getStatus Integer N 0/未领用1/已领用
版本号 lastVer Integer N  
扩展字段 extendFields String N  

2:金额流水

字段说明 字段名 类型 可空(Y/N) 默认值
实体Id entityId String N  
流水ID id String N  
会员卡Id cardId String N  
会员卡号 code String N  
操作门店 shopEntityId String N  
店铺名字 shopName String N  
生成时间 creatTime String N  
实收额 pay BigDecimal N  
发生额 fee BigDecimal N  
余额 balance BigDecimal N  
操作 action Integer N 1/充值;2/支付;3/红冲;4/支付回充
状态 status Integer N 1/充值;0/红冲
扩展字段 extendFields String Y  

3:操作流水

字段说明 字段名 类型 可空(Y/N) 默认值
实体Id entityId String N  
会员卡Id cardId String N  
会员卡编号 code String N  
所属门店 shopEntityId String N  
店铺名称 shopName String N  
生成时间 creatTime String N  
操作 action Integer N 1/制卡 2/挂失 3/解挂 4/注销 5/领卡 6/还卡 7/激活 8/换卡 9/关联 10/失联 11/修改密码
状态 status Integer N 领用=1,还回=0
操作时间 opTime String N  
手机号码 customerMobile String N  
会员名字 customerName String N  

返回参数 实例:

{
        "success": true,

        "resultCode": "000",

        "message": "操作成功!"

}

11、查询会员卡脱敏信息列表

method="dfire.shop.member.card.desensitization.list"

传递参数为:

字段说明 字段名 类型 可空(Y/N) 举例
总部id entityId String N 所属总部
会员手机号码 mobile String Y  
会员卡号 code String Y  

传递form表单参数实例:

appKey:cdc08577b61942442aa89390dacb25ad
timestamp:1476255107097
sign:DF0719FCD2B0CE188307595BB39F5DE9488DD57E
v:1.0
locale:zh_CN
method:dfire.shop.member.card.desensitization.list
entityId:99932175
mobile:
code:

返回参数为:

字段说明 字段名 类型 可空(Y/N) 默认值
会员卡信息 cardVoList List<CardVo> N  

CardVo

字段说明 字段名 类型 可空(Y/N) 默认值
实体Id entityId String N  
会员卡Id id String N  
会员Id customerId String N  
性别 customerSex Integer N 0/未知;1/男;2/女
生日 customerBirthday String Y  
卡号 code String N  
内部ID号 innerCode String Y  
应收金额 pay BigDecimal N 0.00
预充值金额 preFee BigDecimal N 0.00
余额 balance BigDecimal N 0.00
赠送金额 giftBalance BigDecimal N 0.00
充值实际金额 realBalance BigDecimal N 0.00
积分 degree BigDecimal N 0.00
支付累积金额 payAmount BigDecimal N 0.00
消费累积金额 consumeAmount BigDecimal N 0.00
折扣累积金额 ratioAmount BigDecimal N 0.00
发卡时间 activeDate String N  
销售方Id sellerId String Y  
状态 status Integer N 0/未使用 1/正常 2/挂失 /3注销
领用状态 getStatus Integer N 0/未领用1/已领用
版本号 lastVer Integer N  
扩展字段 extendFields String N  

返回参数 实例:

{
        "success": true,
        "model": [
                {
                        "entityId": "99932175",

                        "id": "999299115920c56d0159210290070017",

                        "customerId": "999299115920c56d015921028fe30015",

                        "customerSex": 1,

                        "code": "8001",

                        "innerCode": "8001",

                        "pay": 0,

                        "preFee": 0,

                        "balance": 1313,

                        "giftBalance": 500,

                        "realBalance": 1000,

                        "degree": 0,

                        "payAmount": 187,

                        "consumeAmount": 0,

                        "ratioAmount": 0,

                        "activeDate": "1482317533",

                        "sellerId": "99929911591c25b601592088390e0100",

                        "status": 1,

                        "getStatus": 1,

                        "lastVer": 1,

                        "extendFields": "{}"

                }
        ],

        "totalRecord": 0
}