3.1会员信息类


3.1.1会员账户信息查询

根据会员手机号等信息查询会员余额、积分、优惠券等信息。

接口方法:

method: allinpay.shopoint.memberService.memberQuery

version: 1.0

业务请求参数

字段名

参数类型

必填

最大长度

说明

取值

idType

String

 

会员账号类型

1-   手机号

2-   会员卡号

3-   Openid

4-   会员动态码

5-   外部会员ID

6-   内部会员ID

memberId

String

 

会员账号

 

shopId

String

 

店铺ID

输入则couponList只返回该店铺下的可用优惠券

couponStatus

Integer

 

 

0 - 全部有效卡券

1 – 当前可用卡券

6 – 无效卡券

不填默认为1

shopCode

String

 

店铺号

与shopId功能相同,shopId和shopCode同时输入则只取shopId

operUserId

String

 

收银员

输入则couponList只返回该收银员所在店铺的可用优惠券,如shopId和operUserId同时输入则,operUserId应属于shopId店铺

statusList

List

 

券状态,若有传入则忽略入参couponStatus

0- 有效

1- 已冻结

2- 已作废

3- 已核销

5– 转赠中

9– 退款中

balanceGt

Integer

 

余额,单位(分)

-1,0,正数

validityBeginDateLe

String

 

可用开始日期小于等于该日期

yyyy-MM-dd HH:mm:ss

validityBeginDateGe

String

 

 可用开始日期大于等于该日期

yyyy-MM-dd HH:mm:ss

validityEndDateLe

String

 

可用结束日期小于等于该日期

yyyy-MM-dd HH:mm:ss

validityEndDateGe

String

 

可用结束日期大于等于该日期

yyyy-MM-dd HH:mm:ss

pageNo

Integer

 

券列表的页码

取值范围为1到1000, 非法值将会重设为默认值.  默认值1

pageSize

Integer

 

券列表的每页数量

取值范围为1到200, 非法值将会重设为默认值.  默认值200

业务响应参数

字段名

参数类型

必填

最大长度

说明

取值

code

Integer

 

返回码

0:表示成功;

3:表示失败,具体失败原因参见msg字段;

其他:参见4.1 公共返回码

msg

String

 

错误信息

 

data

cardNo

 

String

  实体会员卡号

 

orgId

 

String

  机构号

 

balance

 

String

  余额

单位:元

status

 

Integer

  会员状态

0:正常

1:冻结

score

 

String

  积分

 

couponTotal

 

Integer

  券总数量

 

couponList

 

 

  可用券列表

 

couponList

templateId

Integer

  模板ID

 

cardNo

Integer

  卡号

 

couponNo

String

  券号

 

couponName

String

  券名称

 

couponType String   券类型 0 现金卡1 代金券2 计次券3 满减活动券
unit String   券单位 计次券有效
balance BigDecimal   余额  
validityBeginDate String   有效期起始日期  
validityEndDate String   有效期终止日期  
hasPassword Boolean   卡是否有密码  true:有密码false:无密码
unusableReason String   不可用券原因  
status Integer   券状态 态,0 - 有效 1 - 冻结 2 - 已作废 3 - 已核销 100 - 待生成
rangeTime String   可用时间 不返回表示不限制,否则解析字符串获取设定规则 示例: 9:30~10:30,17:00~19:00
rangeDate Integer   可用日期 不返回表示不限制,否则解析字符串获取设定。具体解析方法请参考SDK工具包中的DateUtils.getDatesInt方法。 
rangeDayOfWeek Integer   周几可用 不返回表示不限制,否则解析字符串获取设定。具体解析方法请参考SDK工具包中的DateUtils.getWeeksInt方法。
usableAmount BigDecimal   每满多少金额可以使用1张 满减券使用
usableMaxNum Integer   每笔订单最大优惠金额 满减券使用
instruction String   券使用须知  
           

 

请求示例

{"idType":"1","memberId":"13882177104"}

响应示例

