会员API说明
| 接口地址 | http://host:port/pospal-api2/openapi/v1/customerOpenApi/queryByNumber | ||
|---|---|---|---|
| 请求头 |
|
||
| 请求方式 | POST | ||
| 请求体 |
|
||
| 参数名 | 是否必须 | 类型 | 说明 |
| appId | 是 | String | Pospal配置的访问凭证 |
| customerNum | 是 | String | 会员号 |
| groupShare | 否 | int | 分组共享:只有后台连锁会员共享设置是分组共享时,该字段才有意义。传1 表示,严格按照分组共享逻辑查询。比如a,b 2家店是一组,c,d是一组,groupShare=1时,a店能查到b店的,但查不到c店的会员 |
| queryCustomerDepartment | 否 | int | 是否查询部门(仅团餐业务支持) 1:是 0或空:否(默认) |
| 返回结果 |
|
||
| 字段名 | 类型 | 说明 | |
| status | String | 是否正确处理请求,返回success或error,不区分大小写 | |
| messages | String[] | 处理结果的消息 | |
| errorCode | int | 业务处理的错误代码,参见错误代码表 | |
| customerUid | long | 会员在银豹系统的唯一标识 | |
| categoryName | String | 会员所属分类名称 | |
| number | String | 会员号 | |
| name | String | 会员姓名 | |
| point | BigDecimal | 会员当前积分 | |
| discount | BigDecimal | 会员享受的折扣,60%以60表示 | |
| balance | BigDecimal | 会员当前通用余额 | |
| phone | String | 会员联系电话 | |
| birthday | String | 会员生日 | |
| String | QQ号 | ||
| String | 会员邮箱 | ||
| address | String | 会员住址 | |
| remarks | String | 备注信息 | |
| createdDate | String | 创建会员的日期 | |
| onAccount | int | 是否允许赊账,1表示允许 | |
| enable | int | -1:删除;0:禁用;1:可用; | |
| password | String | 调用encryptToMd5String(String content)处理 | |
| expiryDate | String | 到期日期 | |
| createStoreAppIdOrAccount | String | 开卡门店 | |
| department | String | 部门(仅团餐业务支持) | |
| weixinOpenIds | List | 微信openId相关信息 | |
| openId | String | openId | |
| openIdType | int | 0公众号 1小程序 1000微信UnionId | |
| extInfo | Json | 扩展信息 | |
| sex | Int | 性别:1-男,0-女,NULL未填写 | |
| lunarBirthday | String | 阴历生日 | |
| totalPoint | BigDecimal | 累计积分 | |
| creditLimit | BigDecimal | 赊账额度 | |
| creditPeriod | BigDecimal | 赊账账期,单位天 | |
| photoPath | String | 会员照片路径 返回的不带域名,请自行加上域名:https://imgw.pospal.cn | |
| nickName | String | 会员昵称 | |
| subsidyAmount | BigDecimal | 补贴余额 | |
| 接口地址 | http://host:port/pospal-api2/openapi/v1/customerOpenApi/queryByUid | ||
|---|---|---|---|
| 请求头 |
|
||
| 请求方式 | POST | ||
| 请求体 |
|
||
| 参数名 | 是否必须 | 类型 | 说明 |
| appId | 是 | String | Pospal配置的访问凭证 |
| customerUid | 是 | Long | 会员在银豹系统的唯一标识 |
| groupShare | 否 | int | 分组共享:只有后台连锁会员共享设置是分组共享时,该字段才有意义。传1 表示,严格按照分组共享逻辑查询。比如a,b 2家店是一组,c,d是一组,groupShare=1时,a店能查到b店的,但查不到c店的会员 |
| queryCustomerDepartment | 否 | int | 是否查询部门(仅团餐业务支持) 1:是 0或空:否(默认) |
| 返回结果 |
| ||
| 字段名 | 类型 | 说明 | |
|
| |||
| 接口地址 | http://host:port/pospal-api2/openapi/v1/customerOpenApi/queryCustomerPages | ||
|---|---|---|---|
| 请求头 |
|
||
| 请求方式 | POST | ||
| 请求体 |
|
||
| 参数名 | 是否必须 | 类型 | 说明 |
| appId | 是 | String | Pospal配置的访问凭证 |
| startCreateDateTime | 否 | String | 创建时间,格式为yyyy-MM-dd HH:mm:ss,包含开始时间 |
| groupShare | 否 | int | 分组共享:只有后台连锁会员共享设置是分组共享时,该字段才有意义。传1 表示,严格按照分组共享逻辑查询。比如a,b 2家店是一组,c,d是一组,groupShare=1时,a店能查到b店的,但查不到c店的会员 |
| queryCustomerDepartment | 否 | int | 是否查询部门(仅团餐业务支持) 1:是 0或空:否(默认) |
| postBackParameter | 否 | Json | 查询首页时可以不传,之后的内容从返回结果中取出 |
| parameterType | 是 | String | 从返回结果中取出 |
| parameterValue | 是 | String | 从返回结果中取出 |
| 返回结果 |
|
||
| 字段名 | 类型 | 说明 | |
| status | String | 是否正确处理请求,返回success或error,不区分大小写 | |
| messages | String[] | 处理结果的消息 | |
| errorCode | int | 业务处理的错误代码,参见错误代码表 | |
| pageSize | int | 本次查询预期从数据库中取出记录数,如果结果集的长度小于pageSize,不需要进行下一页查询 | |
| postBackParameter | json | 分页查询回传到服务器的参数结构从第二页开始必须回传,如果没传,每次查询都是第一页 | |
| parameterType | String | 从返回结果中直接取出用于回传,不能变其值 | |
| parameterValue | String | 从返回结果中直接取出用于回传,不能变其值 | |
| result | List |
会员字段参照1.根据会员号查询会员 | |
| 接口地址 | http://host:port/pospal-api2/openapi/v1/customerOpenApi/updateBaseInfo | ||
|---|---|---|---|
| 请求头 |
|
||
| 请求方式 | POST | ||
| 请求体 |
|
||
| 参数名 | 是否必须 | 类型 | 说明 |
| appId | 是 | String | Pospal配置的访问凭证 |
| customerUid | 是 | Long | 会员在银豹系统的唯一标识 |
| name | 否 | String | 会员姓名,传空或不传不做修改操作 |
| phone | 否 | String | 会员联系电话,传空或不传不做修改操作 |
| birthday | 否 | String | 会员生日,传空或不传不做修改操作 |
| 否 | String | QQ号,传空或不传不做修改操作 | |
| 否 | String | 会员邮箱,传空或不传不做修改操作 | |
| address | 否 | String | 会员住址,传空或不传不做修改操作 |
| remarks | 否 | String | 备注信息,传空或不传不做修改操作 |
| enable | 否 | Integer | 会员状态,1可用、0禁用、-1删除,不传不做修改操作 |
| categoryName | 否 | String | 会员分类名称 |
| discount | 否 | BigDecimal | 会员折扣,如果会员价打9折,传90 会员价=折扣前价格 * discount / 100 |
| onAccount | 否 | Integer | 是否可赊账:1可赊账,0不可赊账 |
| expiryDate | 否 | String | 到期日期 格式:yyyy-MM-dd HH:mm:ss |
| extInfo | 否 | Json | 扩展信息 |
| sex | 否 | Int | 性别:1-男,0-女,NULL未填写 |
| lunarBirthday | 否 | String | 阴历生日 |
| totalPoint | 否 | BigDecimal | 累计积分 |
| creditLimit | 否 | BigDecimal | 赊账额度 |
| creditPeriod | 否 | BigDecimal | 赊账账期,单位天 |
| nickName | 否 | String | 会员昵称 |
| 返回结果 |
|
||
| 字段名 | 类型 | 说明 | |
| status | String | 是否正确处理请求,返回success或error,不区分大小写 | |
| messages | String[] | 处理结果的消息 | |
| errorCode | int | 业务处理的错误代码,参见错误代码表 | |
| 接口地址 | http://host:port/pospal-api2/openapi/v1/customerOpenApi/updateBalancePointByIncrement | ||
|---|---|---|---|
| 请求头 |
|
||
| 请求方式 | POST | ||
| 请求体 |
|
||
| 参数名 | 是否必须 | 类型 | 说明 |
| appId | 是 | String | Pospal配置的访问凭证 |
| customerUid | 是 | Long | 会员在银豹系统的唯一标识 |
| balanceIncrement | 否 | BigDecimal | 金额增长量,修改结果为银豹系统中的会员余额+balanceIncrement    传负数,表示扣减 |
| pointIncrement | 否 | BigDecimal | 积分增长量, 修改结果为银豹系统中的会员积分+ pointIncrement    传负数,表示扣减 |
| dataChangeTime | 是 | String | 调用方的金额变动时间,格式为yyyy-MM-dd HH:mm:ss,不可为空。 2次请求时,如果customerUid 跟 dataChangeTime 都一样,会报错:重复提交修改 |
| validateBalance | 否 | int | 当balanceIncrement为负数时,是否校验。1:校验 0或空:不校验(默认) 检验逻辑:扣完不能为负数或不许超过会员赊账额度。假设会员当前余额5元,balanceIncrement=-6,且会员不许赊账,则报错 |
| validatePoint | 否 | int | 当pointIncrement为负数时,是否校验。1:校验 0或空:不校验(默认) 检验逻辑:扣完不能为负数。假设会员当前5积分,pointIncrement=-6,则报错 |
| remark | 否 | String | 备注 |
| 返回结果 |
|
||
| 字段名 | 类型 | 说明 | |
| status | String | 是否正确处理请求,返回success或error,不区分大小写 | |
| messages | String[] | 处理结果的消息 | |
| errorCode | int | 业务处理的错误代码,参见错误代码表 | |
| customerUid | Long | 会员在银豹系统的唯一标识 | |
| balanceBeforeUpdate | BigDecimal | 修改前会员余额 | |
| balanceAfterUpdate | BigDecimal | 修改后会员余额 | |
| balanceIncrement | BigDecimal | 余额变动量 | |
| pointBeforeUpdate | BigDecimal | 修改前会员积分 | |
| pointAfterUpdate | BigDecimal | 修改后会员积分 | |
| pointIncrement | BigDecimal | 会员积分变动量 | |
| dataChangeTime | String | 数据在调用方的变动时间 | |
| updateCustomerTime | String | 更新到银系统时间的时间 | |
| 接口地址 | http://host:port/pospal-api2/openapi/v1/customerOpenApi/add | ||
|---|---|---|---|
| 请求头 |
|
||
| 请求方式 | POST | ||
| 请求体 |
|
||
| 参数名 | 是否必须 | 类型 | 说明 |
| appId | 是 | String | Pospal配置的访问凭证 |
| categoryName | 否 | String | 会员所属分类名称 |
| number | 是 | String | 会员号 |
| name | 是 | String | 会员姓名,不知道姓名,可填会员号或联系电话 |
| phone | 是 | String | 会员联系电话 |
| birthday | 否 | String | 会员生日, 默认为空 |
| 否 | String | QQ号, 默认为空 | |
| 否 | String | 会员邮箱,默认为空 | |
| address | 否 | String | 会员住址,认为空 |
| remarks | 否 | String | 备注信息,默认为空 |
| point | 否 | BigDecimal | 会员积分,默认为0 |
| discount | 否 | BigDecimal | 会员折扣,0-100,默认为100(不打折) |
| balance | 否 | BigDecimal | 会员余额,默认为0 |
| enable | 否 | Int | -1:删除;0:禁用;1:可用; |
| onAccount | 否 | Int | 是否允许会员赊账,0或1,默认为1 |
| expiryDate | 否 | String | 到期日期 格式:yyyy-MM-dd HH:mm:ss |
| password | 否 | String | 会员密码(明文),长度为1~16位 |
| extInfo | 否 | Json | 扩展信息 |
| sex | 否 | Int | 性别:1-男,0-女,NULL未填写 |
| lunarBirthday | 否 | String | 阴历生日 |
| totalPoint | 否 | BigDecimal | 累计积分 |
| creditLimit | 否 | BigDecimal | 赊账额度 |
| creditPeriod | 否 | BigDecimal | 赊账账期,单位天 |
| nickName | 否 | String | 会员昵称 |
| 返回结果 |
|
||
| 字段名 | 类型 | 说明 | |
| status | String | 是否正确处理请求,返回success或error,不区分大小写 | |
| messages | String[] | 处理结果的消息 | |
| errorCode | int | 业务处理的错误代码,参见错误代码表 | |
| data | json | 会员字段参照1.根据会员号查询会员 | |
| 接口地址 | http://host:port/pospal-api2/openapi/v1/customerOpenApi/queryAllRechargeLogs | ||
|---|---|---|---|
| 请求头 |
|
||
| 请求方式 | POST | ||
| 请求体 |
|
||
| 参数名 | 是否必须 | 类型 | 说明 |
| stateDate | 是 | String | 开始时间,格式为yyyy-MM-dd HH:mm:ss,不包含开始时间 |
| endDate | 是 | String | 结束时间,格式为yyyy-MM-dd HH:mm:ss,包含结束时间endDate – startDate <=31天 |
| appId | 是 | String | Pospal配置的访问凭证,任何门店的AppId都可以查出所有用用过的核销码 |
| postBackParameter | 否 | Json | Pospal查询首页时可以不传,之后的内容从返回结果中取出 |
| parameterType | 是 | String | 从返回结果中取出 |
| parameterValue | 是 | String | 从返回结果中取出 | 返回结果 |
|
| 字段名 | 类型 | 说明 | |
| status | String | 是否正确处理请求,返回success或error,不区分大小写 | |
| messages | String[] | 处理结果的消息 | |
| errorCode | int | 业务处理的错误代码,参见错误代码表 | |
| pageSize | int | 本次查询预期从库存取出记录数,如果结果集的长度小于pageSize,不需要进行下一页查询 | |
| postBackParameter | Json | Pospal查询首页时可以不传,之后的内容从返回结果中取出 | |
| parameterType | String | 从返回结果中取出 | |
| parameterValue | String | 从返回结果中取出 | |
| result | List | 单据实体信息,字段信息参照会员通用金额充值日志查询 | |
| 接口地址 | http://host:port/pospal-api2/openapi/v1/customerOpenApi/queryCustomerRechargeLog | ||
|---|---|---|---|
| 请求头 |
|
||
| 请求方式 | POST | ||
| 请求体 |
|
||
| 参数名 | 是否必须 | 类型 | 说明 |
| appId | 是 | String | Pospal配置的访问凭证 |
| customerUid | 是 | Long | 会员在银豹收银系统的唯一标识 |
| 返回结果 |
|
||
| 字段名 | 类型 | 说明 | |
| status | String | 是否正确处理请求,返回success或error,不区分大小写 | |
| messages | String[] | 处理结果的消息 | |
| errorCode | int | 业务处理的错误代码,参见错误代码表 | |
| data | List | 充值日志实体 | |
| rechargeStoreAppId | String | 充值门店的AppId | |
| rechargeStoreAccount | String | 充值门店的账号 | |
| customerUid | Long | 会员在银豹系统唯一标识,与请求参数customerUid相同 | |
| rechargeMoney | double | 充值金额 | |
| giftMoney | double | 充值时赠送的金额,(充值购物卡等其它充值方式时,也有可能赠送通用金额,这时也会有一条这样的记录)云端后台可以设置充值规则 | |
| datetime | String | 充值时间 | |
| payMethod | String | 充值时会员所使用的支付方式 | |
| customerMoneyAfterRecharge | String | 充值后,会员剩余金额 | |
| 接口地址 | http://host:port/pospal-api2/openapi/v1/customerOpenapi/queryBytel | ||
|---|---|---|---|
| 请求头 |
|
||
| 请求方式 | POST | ||
| 请求体 |
|
||
| 参数名 | 是否必须 | 类型 | 说明 |
| appId | 是 | String | Pospal配置的访问凭证 |
| customerTel | 是 | String | 会员手机号 |
| groupShare | 否 | int | 分组共享:只有后台连锁会员共享设置是分组共享时,该字段才有意义。传1 表示,严格按照分组共享逻辑查询。比如a,b 2家店是一组,c,d是一组,groupShare=1时,a店能查到b店的,但查不到c店的会员 |
| queryCustomerDepartment | 否 | int | 是否查询部门(仅团餐业务支持) 1:是 0或空:否(默认) |
| 返回结果 |
|
||
| 字段名 | 类型 | 说明 | |
| status | String | 是否正确处理请求,返回success或error,不区分大小写 | |
| messages | String[] | 处理结果的消息 | |
| errorCode | int | 业务处理的错误代码,参见错误代码表 | |
| data | list | 参照1. 根据会员号查询会员返回结果的字段说明 | |
| 接口地址 | http://host:port/pospal-api2/openapi/v1/customerOpenApi/queryAllCustomerCategory | ||
|---|---|---|---|
| 请求头 |
|
||
| 请求方式 | POST | ||
| 请求体 |
|
||
| 参数名 | 是否必须 | 类型 | 说明 |
| appId | 是 | String | Pospal配置的访问凭证 |
| 返回结果 |
|
||
| 字段名 | 类型 | 说明 | |
| status | String | 是否正确处理请求,返回success或error,不区分大小写 | |
| messages | String[] | 处理结果的消息 | |
| errorCode | int | 业务处理的错误代码,参见错误代码表 | |
| data | List | 会员分类实体 | |
| name | String | 会员分类名称 | |
| discount | BigDecimal | 会员分类折扣,discount=90,表示打9折,会员价=折扣前价格 * discount / 100 | |
| uid | Long | 分类实体唯一标识 | |
| enable | Int | 该分类是否可用 | |
| isPoint | Int | 该分类会员是否可积分 | |
| 接口地址 | http://host:port/pospal-api2/openapi/v1/customerOpenApi/batchUpdateCategory | ||
|---|---|---|---|
| 请求头 |
|
||
| 请求方式 | POST | ||
| 请求体 |
|
||
| 参数名 | 是否必须 | 类型 | 说明 |
| appId | 是 | String | Pospal配置的访问凭证 |
| customerCategories | 是 | [] | 数组 限制最多100条记录 |
| customerUid | 是 | Long | 会员唯一标识,根据会员唯一标识修改会员类型 customerNumber不为空,customerUid不传;customerNumber为空,customerUid必填 |
| customerNumber | 是 | String | 会员号,根据会员号修改会员类型 customerUid不为空,customerNumber不传;customerUid为空,customerNumber必填 |
| customerCategoryUid | 是 | Long | 会员类型唯一标识 |
| discount | 否 | BigDecimal | 折扣 传88就表示88折 如果有传就修改,为空或者为0就保持原来的 |
| 返回结果 |
|
||
| 字段名 | 类型 | 说明 | |
| status | String | 是否正确处理请求,返回success或error,不区分大小写 | |
| messages | String[] | 处理结果的消息 | |
| errorCode | int | 业务处理的错误代码,参见错误代码表 | |
| 接口地址 | http://host:port/pospal-api2/openapi/v1/customerOpenApi/updateCustomerPassword | ||
|---|---|---|---|
| 请求头 |
|
||
| 请求方式 | POST | ||
| 请求体 |
|
||
| 参数名 | 是否必须 | 类型 | 说明 |
| appId | 是 | String | Pospal配置的访问凭证 |
| customerUid | 是 | long | 会员唯一标识 |
| customerPassword | 是 | String | 会员密码(明文),长度为1~16位 |
| 返回结果 |
|
||
| 字段名 | 类型 | 说明 | |
| status | String | 是否正确处理请求,返回success或error,不区分大小写 | |
| messages | String[] | 处理结果的消息 | |
| errorCode | int | 业务处理的错误代码,参见错误代码表 | |
| 接口地址 | http://host:port/pospal-api2/openapi/v1/customerOpenApi/querySubsidyChangeLogPages | ||
|---|---|---|---|
| 请求头 |
|
||
| 请求方式 | POST | ||
| 请求体 |
|
||
| 参数名 | 是否必须 | 类型 | 说明 |
| appId | 是 | String | Pospal配置的访问凭证 |
| startTime | 是 | String | 开始时间,格式为yyyy-MM-dd HH:mm:ss,包含开始时间 |
| endTime | 是 | String | 结束时间,格式为yyyy-MM-dd HH:mm:ss,包含结束时间 |
| postBackParameter | 否 | Json | 查询首页时可以不传,之后的内容从返回结果中取出 |
| parameterType | 是 | String | 从返回结果中取出 |
| parameterValue | 是 | String | 从返回结果中取出 |
| 返回结果 |
|
||
| 字段名 | 类型 | 说明 | |
| status | String | 是否正确处理请求,返回success或error,不区分大小写 | |
| messages | String[] | 处理结果的消息 | |
| errorCode | int | 业务处理的错误代码,参见错误代码表 | |
| pageSize | int | 本次查询预期从数据库中取出记录数,如果结果集的长度小于pageSize,不需要进行下一页查询 | |
| postBackParameter | json | 分页查询回传到服务器的参数结构从第二页开始必须回传,如果没传,每次查询都是第一页 | |
| parameterType | String | 从返回结果中直接取出用于回传,不能变其值 | |
| parameterValue | String | 从返回结果中直接取出用于回传,不能变其值 | |
| result | Array[] | 补贴发布记录详情 | |
| customerUid | Long | 会员uid | |
| customerName | String | 会员姓名 | |
| customerNumber | String | 会员号 | |
| customerTel | String | 会员电话 | |
| department | String | 部门 | |
| categoryUid | Long | 会员分类(等级) uid | |
| categoryName | String | 会员分类(等级) 名称 | |
| subsidyMode | String | 补贴模式 | |
| subsidyDate | String | 补贴发放日期 | |
| operateType | int | 操作类型:1按月发放补贴 2按月清零补贴 | |
| amount | BigDecimal | 变动补贴金额 | |
| afterAmount | BigDecimal | 变动后剩余补贴金额 | |
| datetime | String | 时间 | |
| ruleName | String | 补贴方案名称 | |
| remark | String | 备注 | |