{

    "code": 0,

    "data": {

        "templateId": 794,

        "couponNo": "10000000000001607134",

        "couponName": "商品删除测试",

        "couponType": 0,

        "balance": 1,

        "unit": null,

        "rangeDate": 2102013412,

        "rangeDayOfWeek": 42,

        "rangeTime": “9:30~10:30,19:30~22:30”,

        "validityType": null,

        "validityBeginDate": [

            2020,

            4,

            7,

            0,

            0

        ],

        "validityEndDate": [

            2020,

            5,

            7,

            0,

            0

        ]

    },

    "token": "QX1YbSPkNEbu5x1EDKzXDJtxy86sQnO6ExGe9nWs"

}

3.1.5会员注册

method: allinpay.shopoint.memberService.memberRegister

version: 1.0

业务请求参数

字段名

参数类型

必填

最大长度

说明

取值

mobile

String

 

手机号

 

openid

String

 

微信机构公众号openid

 

wechatAppOpenId

String

 

微信小程序OpenId

 

cardNo

String

 

会员卡号

 

memberLevelId

Integer

  会员等级

 

name

String

  姓名

 

gender

String

  性别

 

nickName

String

  昵称

 

birthday

String

  生日

示例:1990-03-09

carLicenseNo

String

  车牌号

 

refereeSysno

Integer

  推荐人ID

 

referee

String

  推荐人

 

bindShopId

Integer

  归属门店Id

对接方为智慧门店时有效;对接方为通惠时无效

同时传入归属门店Id和归属门店编号时,以Id为准

bindShopCode

String

  归属门店编号

对接方为智慧门店时有效;对接方为通惠时无效

同时传入归属门店Id和归属门店编号时,以Id为准

remark

String

  备注

 

 

业务响应参数

字段名

参数类型

必填

最大长度

说明

取值

code

Integer

 

返回码

0:表示成功;

3:表示失败,具体失败原因参见msg字段;

其他:参见4.1 公共返回码

msg

String

 

错误信息

 

data

customerId

Integer

 

会员ID

 

             

 

请求示例

{"mobile":"18616721282","cardNo":"138821"}

响应示例

{

    "code": 0,

    "data": {

        "customerId": 1,

}

}

 

 

3.1.6统一登录注册

接口使用方式推荐

method: allinpay.shopoint.memberService.memberUnionLogin

version: 1.0

业务请求参数

字段名

参数类型

必填

最大长度

说明

取值

userId

String

180

用户唯一编号

Scope=4时必传

mobile

String

11

手机号

userId与mobile必传一个,加密传输(详见2.3.4)

scope

Integer

4

登录系统类型

1-微商城C端 2 - 小微商户ISV平台 3 - 机构商户ISV平台 4-商户后台 5-微商城B端  6-小微B端

 

业务响应参数

字段名

参数类型

必填

最大长度

说明

取值

code

Integer

 

返回码

0:表示成功;

3:表示失败,具体失败原因参见msg字段;

其他:参见4.1 公共返回码

msg

String

 

错误信息

 

data

customerId

Integer

 

会员ID

Scope=1时必填

userId

String

 

后台用户ID

Scope=4时必填

orgId

Integer

 

机构ID

 

authToken

String

 

会员登录token

 

 

expire

Integer

 

Token有效时间

单位:秒

 

请求示例

{"mobile":"18616721282"}

响应示例

{

    "code": 0,

    "data": {

        "customerId": 1,

" orgId": 1,

" authToken": "OAccFQ9LZ9+B1Jhn9Tb1v37GssdmohZhAdjgYTWz"

}

}

 

跳转地址

序号

产品

环境

模块

跳转地址示例

说明

1

通惠

测试

首页

https://dms-test.shopoint.cn/wxmall/index.html#/bank?orgId=<机构号>&authToken=<authToken>

C端首页

我的卡券

https://dms-test.shopoint.cn/wxmall/index.html#/BankCoupon?orgId=<机构号>&authToken=<authToken>

C端用户卡包

我的

https://dms-test.shopoint.cn/wxmall/index.html#/BankCenter?orgId=<机构号>&authToken=<authToken>

C端用户个人中心

客户经理

https://dms-test.shopoint.cn/wxmall/index.html#/bankdgIndex?orgId=<机构号>&authToken=<authToken>

银行客户经理端首页

机构后台

https://dms-test.shopoint.cn/mcht/index.html#/home?authToken={authToken}

银行机构后台首页

生产

首页

https://dms.shopoint.cn/wxmall/index.html#/bank?orgId=<机构号>&authToken=<authToken>

C端首页

我的卡券

https://dms.shopoint.cn/wxmall/index.html#/BankCoupon?orgId=<机构号>&authToken=<authToken>

C端用户卡包

我的

https://dms.shopoint.cn/wxmall/index.html#/BankCenter?orgId=<机构号>&authToken=<authToken>

C端用户个人中心

客户经理

https://dms.shopoint.cn/wxmall/index.html#/bankdgIndex?orgId=<机构号>&authToken=<authToken>

银行客户经理端首页

机构后台

https://dms.shopoint.cn/mcht/index.html#/home?authToken={authToken}

银行机构后台首页

2

智慧门店

测试

首页

https://dms-test.shopoint.cn/wxmall/index.html#/?orgId=<机构号>&authToken=<authToken>

C端首页

我的卡券

https://dms-test.shopoint.cn/wxmall/index.html#/cardCouponWalletIndex?orgId=<机构号>&authToken=<authToken>

C端用户卡包

我的

https://dms-test.shopoint.cn/wxmall/index.html#/UserIndex?orgId=<机构号>&authToken=<authToken>

C端用户个人中心

导购

https://dms-test.shopoint.cn/wxmall/index.html#/dgIndex?orgId=<机构号>&authToken=<authToken>

导购端首页

商户后台

https://dms-test.shopoint.cn/mcht/index.html#/home?authToken={authToken}

管理后台首页

门店消费

https://dms-test.shopoint.cn/wxmall/index.html#/orderOffline?orgId=<机构号>&authToken=<authToken>

C端用户线下消费列表

 

 

 

生产

首页

https://dms.shopoint.cn/wxmall/index.html#/?orgId=<机构号>&authToken=<authToken>

C端首页

我的卡券

https://dms.shopoint.cn/wxmall/index.html#/cardCouponWalletIndex?orgId=<机构号>&authToken=<authToken>

C端用户卡包

我的

https://dms.shopoint.cn/wxmall/index.html#/UserIndex?orgId=<机构号>&authToken=<authToken>

C端用户个人中心

导购

https://dms.shopoint.cn/wxmall/index.html#/dgIndex?orgId=<机构号>&authToken=<authToken>

导购端首页

商户后台

https://dms.shopoint.cn/mcht/index.html#/home?authToken={authToken}

管理后台首页

门店消费

https://dms.shopoint.cn/wxmall/index.html#/orderOffline?orgId=<机构号>&authToken=<authToken>

C端用户线下消费列表

 

 

 

3

ISV

测试

收银台

https://dms-api-test.shopoint.cn/shopoint-micro-web/isv/checkout?authtoken=<authToken>[&其他参数]

智慧小店ISV收银台

生产

收银台

https://dms-api.shopoint.cn/shopoint-micro-web/isv/checkout?authtoken=<authToken>[&其他参数]

智慧小店ISV收银台

3.1.10会员基本信息查询

根据会员手机号等信息查询会员基本信息。

接口方法:

method: allinpay.shopoint.memberService.memberBasicQuery

version: 1.0

业务请求参数

字段名

参数类型

必填

最大长度

说明

取值

idType

String

4

会员账号类型

1-手机号

2-会员卡号

3-Openid

4-会员动态码

5-外部会员ID

6-内部会员ID

7-会员唯一ID

memberId

String

180

会员账号

 

业务响应参数

字段名

参数类型

必填

最大长度

说明

取值

code

Integer

 

返回码

0:表示成功;

3:表示失败,具体失败原因参见msg字段;

其他:参见4.1 公共返回码

msg

String

 

错误信息

 

data

cardNo

String

  实体卡号

 

mobile

String

  手机号

 

unionId

String

  会员唯一ID

 

openId

String

  用户机构公众号openid

 

wechatAppOpenId

String

  用户微信小程序openId

 

qrcode

String

  用户动态二维码

 

status

Integer

  会员状态

0:正常

1:冻结

score

String

  用户可用积分

 

memberLevelId

Integer

  会员等级ID

 

memberLevel

String

  会员等级

 

name

String

  姓名

 

gender

String

  性别

 

nickName

String

  昵称

 

carLicenseNo

String

  车牌号

 

refereeSysno

Integer

  导购推荐人ID

 

referee

String

  导购推荐人

 

refereeCustomerId

Integer

  会员推荐人ID

 

refereeCustomer

String

  会员推荐人

 

bindFromShopId

Integer

  推荐门店ID

 

bindFromShopName

String

  推荐门店

 

customerId

Integer

  会员编号ID

 

customerName

String

  会员名称

 

createTime

String

  会员注册时间

yyyy-MM-dd HH:mm:ss

 

请求示例

{“idType”:”1”,”memberId”:”13882177104”}

响应示例

{

“code”: 0,

“data”: {

        “cardNo”: “121222432432412”,

        “mobile”: “13882177104”,

        “memberLevelId”: 13131,

        “memberLevel”: “1”,

        “customerId”: 1

},

“token”: “QX1YbSPkNEbu5x1EDKzXDJtxy86sQnO6ExGe9nWs”

}

3.1.34会员信息更新

接口方法:            

method: allinpay.shopoint.memberService.memberBasicUpdate

version: 1.0

业务请求参数

字段名

参数类型

必填

最大长度

说明

取值

idType

 Integer

 

会员账号类型

1-手机号,2-会员卡号,3-Openid,4-会员动态码,5-外部会员ID,6-内部会员ID

memberId

String

 

需要修改的会员账号

 

mobile

String

 

修改后的手机号

 

tags

String

 

修改后的会员标签

逗号分隔

memberLevelId

String

 

修改后的会员等级

 

name

String

 

修改后的姓名

 

gender

String

 

修改后的性别

 

nickName

String

 

修改后的昵称

 

birthday

String

 

修改后的生日

yyyy-M-d

carLicenseNo

String

 

修改后的车牌号

 

 

业务响应参数

字段名

参数类型

必填

最大长度

说明

取值

code

Integer

4

返回码

0:表示成功;

3:表示失败,具体失败原因参见msg字段;

其他:参见4.1 公共返回码

msg

String

200

错误信息

 

 

 

 

 

data

orgId

Integer

 

机构id

 

memberLevelId

Integer

 

修改后的会员等级ID

 

name

String

 

修改后的姓名

 

gender

String

 

修改后的性别

 

nickName

String

 

修改后的昵称

 

birthday

String

 

修改后的生日

yyyy-M-d

carLicenseNo

String

 

修改后的车牌号

 

请求示例

{

"idType": "1",

"memberId": "18097944999"

 

}

响应示例

{

   "orgId": 100152,

   "memberLevelId": "194"   

}

 

3.1.35会员账户流水

接口方法:            

method: allinpay.shopoint.memberService.memberAccountPageQuery

version: 1.0

业务请求参数

字段名

参数类型

必填

最大长度

说明

取值

token

String

 

调用3.1.6 统一登录(scope=4)后获得的token。

 

pageNo

Integer

 

页码

不填默认1, 最小为1

 

accountType

 Integer

 

账户类型

4-积分, 5-余额

changeTypeList

List

 

变更方式集合

accountType为4:23-后台会员充值,36-商城售券积分抵扣,37-商城兑换,38-积分消费,40-后台调账,42-接口核券,52-订单消费送积分,53-权益赠送(注册),54-权益赠送(完善资料),55-权益赠送(首单礼),58-接口会员积分充值,59-接口会员积分消费,62-导购直接核会员积分,65-会员生日送积分,67-在线充值送积分,68-POS充值送积分,69-直接核销券或会员余额送积分,72-接口会员积分调账,76-会员升降级送积分,77-会员推荐送积分,311-订单撤销交易,312-API接口撤销交易;

accountType为5:21-POS充值,22-在线充值,23-后台会员充值,30-大众码牌订单核券,31-POS订单核券,32-商城消费,34-POS直接核券,40-后台调账,42-接口核券,56-接口会员余额充值,57-接口会员余额消费,61-导购直接核会员余额,71-接口会员余额调账,311-订单撤销交易,312-API接口撤销交易

operUser

String

 

操作人

 

shopName

String

 

门店名称

 

shopId

Integer

 

门店Id

 

memberName

String

 

会员姓名

 

memberMobile

String

 

会员手机号

 

beginTime

String

 

开始时间

时间格式:yyyy-dd-MM HH:mm:ss

endTime

String

 

结束时间

时间格式:yyyy-dd-MM HH:mm:ss

orderCode

String

 

订单号

 

outCardNo

String

 

外部卡号

 

dimension

Integer

 

查询维度

1-会员归属,2-操作归属

 

业务响应参数

字段名

参数类型

必填

最大长度

说明

取值

code

Integer

4

返回码

0:表示成功;

3:表示失败,具体失败原因参见msg字段;

其他:参见4.1 公共返回码

msg

String

200

错误信息

 

 

 

 

 

data

total

Integer

 

总数

只在第1页中返回交易流水总条数

current

Integer

 

分页页码

 

size

Integer

 

分页大小

 

records

List

 

流水分页

 

 

accountTypeDesc

String

 

账户类型

 

recharge

BigDecimal

 

充值

单位:元/分

give

BigDecimal

 

赠送数量

单位:元/分

changeTime

String

 

变动时间

时间格式:yyyy-dd-MM HH:mm:ss

changeTypeDesc

String

 

变动方式

见入参changeTypeList枚举描述

shopName

String

 

门店名称

 

outCardNo

String

 

外部卡号

 

memberName

String

 

会员姓名

 

memberMobile

String

 

会员手机号

 

memberNickName

String

 

会员昵称

 

orderCode

String

 

订单号

 

operUser

String

 

操作人

 

remark

String

 

备注

 

请求示例

{

    "pageNo":1,

    "accountType":5,

    "beginTime":"2023-10-01 00:00:00",

    "endTime":"2023-10-31 23:59:59",

    "changeTypeList":[

        21

    ],

    "operUser":"hl导购",

    "memberName":"姓名997",

    "memberMobile":"13882177387",

    "shopName":"星巴克光华店"

}

响应示例

{

    "records":[

        {

            "accountType":会员余额,

            "recharge":1,

            "give":0,

            "changeTime":"2023-10-17 16:25:10",

            "changeTypeDesc":后台会员充值,

            "outCardNo":"6221886510045797175",

            "memberName":"姓名997",

            "memberMobile":"13882177387",

            "operUser":"hl导购",

            "orderCode":"60907050341112017866"

        }

    ],

    "total":1,

    "size":500,

    "current":1,

    "pages":1

}

3.1.37 获取用户基本信息(OAuth2)

用户授权第三方获取用户基本信息。

用户授权入口:https://dms.shopoint.cn/wxmall/index.html#openapi/oauth2/authorize?appId={appid}&redirectUri={redirectUri}&responseType=code&scope=snsapi_mobile&state=STATE

注意:替换appid和redirectUri。通惠将会把请求重定向到指定的redirectUri,并在URL中携带code参数,如http://mydomain.com?myparam=myvalue&code=xxx。接下来,对接方使用标准接口(allinpay.shopoint.oauth2.userInfo)通过code获取用户的手机号等已授权信息。

接口方法:

method: allinpay.shopoint.oauth2.userInfo

version: 1.0

业务请求参数

字段名

参数类型

必填

最大长度

说明

取值

code

String

50 获取用户基本信息所使用的code

注意:

1.该code的有效期为5分钟,过期自动作废。

2.该code具有一次性特点,使用后自动作废。

3.该code仅能由对应的appId使用。

业务响应参数

字段名

参数类型

必填

最大长度

说明

取值

code

Integer

 

返回码

0:表示成功;

3:表示失败,具体失败原因参见msg字段;

其他:参见4.1 公共返回码

msg

String

 

错误信息

 

data

String

 

用户授权的基本信息

JSON格式的字符串

 

3.1.38 获取基础营销授权链接

获取基础营销授权链接,在微信中访问获取基础营销的用户信息,获取成功后回调到指定url并带上用户信息(?appid=&openid=&sign=&state=&unionid=&userid=)

接口方法:

method: allinpay.shopoint.memberService.dsktAuthUrl

version: 1.0

业务请求参数

字段名

参数类型

必填

最大长度

说明

取值

redirectUrl

String

 

授权后的回调url

 

state

String

 

 

 

业务响应参数

字段名

参数类型

必填

最大长度

说明

取值

code

Integer

 

返回码

0:表示成功;

3:表示失败,具体失败原因参见msg字段;

其他:参见4.1 公共返回码

msg

String

 

错误信息

 

data

String

 

授权链接

 


陈静chenjing3 2025年3月25日 17:56 收藏文档