schm-shuyun-crm-papi
home
schm-shuyun-crm-papi
Interface description: shuyun CRM intends to process the business data read and write requests of each subsystem by means of open data service API interface.
UAT_URL: https://schm-api-test.shiseido.cn/schm-shuyun-crm-papi
PROD_URL: https://schm-api.shiseido.cn/schm-shuyun-crm-papi
1.Authentication Information
All request headers must contain the following key-value parameters as authentication information. You need to apply for this information from the administrator.
client_id: fa98****3452
client_secret: 108b****41f2
Original system parameters such as appKey, partyId, time, and sign do not need to be passed manually by the client. They are added automatically by mulesoft.
System parameters for automatic filling of test environment:
partyId: 65653
appKey: oms-server-client
2.API Description:
Interface Request | Description |
---|---|
/member/register | For registered members |
/member/query | Query Member information |
/member/loyalty/point | Used to query member points |
/member/loyalty/grade | Used to query membership level |
/member/point/records | For querying member points change records |
/member/grade/record | Used to query membership level change records |
/member/point | Used to change member points |
/member/freezePoint | Used to freeze member points |
/member/unfreezePoint | Used to unfreeze member points |
/member/freezeDeductPoint | Used to consume members' frozen points |
/member/update | For modifying membership |
/member/modify/mobile | used to change the mobile phone number of a member |
/member/modify/policy | Update member privacy policy loading and privacy policy time |
/member/getAttributs/page | Query member properties interface, you can query joint member information |
/member/updateMemberStatus | Modify Member status |
/member/purchase/channel | Query member consumption channel interface |
/member/loyalty/grade/nextGradeAmount | Query Member Consumption channel interface Query member next level required amount |
/customer/queryByChannelId | Query basic member information according to channel Id |
/member/invalid/point | Used to query members' points that will expire in the current month |
/member/loyalty/accountGrade | Used to query the membership level of a specified account |
/member/accountGrade/record | Used to query the membership level change record of the specified account |
/member/past/point | Used to query members' past points |
/member/past/point/records | It is used to query the change records of members' past points |
/member/past/pointchange | Used to change members' past points |
/order/{memberType}/page | Used to query member order information |
/order/{memberType}/{orderId} | Used to query the details of the main order and suborder |
/order/save | For order saving or updating |
/offer/project/list | Used to query card item list information |
/offer/project/detail | Used to query the details of the card voucher project |
/offer/instance/grant | Idempotent for card issuance (Single member sheet) |
/offer/coupon/writeoff | For cancellation of frozen cards (single card) |
/offer/coupon/anticounting | Used for card cancellation |
/offer/coupon/frozen | For card freezing (Single Card) |
/offer/coupon/thaw | For card unfreezing (Single Card) |
/offer/coupon/use | For card cancellation (single card) |
/offer/instance/list | Used to query the card instance list |
/offer/coupon/detail | Used to query details about a voucher instance |
/offer/coupon/invalid | Used for card invalidation |
/offer/coupon/effective | Valid for card vouchers |
/offer/coupon/{couponCode}/{memberType}/extension | Used for card extension |
/wechat/member/register | For registering wechat members |
/wechat/member/queryByUnionId | According to unionId query member information and wechat channel information, failure to query will throw an exception |
/wechat/member/queryByOpenId | Query basic member information based on appId and openId |
3.Member API
3.1. member registration
Interface Request: /member/register
Interface Description: For registered members
Request method: HTTP POST
Request Body Description:
Field Name | Type | required | length | Field Description |
---|---|---|---|---|
RegisterMember | Object | |||
–address | String | 255 | 联系地址(中文) | |
-appTypeCode | String | 64 | 应用类型 code:EBRAND: 会员通, WISDOM: 智慧门店, INTERACT: 互动赢家, WECHAT_OFFICIAL_ACCOUNT: 微信公众号, WECHAT_MINI_PROGRAM: 微信小程序 | |
-appTypeName | String | 255 | 应用类型名称 | |
-birthDay | String | 会员生日-月日:格式: MM-dd 例:07-05 | ||
-birthYear | String | 会员生日-年:格式: yyyy 例:1988 | ||
-cardNo | String | 64 | 会员卡号 | |
-channelType | String | Y | 20 | 渠道类型 |
-cityCode | String | 32 | 市 code | |
-cityName | String | 100 | 城市名称 | |
-country | String | 20 | 国籍 | |
-customerNo | String | Y | 64 | 渠道 ID:渠道唯一标识,用于区分渠道会员。 |
-districtCode | String | 32 | 区 code | |
-districtName | String | 100 | 区名称 | |
String | 255 | 邮箱地址 | ||
-gender | String | 性别:F:女 M:男 O:其他 | ||
-identityCard | String | 20 | 身份证号码 | |
-job | String | 100 | 职业名称 | |
-memberName | String | 255 | 会员姓名 | |
-memberType | String | Y | 20 | 会员类型 |
-mobile | String | 20 | 手机号码 | |
-provinceCode | String | 32 | 省 code | |
-provinceName | String | 100 | 省份名称 | |
-registerTime | String | 注册时间,不传则默认为当前时间格式: yyyy-MM-dd HH:mm:ss | ||
-shopCode | String | 32 | 注册门店 code | |
-shopName | String | 255 | 注册门店名称 | |
-shopTypeCode | String | 32 | 注册门店类型 code | |
-customizedProperties{} | Object(Map) | 会员扩展字段:数据结构见下方 | ||
-bindingExtProperties{} | Object(Map) | 会员拓展属性扩展字段:数据结构见下方 |
customizedProperties
Field Name | Type | required | length | Field Description |
---|---|---|---|---|
registerSource | String | 100 | 注册来源 | |
customizedTag | String | 1000 | 个性标签:传入 json 字符串 | |
checkPolicyStatus | String | 10 | 会员是否同意隐私授权 1:同意;0:不同意 | |
referrerMobile | String | 20 | 推荐人手机号 | |
isGetInfoByEmail | String | 10 | 是否同意接收邮件 1:同意;0:不同意 | |
isGetInfoBySMS | String | 10 | 是否同意接收短信 1:同意;0:不同意 | |
isGetInfoByServiceSMS | String | 10 | 是否同意接收服务类短信 1:同意;0:不同意 | |
unionId | String | 64 | 微信 unionid,ECMP调用传入 | |
memberSalutation | String | 100 | 会员称谓:bs 品牌需求新增 | |
memberStatus | String | 20 | 会员状态:bs 品牌需求新增 | |
sportsPreference | String | 100 | 运动偏好 | |
makeUpPreference | String | 100 | 美妆偏好 |
bindingExtProperties
Field Name | Type | required | length | Field Description |
---|---|---|---|---|
unionId | String | 64 | 微信 unionid,ECMP调用传入 |
Request body example
{
"memberType": "shuyun",
"memberName": "会员1",
"gender": "F",
"cardNo": "132156",
"identityCard": "165465",
"birthYear": "1998",
"birthDay": "01-01",
"country": "china",
"provinceCode": "310000",
"provinceName": "上海",
"cityCode": "310100",
"cityName": "上海市",
"districtCode": "310107",
"districtName": "普陀区",
"address": "上海市徐汇区天钥桥路1001号",
"job": "teacher",
"shopCode": "shuyun",
"shopName": "数云",
"shopTypeCode": "shuyun",
"registerTime": "2021-07-13 08:36:03",
"customizedProperties": {
"registerSource": "线下活动",
"customizedTag": "{“爱好”:”篮球”}",
"checkPolicyStatus": "1",
"referrerMobile": "15021228866",
"isGetInfoByEmail": "1",
"isGetInfoBySMS": "1",
"isGetInfoByServiceSMS": "1",
"memberSalutation": "王女士",
"memberStatus": "FREEZE",
"sportsPreference": "篮球",
"makeUpPreference": "口红",
"desc": "备注",
"customerSouce": "123",
"metabolism": "11",
"resistance": "11"
},
"bindingExtProperties": {
"unionId": "unionId28154751841"
},
"mobile": "15021228866",
"email": "1001@shuyun.com",
"nick": "shuyun001",
"channelType": "TAOBAO",
"appTypeCode": "EBRAND",
"appTypeName": "会员通",
"customerNo": "string"
}
Response Body Description:
Field Name | Type | Field Description |
---|---|---|
memberId | String | 会员 ID |
cardNo | String | 会员卡号 |
status | String | 注册状态:NEW: 新注册 , BINDING: 添加绑定, REGISTERED: 已注册 |
Return status code:
200:请求成功
201:注册会员成功
401:api-gateway 鉴权失败
403: 禁止访问
404: 请求的 URL 不存在
Response body example
Successful response Example:
{
"memberId": "0040a85608844820900558fc2671cb7c",
"cardNo": "0040a85608844820900558fc2671cb7c",
"status": "NEW"
}
error Example:
{
"module": "Solution Package",
"service": "openapi",
"code": "010407",
"desc": "参数异常",
"uri": "http://..."
}
3.2. Query Member information
Interface Request: /member/query
Interface Description: Application Scenario and Description: memberId,mobile,cardNo Parameter query sequence memberId is preferred, followed by mobile, and followed by cardNo
Request method: HTTP GET
Request Body Description:
Field Name | Type | required | length | Field Description |
---|---|---|---|---|
cardNo | String | 64 | 会员卡号, memberId,mobile,cardNo 三种参数至少输入一 | |
channe | String | 20 | 渠道来源 | |
memberId | String | 32 | 会员 ID , memberId,mobile,cardNo 三种参数至少输入一 | |
memberType | String | 是 | 20 | 会员类型 |
mobile | String | 20 | 手机号码 , memberId,mobile,cardNo 三种参数至少输入一 |
Response Body Description:
Field Name | Type | Field Description |
---|---|---|
address | string | 联系地址(中文) |
age | String | 年龄 |
birthDay | string | 会员生日-月日 如:07-05 |
birthYear | string | 会员生日-年 1988 |
cardNo | string | 会员卡号 |
cityCode | string | 市 code |
cityName | string | 城市名称 |
country | string | 国籍 |
districtCode | string | 区 code |
districtName | boolean | 区名称 |
string | 邮箱地址 | |
firstRegisterChannelType | string | 首次注册渠道 |
firstRegisterChannelTypeDesc | string | 首次注册渠道描述 |
gender | string | 性别 F:女 M:男 O:其他 |
headImgUrl | String | 头像 URL |
identityCard | String | 身份证号码 |
job | String | 职业名称 |
memberId | String | 会员 ID |
memberName | String | 会员姓名 |
memberType | String | 会员类型 |
mobile | String | 手机号码 |
provinceCode | String | 省 code |
provinceName | String | 省份名称 |
registerTime | String | 注册时间 格式: yyyy-MM-dd'T'HH:mm:ss.SSSXXX 时区:GMT+8 |
shopCode | String | 注册门店 code |
shopName | String | 注册门店名称 |
shopTypeCode | String | 注册门店类型 code |
unionId | String | unionId |
wechatNick | String | 微信昵称 |
memberBinding | Array | |
customizedProperties{} | Object(Map) | 会员扩展属性 |
MemberBinding:
Field Name | Type | required | length | Field Description |
---|---|---|---|---|
appId | String | 64 | 公众号 appId | |
appTypeCode | String | 64 | 应用类型 code EBRAND: 会员通, WISDOM: 智慧门店, INTERACT: 互动赢家, | |
appTypeName | String | 255 | 应用类型名称 | |
channelType | String | 20 | 渠道类型 | |
customerNo | String | 64 | 客户编号 若创建时未传系统自动生成 | |
memberType | String | 20 | 会员类型 | |
mixMobile | String | 64 | 混淆手机号 格式: yyyy-MM-dd’T’HH:mm:ss.SSSXXX | |
openId | String | 64 | 客户 openid | |
relType | Integer | 关系类型 0: 注册, 1: 绑定,2: 解绑 | ||
shopCode | String | 32 | 绑定/解绑门店 code | |
shopName | String | 255 | 绑定/解绑门店名称 | |
shopTypeCode | String | 32 | 绑定/解绑门店类型code | |
unionId | String | 64 | 微信 union_id(微信专用) |
customizedProperties:
Field Name | Type | Field Description |
---|---|---|
registerSource | String | 注册来源 |
customizedTag | String | 个性标签,传入 JSON 字符串 |
belongBC | String | 所属 BC 工号 |
belongShop | String | 所属店铺 ID |
checkPolicyStatus | String | 会员是否同意隐私授权,1:同意;0:不同意 |
referrerMobile | String | 推荐人手机号 |
isGetInfoByEmail | String | 是否同意接收邮件,1:同意;0:不同意 |
isGetInfoBySMS | String | 是否同意接收短信,1:同意;0:不同意 |
isGetInfoByServiceSMS | String | 是否同意接收服务类短信,1:同意;0:不同意 |
wxOpenId | String | 公众号 openid |
isSubscribe | String | 是否关注公众号,1:已关注;2:已取关 |
memberSalutation | String | 会员称谓,bs 品牌需求新增 |
memberStatus | String | 会员状态,bs 品牌需求新增 |
Response body example
{
"memberType": "shuyun",
"memberName": "会员 1",
"gender": "F",
"cardNo": "132156",
"identityCard": "165465",
"birthYear": "1998",
"birthDay": "01-01",
"country": "china",
"provinceCode": "310000",
"provinceName": "上海",
"cityCode": "310100",
"cityName": "上海市",
"districtCode": "310107",
"districtName": "普陀区",
"address": "上海市徐汇区天钥桥路 1001 号",
"job": "teacher",
"shopCode": "shuyun",
"shopName": "数云",
"shopTypeCode": "shuyun",
"registerTime": "2021-10-13T12:26:58.386+08:00",
"customizedProperties": {
"registerSource": "线下活动",
"customizedTag": "{“爱好”:”篮球”}",
"belongBC": "10001",
"belongShop": "10001",
"checkPolicyStatus": "1",
"referrerMobile": "15021228866",
"isGetInfoByEmail": "1",
"isGetInfoBySMS": "1",
"isGetInfoByServiceSMS": "1",
"wxOpenId": "NJkoIOJNBUOh",
"isSubscribe": "1"
"memberSalutation": "王女士",
"memberStatus": "FREEZE",
"sportsPreference": "篮球",
"makeUpPreference": "口红"
},
"mobile": "15021228866",
"email": "1001@shuyun.com",
"memberId": "0040a85608844820900558fc2671cb7c",
"memberBinding": [
{
"memberType": "shuyun",
"customerNo": "1001",
"mixMobile": "5608844820900558fc2671cb7c",
"appId": "appId28154751841",
"openId": "o3_wb5J_b7llpR5sWiDmRWZZnWes",
"shopCode": "shopcode1001",
"shopName": "01 门店",
"shopTypeCode": "01shop",
"appTypeCode": "EBRAND",
"appTypeName": "会员通",
"channelType": "TAOBAO",
"relType": 0,
"unionId": "string"
}
],
"firstRegisterChannelType": "POS",
"firstRegisterChannelTypeDesc": "线下",
"age": 18,
"wechatNick": "清风",
"headImgUrl": "http://111xx",
"unionId": "o-shjxsjidsdih"
}
Return status code:
200:请求成功
401:api-gateway 鉴权失败
403: 禁止访问
404: 请求的 URL 不存在
error Example:
{
"module": "Solution Package",
"service": "openapi",
"code": "010407",
"desc": "参数异常",
"uri": "http://..."
}
3.3. Query member points
Interface Request: /member/loyalty/point
Interface Description: Query member points
Request method: HTTP GET
Request Body Description:
Field Name | type | required | length | Field Description |
---|---|---|---|---|
channelType | String | 20 | 渠道来源 | |
memberId | String | 32 | memberId, mobile 二者必须传入一个 | |
memberType | String | Y | 20 | 会员type |
mobile | String | 20 | memberId, mobile 二者必须传入一个 |
Response Body Description:
Field Name | type | Field Description |
---|---|---|
point | Integer | 积分 |
Response body example
{
"point": 100
}
Return status code:
200:请求成功
401:api-gateway 鉴权失败
403: 禁止访问
404: 请求的 URL 不存在
error Example
{
"module": "Solution Package",
"service": "openapi",
"code": "010407",
"desc": "参数异常",
"uri": "http://..."
}
3.4. Query membership level
Interface Request: /member/loyalty/grade
Interface Description: Used to query membership level
Request method: HTTP GET
Request Body Description:
Field Name | type | required | length | Field Description |
---|---|---|---|---|
channelType | String | 20 | 渠道来源 | |
memberId | String | 32 | memberId, mobile 二者必须传入一个 | |
memberType | String | Y | 20 | 会员type |
mobile | String | 20 | memberId, mobile 二者必须传入一个 |
Response Body Description:
Field Name | type | Field Description |
---|---|---|
effectiveTime | String | 等级生效时间格式: yyyy-MM-dd'T'HH:mm:ss.SSSXXX 时区:GMT+8 ,2021-10-13T12:26:58.386+08:00 |
expiredTime | String | 等级过期时间格式: yyyy-MM-dd'T'HH:mm:ss.SSSXXX 时区:GMT+8 ,2021-10-13T12:26:58.386+08:00 |
id | String | 等级 ID |
name | String | 等级名称 |
Response body example
{
"effectiveTime": "2021-10-13T12:26:58.386+08:00",
"expiredTime": "2021-10-13T12:26:58.386+08:00",
"id": 0,
"name": "string"
}
Return status code:
200:请求成功
401:api-gateway 鉴权失败
403: 禁止访问
404: 请求的 URL 不存在
error Example
{
"module": "Solution Package",
"service": "openapi",
"code": "010407",
"desc": "参数异常",
"uri": "http://..."
}
3.5. Query member points change record
Interface Request: /member/point/records
Interface Description: For querying member points change records
Request method: HTTP GET
Request Body Description:
Field Name | type | required | length | Field Description |
---|---|---|---|---|
channelType | String | 20 | 变更渠道 | |
endTime | String | 结束时间 格式:yyyy-MM-dd HH:mm:ss | ||
memberId | String | 32 | 会员ID,memberId,mobile两种参数至少输入一个 | |
memberType | String | Y | 20 | 会员type |
mobile | String | 20 | 手机号码,memberId,mobile两种参数至少输入一个 | |
page | Integer | 当前页码,默认:1 | ||
pageSize | Integer | 当页数量,默认:20,上限:100 | ||
recordType | String | 20 | 积分变更type,可选值:SEND(立即发放)、DELAY_SEND(延迟发放)、EXPIRE(过期)、FREEZE(冻结)、UNFREEZE(取消冻结)、DEDUCT(扣减)、LOCK(预扣)、UNLOCK(解锁)、ABOLISH(作废)、TIMER(定时)、RECALCULATE(废弃重算)、SPECIAL_DEDUCT(特殊扣除)、SPECIAL_FREEZE(特殊冻结)、SPECIAL_UNFREEZE(特殊解冻)、SPECIAL_ABOLISH(特殊废弃)、MANUAL_ABOLISH(手动废弃) | |
startTime | String | 起始时间 格式:yyyy-MM-dd HH:mm:ss |
Response Body Description:
Field Name | type | Field Description |
---|---|---|
PointRecord | Array | 结构体如下 |
PointRecord:
Field Name | type | required | length | Field Description |
---|---|---|---|---|
changeMode | String | 50 | 变更方式 | |
changeTime | String | 积分变更时间 格式: yyyy-MM-dd'T'HH:mm:ss.SSSXXX 时区:GMT+8 2021-10-13T12:26:58.386+08:00 | ||
changeType | String | 20 | 积分变更type,可选值:END(立即发放)、DELAY_SEND(延迟发放)、EXPIRE(过期)、FREEZE(冻结)、UNFREEZE(取消冻结)、DEDUCT(扣减)、LOCK(预扣)、UNLOCK(解锁)、ABOLISH(作废)、TIMER(定时)、RECALCULATE(废弃重算)、SPECIAL_DEDUCT(特殊扣除)、SPECIAL_FREEZE(特殊冻结)、SPECIAL_UNFREEZE(特殊解冻)、SPECIAL_ABOLISH(特殊废弃)、MANUAL_ABOLISH(手动废弃) | |
channel | String | 20 | 渠道type | |
description | String | 255 | 备注 | |
effectiveTime | String | 积分生效时间 格式: yyyy-MM-dd'T'HH:mm:ss.SSSXXX 时区:GMT+8 2021-10-13T12:26:58.386+08:00 | ||
expiredTime | String | 积分过期时间 格式: yyyy-MM-dd'T'HH:mm:ss.SSSXXX 时区:GMT+8 2021-10-13T12:26:58.386+08:00 | ||
memberId | string | 32 | 会员ID | |
point | Integer | 变更积分 | ||
totalPoint | String | 历史总积分 | ||
traceId | String | 255 | 追溯id | |
KZZD1 | String | 255 | 积分type | |
KZZD2 | String | 255 | 积分来源 | |
KZZD3 | String | 255 | 变更事件typecode |
Response body example
[
{
"memberId": "string",
"point": 0,
"totalPoint": "string",
"changeType": "SEND",
"description": "备注",
"effectiveTime": "2021-10-13T12:26:58.386+08:00",
"expiredTime": "2021-10-13T12:26:58.386+08:00",
"changeTime": "2021-10-13T12:26:58.386+08:00",
"changeMode": "MANUAL",
"id": "12dwdw",
"traceId": "12dwdw",
"channel": "TAOBAO",
"KZZD1": "活动积分",
"KZZD2": " 线下活动",
"KZZD3": " E0001"
}
]
Return status code:
200:请求成功
401:api-gateway 鉴权失败
403: 禁止访问
404: 请求的 URL 不存在
error Example
{
"module": "Solution Package",
"service": "openapi",
"code": "010407",
"desc": "参数异常",
"uri": "http://..."
}
3.6. Query membership level change records
Interface Request: /member/grade/record
Interface Description: Used to query membership level change records
Request method: HTTP GET
Request Body Description:
Field Name | type | required | length | Field Description |
---|---|---|---|---|
channelType | String | 20 | 变更渠道 | |
endTime | String | 结束时间 格式:yyyy-MM-dd HH:mm:ss | ||
memberId | String | 32 | 会员ID,memberId,mobile两种参数至少输入一个 | |
memberType | String | Y | 20 | 会员type |
mobile | String | 20 | 手机号码,memberId,mobile两种参数至少输入一个 | |
page | Integer | 当前页码,默认:1 | ||
pageSize | Integer | 当页数量,默认:20,上限:100 | ||
startTime | String | 起始时间 格式:yyyy-MM-dd HH:mm:ss |
Response Body Description:
Field Name | type | Field Description |
---|---|---|
GradeRecord | Array | 结构体如下 |
GradeRecord:
Field Name | type | required | length | Field Description |
---|---|---|---|---|
changeTime | String | 等级变更时间 | ||
changeType | String | 20 | 等级变更type,可选值:UPGRADE(升级)、DEGRADE(降级)、HOLD_BACK_GRADE(保级) | |
effectiveTime | String | 变更后等级生效时间 格式: yyyy-MM-dd'T'HH:mm:ss.SSSXXX 时区:GMT+8 2021-10-13T12:26:58.386+08:00 | ||
expiredTime | String | 变更后等级过期时间 格式: yyyy-MM-dd'T'HH:mm:ss.SSSXXX 时区:GMT+8 2021-10-13T12:26:58.386+08:00 | ||
gradeId | String | 64 | 变更后等级ID | |
gradeName | String | 255 | 变更后等级名称 | |
memberId | String | 32 | 会员ID | |
originEffectiveTime | String | 变更前等级生效时间 格式: yyyy-MM-dd'T'HH:mm:ss.SSSXXX 时区:GMT+8 2021-10-13T12:26:58.386+08:00 | ||
originExpiredTime | string | 变更前等级过期时间 格式: yyyy-MM-dd'T'HH:mm:ss.SSSXXX 时区:GMT+8 2021-10-13T12:26:58.386+08:00 | ||
originalGradeId | Integer | 64 | 变更前等级ID | |
originalGradeName | String | 255 | 变更前等级名称 |
Response body example
[
{
"changeTime": "2021-10-13T12:26:58.386+08:00",
"changeType": "UPGRADE",
"effectiveTime": "2021-10-13T12:26:58.386+08:00",
"expiredTime": "2021-10-13T12:26:58.386+08:00",
"gradeId": 0,
"gradeName": "string",
"memberId": "0040a85608844820900558fc2671cb7c",
"originEffectiveTime": "2021-10-13T12:26:58.386+08:00",
"originExpiredTime": "2021-10-13T12:26:58.386+08:00",
"originalGradeId": 0,
"originalGradeName": "string"
}
]
Return status code:
200:请求成功
401:api-gateway 鉴权失败
403: 禁止访问
404: 请求的 URL 不存在
error Example
{
"module": "Solution Package",
"service": "openapi",
"code": "010407",
"desc": "参数异常",
"uri": "http://..."
}
3.7. Change member points
Interface Request: /member/point
Interface Description: Used to change member points
Request method: HTTP PUT
Request Body Description:
header:
Field Name | type | required | length | Field Description |
---|---|---|---|---|
X-Business-Token | String | 是 | 请求头(request header)里需要传:X-Business-Token, 不同请求对应 X-Business-Token 值确保唯一;若同一请求,请求多次,确保 X-Business-Token 值是一样,如兑礼订单,需要在此字段传入兑礼订单号。 |
Body:
Field Name | type | required | length | Field Description |
---|---|---|---|---|
changeType | String | Y | 积分变更type,可选值:SEND(立即发放)、DEDUCT(扣减) | |
channelType | String | Y | 20 | 渠道type |
description | String | Y | 255 | 备注,包括事件type、事件等信息,JSON字符串 |
effectTime | String | 积分生效时间,为空时立即生效,格式: yyyy-MM-dd HH:mm:ss | ||
expiredTime | String | 积分过期时间,格式: yyyy-MM-dd HH:mm:ss | ||
memberId | String | Y | 32 | 会员ID |
memberType | String | Y | 20 | 会员type |
point | Number | Y | 积分 | |
shopCode | String | 32 | 店铺code | |
KZZD1 | String | 255 | 积分type | |
KZZD2 | String | 255 | 积分来源 | |
KZZD3 | String | Y | 255 | 变更事件typecode |
parameter example
{
"memberId": "0040a85608844820900558fc2671cb7c",
"point": 20,
"effectTime": "2021-07-13 08:36:03",
"expiredTime": "2021-07-13 08:36:03",
"changeType": "SEND",
"description": "备注",
"channelType": "POS",
"memberType": "shuyun",
"shopCode": "10001",
"KZZD1": "活动积分",
"KZZD2": ”线下活动",
"KZZD3": "E0001"
}
Return status code:
200:请求成功
201: Created
204: 修改会员积分成功
401:api-gateway 鉴权失败
403: 禁止访问
404: 请求的 URL 不存在
error Example
{
"module": "Solution Package",
"service": "openapi",
"code": "010407",
"desc": "参数异常",
"uri": "http://..."
}
3.8. Freeze member points
Interface Request: /member/freezePoint
Interface Description: Used to freeze member points
Request method: HTTP POST
Request Body Description:
header:
Field Name | type | required | length | Field Description |
---|---|---|---|---|
X-Business-Token | String | 是 | 请求头(request header)里需要传:X-Business-Token, 不同请求对应 X-Business-Token 值确保唯一;若同一请求,请求多次,确保 X-Business-Token 值是一样。 |
Body:
Field Name | type | required | length | Field Description |
---|---|---|---|---|
channelType | String | 是 | 20 | 渠道type |
description | String | 是 | 255 | 备注,包括事件type、事件等信息,JSON字符串 |
memberId | String | 是 | 32 | 会员ID |
memberType | String | 是 | 20 | 会员type |
point | Number | 是 | 积分 | |
shopCode | String | 32 | 店铺code |
parameter example
{
"memberId": "0040a85608844820900558fc2671cb7c",
"description": "备注",
"channelType": "SHUYUN",
"memberType": "shuyun",
"shopCode": "string",
"idempotentMode": 0,
"point": 20
}
Return status code:
200:请求成功
201: Created
204: 操作积分成功
401:api-gateway 鉴权失败
403: 禁止访问
404: 请求的 URL 不存在
error Example
{
"module": "Solution Package",
"service": "openapi",
"code": "010407",
"desc": "参数异常",
"uri": "http://..."
}
3.9. Unfreeze member points
Interface Request: /member/unfreezePoint
Interface Description: Unfreeze member points
Request method: HTTP POST
Request Body Description:
header:
Field Name | type | required | length | Field Description |
---|---|---|---|---|
X-Business-Token | String | 是 | 请求头(request header)里需要传:X-Business-Token, 不同请求对应 X-Business-Token 值确保唯一;若同一请求,请求多次,确保 X-Business-Token 值是一样(解冻时需要与对应冻结积分的 token 一致)。 |
Body:
Field Name | type | required | length | Field Description |
---|---|---|---|---|
channelType | String | Y | 20 | 渠道type |
description | String | Y | 255 | 备注,包括事件type、事件等信息,JSON字符串 |
memberId | String | Y | 32 | 会员ID |
memberType | String | Y | 20 | 会员type |
shopCode | String | 32 | 店铺code |
parameter example
{
"memberId": "0040a85608844820900558fc2671cb7c",
"description": "备注",
"channelType": "SHUYUN",
"memberType": "shuyun",
"shopCode": "string",
"idempotentMode": 0
}
Return status code:
200:请求成功
201: Created
204: 操作积分成功
401:api-gateway 鉴权失败
403: 禁止访问
404: 请求的 URL 不存在
error Example
{
"module": "Solution Package",
"service": "openapi",
"code": "010407",
"desc": "参数异常",
"uri": "http://..."
}
3.10. Consume member's frozen points
Interface Request: /member/freezeDeductPoint
Interface Description: Consume member's frozen points
Request method: HTTP POST
Request Body Description:
header:
Field Name | type | required | length | Field Description |
---|---|---|---|---|
X-Business-Token | String | Y | 请求头(request header)里需要传:X-Business-Token, 不同请求对应 X-Business-Token 值确保唯一;若同一请求,请求多次,确保 X-Business-Token 值是一样(消耗冻结积分时需要与冻结积分时的 token一致) |
Body:
Field Name | type | required | length | Field Description |
---|---|---|---|---|
channelType | String | Y | 20 | 渠道type |
description | String | Y | 255 | 备注,包括事件type、事件等信息,JSON字符串 |
memberId | String | Y | 32 | 会员ID |
memberType | String | Y | 20 | 会员type |
shopCode | String | 32 | 店铺code |
parameter example
{
"memberId": "0040a85608844820900558fc2671cb7c",
"description": "备注",
"channelType": "SHUYUN",
"memberType": "shuyun",
"shopCode": "string",
"idempotentMode": 0
}
Return status code:
200:请求成功
201: Created
204: 操作积分成功
401:api-gateway 鉴权失败
403: 禁止访问
404: 请求的 URL 不存在
error Example
{
"module": "Solution Package",
"service": "openapi",
"code": "010407",
"desc": "参数异常",
"uri": "http://..."
}
3.11. Modify Member Information
Interface Request: /member/update
Interface Description: Modify Member Information
Request method: HTTP PUT
Request Body Description:
Field Name | type | required | length | Field Description |
---|---|---|---|---|
updateMember | Object | 结构体如下 |
updateMember:
Field Name | type | required | length | Field Description |
---|---|---|---|---|
address | String | 255 | 联系地址(中文) | |
birthDay | String | 会员生日-月日,格式: MM-dd,例:07-05 | ||
birthYear | String | 会员生日-年,格式: yyyy,例:1988 | ||
channelType | String | Y | 20 | 渠道type |
cityCode | String | 32 | 市code | |
cityName | String | 100 | 城市名称 | |
contactTel | String | 20 | 联系电话 | |
country | String | 20 | 国籍,例:china | |
districtCode | String | 32 | 区code | |
districtName | String | 100 | 区名称 | |
String | 255 | 邮箱地址 | ||
gender | String | 性别,可选值:F(女)、M(男)、O(其他) | ||
headImgUrl | String | 头像链接 | ||
identityCard | String | 20 | 身份证号码 | |
job | String | 100 | 职业名称 | |
memberId | String | Y | 32 | 会员ID |
memberName | String | 255 | 会员姓名 | |
memberType | String | Y | 20 | 会员type |
provinceCode | String | 32 | 省code | |
provinceName | String | 100 | 省份名称 | |
customizedProperties{} | Object | 会员扩展属性 |
customizedProperties:
Field Name | type | required | length | Field Description |
---|---|---|---|---|
registerSource | String | 100 | 注册来源 | |
customizedTag | String | 1000 | 个性标签,传入JSON字符串 | |
belongBC | String | 100 | 所属BC工号 | |
belongShop | String | 100 | 所属店铺id | |
checkPolicyStatus | String | 10 | 会员是否同意隐私授权,可选值:1(同意)、2(不同意) | |
referrerMobile | String | 20 | 推荐人手机号 | |
isGetInfoByEmail | String | 10 | 是否同意接收邮件,可选值:1(同意)、0(不同意) | |
isGetInfoBySMS | String | 10 | 是否同意接收短信,可选值:1(同意)、0(不同意) | |
isGetInfoByServiceSMS | String | 10 | 是否同意接收服务类短信,可选值:1(同意)、0(不同意) | |
memberSalutation | String | 100 | 会员称谓,品牌需求新增 | |
sportsPreference | String | 100 | 运动偏好 | |
makeUpPreference | String | 100 | 美妆偏好 |
parameter example
{
"memberId": "0040a85608844820900558fc2671cb7c",
"channelType": "TAOBAO",
"memberType": "shuyun",
"memberName": "数云",
"gender": "F",
"email": "1001@shuyun.com",
"identityCard": "101100",
"birthYear": "1900",
"birthDay": "01-01",
"country": "china",
"provinceCode": "310000",
"provinceName": "上海",
"cityCode": "310100",
"cityName": "上海市",
"districtCode": "310107",
"districtName": "普陀区",
"address": "上海市徐汇区天钥桥路 1001 号",
"job": "teacher",
"contactTel": "18500002312",
"headImgUrl": "http://www.xxx.com/url?id=101",
"customizedProperties": {
"registerSource": "线下活动",
"customizedTag": "{“爱好”:”篮球”}",
"belongBC": "10001",
"belongShop": "10001"
"checkPolicyStatus": "1",
"referrerMobile": "15021228866",
"isGetInfoByEmail": "1",
"isGetInfoBySMS": "1",
"isGetInfoByServiceSMS": "1",
"memberSalutation": "王女士",
"sportsPreference": "篮球",
"makeUpPreference": "口红"
}
}
Return status code:
201: Created
204: 修改会员成功
401:api-gateway 鉴权失败
403: 禁止访问
404: 请求的 URL 不存在
error Example
{
"module": "Solution Package",
"service": "openapi",
"code": "010407",
"desc": "参数异常",
"uri": "http://..."
}
3.12. Modify the member's mobile phone number
Interface Request: /member/modify/mobile
Interface Description: This parameter is used to change the mobile phone number of a member. Only the mobile phone number that is not registered can be changed
Request method: HTTP PUT
Request Body Description:
Field Name | type | required | length | Field Description |
---|---|---|---|---|
memberType | String | Y | 20 | 会员type |
newMobile | String | Y | 20 | 新手机号码 |
memberId | String | Y | 32 | 会员 ID |
parameter example
{
"memberId": "0040a85608844820900558fc2671cb7c",
"memberType": "cpbomni",
"newMobile": "13100000000"
}
Return status code:
200: 修改成功
401:api-gateway 鉴权失败
403: 禁止访问
404: 请求的 URL 不存在
error Example
{
"module": "Solution Package",
"service": "openapi",
"code": "010407",
"desc": "参数异常",
"uri": "http://..."
}
3.13. Update Member Privacy Policy (customized)
Interface Request: /member/modify/policy
Interface Description: Update member privacy policy loading and privacy policy time
Request method: HTTP POST
Request Body Description:
Field Name | type | required | length | Field Description |
---|---|---|---|---|
memberType | String | Y | 20 | 会员type |
memberId | String | Y | 32 | 会员ID |
checkPolicyStatus | String | Y | 20 | 会员是否同意隐私政策,可选值:1(同意)、0(不同意) |
policyStatusUpdateTime | dataTime | 隐私协议修改时间(不填默认为当前时间) |
parameter example
{
"memberId": "0040a85608844820900558fc2671cb7c",
"memberType": "shuyun",
"checkPolicyStatus": "1",
"policyStatusUpdateTime": "2021-07-13 08:36:03"
}
Return status code:
200: 请求成功
201: Created
401:api-gateway 鉴权失败
403: 禁止访问
404: 请求的 URL 不存在
error Example
{
"module": "Solution Package",
"service": "openapi",
"code": "010407",
"desc": "参数异常",
"uri": "http://..."
}
3.14. Query Member Properties Interface (custom)
Interface Request: /member/getAttributs/page
Interface Description: Query member properties interface, you can query joint member information
Request method: HTTP GET
Request Body Description:
Field Name | type | required | length | Field Description |
---|---|---|---|---|
memberType | String | Y | 20 | 会员type |
memberId | String | Y | 32 | 会员ID |
currentPage | integer | 当前页数,默认为1 | ||
pageSize | integer | 分页容量,默认为20 |
Response Body Description:
Field Name | type | Field Description |
---|---|---|
memberAttributs | Array | 会员属性集合 |
memberAttributs:
Field Name | type | required | length | Field Description |
---|---|---|---|---|
memberId | String | 32 | 会员ID | |
memberType | String | 20 | 会员type | |
attributeCode | String | 64 | 属性编码 | |
attributeName | String | 200 | 属性名称 | |
createTime | dateTime | 创建时间 | ||
updateTime | dateTime | 更新时间 |
Response body example
[
{
"memberId": "0040a85608844820900558fc2671cb7c ",
"memberType": "shuyun",
"attributeCode": "huadi",
"attributeName": "华帝联名会员",
"updateTime": "2021-10-13T12:26:58.386+08:00",
"createTime": "2021-10-13T12:26:58.386+08:00"
}
]
Return status code:
200: 请求成功
201: Created
401:api-gateway 鉴权失败
403: 禁止访问
404: 请求的 URL 不存在
error Example
{
"module": "Solution Package",
"service": "openapi",
"code": "010407",
"desc": "参数异常",
"uri": "http://..."
}
3.15. Modify Member status interface (Custom)
Interface Request: /member/updateMemberStatus
Interface Description: Modify Member status
Request method: HTTP POST
Request Body Description:
Field Name | type | required | length | Field Description |
---|---|---|---|---|
memberType | String | Y | 20 | 会员type |
memberId | String | Y | 32 | 会员ID |
memberStatus | String | 20 | 会员状态 |
Return status code:
200: 请求成功
201: Created
401:api-gateway 鉴权失败
403: 禁止访问
404: 请求的 URL 不存在
error Example
{
"module": "Solution Package",
"service": "openapi",
"code": "010407",
"desc": "参数异常",
"uri": "http://..."
}
3.16. Query Member consumption channel interface (customized)
Interface Request: /member/purchase/channe
Interface Description: Query member consumption channel interface
Request method: HTTP GET
Request Body Description:
Field Name | type | required | length | Field Description |
---|---|---|---|---|
memberType | String | Y | 20 | 会员type |
memberId | String | Y | 32 | 会员ID |
Response Body Description:
Field Name | type | Field Description |
---|---|---|
memberId | String | 会员 ID |
purchaseChannel | Array | 会员消费渠道列表 |
Response body example
{
"memberId": "M1140ZRS59S3G",
"purchaseChannel": ["TAOBAO","POS","ECMP","GW","ECMPcom"]
}
Return status code:
200: 请求成功
201: Created
401:api-gateway 鉴权失败
403: 禁止访问
404: 请求的 URL 不存在
error Example
{
"module": "Solution Package",
"service": "openapi",
"code": "010407",
"desc": "参数异常",
"uri": "http://..."
}
3.17. Enquire the amount required for the next level of membership Interface (customized)
Interface Request: /member/loyalty/grade/nextGradeAmount
Interface Description: Check the amount required for the next level of membership
Request method: HTTP GET
Request Body Description:
Field Name | type | required | length | Field Description |
---|---|---|---|---|
memberType | String | Y | 20 | 会员type |
memberId | String | Y | 32 | 会员ID |
Response Body Description:
Field Name | type | Field Description |
---|---|---|
currentGradeId | Integer | 当前等级 id |
currentGradeName | String | 当前等级名称 |
memberId | String | 会员 ID |
consumeAmount | Number | 当前累计消费金额 |
needAmount | Number | 升级所需金额 |
nextGradeId | Integer | 下一等级 id |
nextGradeName | String | 下一等级名称 |
nextGradeNeedAmount | Number | 下一等级所需消费金额 |
updatedTime | DateTime | 更新时间 |
Response body example
{
"currentGradeId": 60040,
"currentGradeName": "银钻卡",
"memberId": "M1140ZRS59S3G",
"consumeAmount": 170.0,
"needAmount": 2830.0,
"nextGradeId": "60041",
"nextGradeName": "金卡",
"nextGradeNeedAmount": 3000.0,
"updatedTime": "2022-04-16T17:44:24.055+08:00"
}
Return status code:
200: 请求成功
201: Created
401:api-gateway 鉴权失败
403: 禁止访问
404: 请求的 URL 不存在
error Example
{
"module": "Solution Package",
"service": "openapi",
"code": "010407",
"desc": "参数异常",
"uri": "http://..."
}
3.18. Query member information based on channel id (customized)
Interface Request: /customer/queryByChannelId
Interface Description: Query basic member information according to channel Id
Request method: HTTP GET
Request Body Description:
Field Name | type | required | length | Field Description |
---|---|---|---|---|
memberType | String | Y | 会员type | |
channelType | String | Y | 渠道type | |
customerNo | String | Y | 渠道ID,例如:淘宝渠道-麒麟ID;京东-OpenID;微信-AppID_OpenID;其他渠道唯一ID等 |
Response Body Description:
Field Name | type | Field Description |
---|---|---|
SimpleMemberDto | Object | 结构体如下 |
SimpleMemberDto:
Field Name | type | required | length | Field Description |
---|---|---|---|---|
cardNo | String | 64 | 会员卡号 | |
String | 255 | 邮箱 | ||
memberId | String | 64 | 会员ID | |
memberName | String | 255 | 会员名称 | |
memberType | String | 20 | 会员type | |
mobile | String | 20 | 手机号 | |
registerTime | String | 注册时间 | ||
shopCode | String | 64 | 店铺code | |
shopName | String | 255 | 店铺名称 | |
dateOfBirth | String | 出生年月日 |
Response body example
{
"memberType": "shuyun",
"memberId": "shuyun",
"memberName": "小小",
"gender": "F",
"identityCard": "101100",
"dateOfBirth": "1998-01-01",
"mobile": "18909890000",
"cardNo": "1727832",
"email": "1001@shuyun.com",
"marriageStatus": "Y",
"registerTime": "2021-12-30T02:24:02.202Z",
"shopCode": "shopcode1001",
"shopName": "01 门店"
}
Return status code:
200: 成功
401:api-gateway 鉴权失败
403: 禁止访问
404: 请求的 URL 不存在
error Example
{
"module": "Solution Package",
"service": "openapi",
"code": "010407",
"desc": "参数异常",
"uri": "http://..."
}
3.19. Query member points about to expire in the current month (customized)
Interface Request: /member/invalid/point
Interface Description: Used to query members' points that will expire in the current month
Request method: HTTP GET
Request Body Description:
Field Name | type | required | length | Field Description |
---|---|---|---|---|
accountType | String | Y | 20 | 积分账户type |
memberId | String | Y | 32 | 会员ID |
memberType | String | Y | 20 | 会员type |
Response Body Description:
Field Name | type | Field Description |
---|---|---|
point | Integer | 积分值 |
Response body example
{
"point": 100
}
Return status code:
200: 请求成功
401:api-gateway 鉴权失败
403: 禁止访问
404: 请求的 URL 不存在
error Example
{
"module": "Solution Package",
"service": "openapi",
"code": "010407",
"desc": "参数异常",
"uri": "http://..."
}
4.Member Collection Level API (Custom)
4.1. Check the level of member collection
Interface Request: /member/loyalty/accountGrade
Interface Description: Used to query the membership level of a specified account
Request method: HTTP GET
Request Body Description:
Field Name | type | required | length | Field Description |
---|---|---|---|---|
channelType | String | 20 | 渠道来源 | |
memberId | String | 32 | 会员ID,memberId和mobile二者必须传入一个 | |
memberType | String | Y | 20 | 会员type |
mobile | String | 20 | 手机号,memberId和mobile二者必须传入一个 | |
accountType | String | Y | 20 | 账户type,例如集雅荟账户type为JYHGRADE |
Response Body Description:
Field Name | type | Field Description |
---|---|---|
effectiveTime | String | 等级生效时间 格式: yyyy-MM-dd'T'HH:mm:ss.SSSXXX 时区:GMT+8 2021-10-13T12:26:58.386+08:00 |
expiredTime | String | 等级过期时间 格式: yyyy-MM-dd'T'HH:mm:ss.SSSXXX 时区:GMT+8 2021-10-13T12:26:58.386+08:00 |
id | Integer | 等级 ID |
name | String | 等级名称 |
Response body example
{
"effectiveTime": "2021-10-13T12:26:58.386+08:00",
"expiredTime": "2021-10-13T12:26:58.386+08:00",
"id": 0,
"name": "string"
}
Return status code:
200: 请求成功
401:api-gateway 鉴权失败
403: 禁止访问
404: 请求的 URL 不存在
error Example
{
"module": "Solution Package",
"service": "openapi",
"code": "010407",
"desc": "参数异常",
"uri": "http://..."
}
4.2. Query the membership level change record of the specified account
Interface Request: /member/accountGrade/record
Interface Description: Used to query the membership level change record of the specified account
Request method: HTTP GET
Request Body Description:
Field Name | type | required | length | Field Description |
---|---|---|---|---|
channelType | String | 20 | 变更渠道 | |
endTime | String | 结束时间,格式为yyyy-MM-dd HH:mm:ss | ||
memberId | String | 32 | 会员ID,memberId和mobile两种参数至少输入一个 | |
memberType | String | required | 20 | 会员type |
mobile | String | 20 | 手机号码,memberId和mobile两种参数至少输入一个 | |
page | Integer | 当前页码,默认为1 | ||
pageSize | Integer | 当页数量,默认为20,上限为100 | ||
startTime | String | 起始时间,格式为yyyy-MM-dd HH:mm:ss | ||
accountType | String | required | 20 | 账户type,例如集雅荟账户type为JYHGRADE |
Response Body Description:
Field Name | type | Field Description |
---|---|---|
GradeRecord | Array | 结构体如下 |
GradeRecord:
Field Name | type | required | length | Field Description |
---|---|---|---|---|
changeTime | String | 等级变更时间 | ||
changeType | String | 20 | 等级变更type,可选值为UPGRADE(升级),DEGRADE(降级),HOLD_BACK_GRADE(保级) | |
effectiveTime | String | 变更后等级生效时间,格式为yyyy-MM-dd'T'HH:mm:ss.SSSXXX,时区为GMT+8 | ||
expiredTime | String | 变更后等级过期时间,格式为yyyy-MM-dd'T'HH:mm:ss.SSSXXX,时区为GMT+8 | ||
gradeId | String | 64 | 变更后等级ID | |
gradeName | String | 255 | 变更后等级名称 | |
memberId | String | 32 | 会员ID | |
originEffectiveTime | String | 变更前等级生效时间,格式为yyyy-MM-dd'T'HH:mm:ss.SSSXXX,时区为GMT+8 | ||
originExpiredTime | String | 变更前等级过期时间,格式为yyyy-MM-dd'T'HH:mm:ss.SSSXXX,时区为GMT+8 | ||
originalGradeId | Integer | 64 | 变更前等级ID | |
originalGradeName | String | 255 | 变更前等级名称 |
Response body example
[
{
"changeTime": "2021-10-13T12:26:58.386+08:00",
"changeType": "UPGRADE",
"effectiveTime": "2021-10-13T12:26:58.386+08:00",
"expiredTime": "2021-10-13T12:26:58.386+08:00",
"gradeId": 0,
"gradeName": "string",
"memberId": "0040a85608844820900558fc2671cb7c",
"originEffectiveTime": "2021-10-13T12:26:58.386+08:00",
"originExpiredTime": "2021-10-13T12:26:58.386+08:00",
"originalGradeId": 0,
"originalGradeName": "string"
}
]
Return status code:
200: 成功
401:api-gateway 鉴权失败
403: 禁止访问
404: 请求的 URL 不存在
error Example
{
"module": "Solution Package",
"service": "openapi",
"code": "010407",
"desc": "参数异常",
"uri": "http://..."
}
5.Member past points API
5.1. Query members' past points
Interface Request: /member/past/point
Interface Description: Used to query members' past points
Request method: HTTP GET
Request Body Description:
Field Name | type | required | length | Field Description |
---|---|---|---|---|
accountType | String | Y | 20 | 积分账户type,例如往期积分为CPBPAST |
memberId | String | Y | 32 | 会员ID |
memberType | String | Y | 20 | 会员type |
Response Body Description:
Field Name | type | Field Description |
---|---|---|
point | Integer | 积分值 |
Response body example
{
"point": 100
}
Return status code:
200: 成功
401:api-gateway 鉴权失败
403: 禁止访问
404: 请求的 URL 不存在
error Example
{
"module": "Solution Package",
"service": "openapi",
"code": "010407",
"desc": "参数异常",
"uri": "http://..."
}
5.2. Query the member's past points change record
Interface Request: /member/past/point/records
Interface Description: It is used to query the change records of members' past points
Request method: HTTP GET
Request Body Description:
Field Name | type | required | length | Field Description |
---|---|---|---|---|
accountType | String | Y | 20 | 积分账户type,例如往期积分为CPBPAST |
channelType | String | 20 | 变更渠道 | |
endTime | String | 结束时间,格式为yyyy-MM-dd HH:mm:ss | ||
memberId | String | Y | 32 | 会员ID |
memberType | String | Y | 20 | 会员type |
page | Integer | 当前页码,默认为1 | ||
pageSize | Integer | 当页数量,默认为20,上限为100 | ||
recordType | String | 20 | 积分变更type,可选值为SEND(立即发放),DELAY_SEND(延迟发放),EXPIRE(过期),FREEZE(冻结),UNFREEZE(取消冻结),DEDUCT(扣减),LOCK(预扣),UNLOCK(解锁),ABOLISH(作废),TIMER(定时),RECALCULATE(废弃重算),SPECIAL_DEDUCT(特殊扣除),SPECIAL_FREEZE(特殊冻结),SPECIAL_UNFREEZE(特殊解冻),SPECIAL_ABOLISH(特殊废弃),MANUAL_ABOLISH(手动废弃) | |
startTime | String | 起始时间,格式为yyyy-MM-dd HH:mm:ss |
Response Body Description:
Field Name | type | Field Description |
---|---|---|
PointRecord | Array | 结构体如下 |
PointRecord:
Field Name | type | required | length | Field Description |
---|---|---|---|---|
changeMode | String | 50 | 变更方式 | |
changeTime | String | 积分变更时间,格式为yyyy-MM-dd'T'HH:mm:ss.SSSXXX,时区为GMT+8 | ||
changeType | String | 20 | 积分变更type,可选值为END(立即发放),DELAY_SEND(延迟发放),EXPIRE(过期),FREEZE(冻结),UNFREEZE(取消冻结),DEDUCT(扣减),LOCK(预扣),UNLOCK(解锁),ABOLISH(作废),TIMER(定时),RECALCULATE(废弃重算),SPECIAL_DEDUCT(特殊扣除),SPECIAL_FREEZE(特殊冻结),SPECIAL_UNFREEZE(特殊解冻),SPECIAL_ABOLISH(特殊废弃),MANUAL_ABOLISH(手动废弃) | |
channel | String | 20 | 渠道type | |
description | String | 255 | 备注 | |
effectiveTime | String | 积分生效时间,格式为yyyy-MM-dd'T'HH:mm:ss.SSSXXX,时区为GMT+8 | ||
expiredTime | String | 积分过期时间,格式为yyyy-MM-dd'T'HH:mm:ss.SSSXXX,时区为GMT+8 | ||
memberId | string | 32 | 会员ID | |
point | Integer | 变更积分 | ||
totalPoint | String | 历史总积分 | ||
traceId | String | 255 | 追溯ID | |
KZZD1 | String | 255 | 积分type | |
KZZD2 | String | 255 | 积分来源 | |
KZZD3 | String | 255 | 变更事件typecode |
Response body example
[
{
"memberId": "string",
"point": 0,
"totalPoint": "string",
"changeType": "SEND",
"description": "备注",
"effectiveTime": "2021-10-13T12:26:58.386+08:00",
"expiredTime": "2021-10-13T12:26:58.386+08:00",
"changeTime": "2021-10-13T12:26:58.386+08:00",
"changeMode": "MANUAL",
"id": "12dwdw",
"traceId": "12dwdw",
"channel": "TAOBAO",
"KZZD1": "活动积分",
"KZZD2": " 线下活动",
"KZZD3": " E0001"
}
]
Return status code:
200: 请求成功
401:api-gateway 鉴权失败
403: 禁止访问
404: 请求的 URL 不存在
error Example
{
"module": "Solution Package",
"service": "openapi",
"code": "010407",
"desc": "参数异常",
"uri": "http://..."
}
5.3. Change member's past points
Interface Request: /member/past/pointchange
Interface Description: Used to change members' past points
Request method: HTTP PUT
Request Body Description:
header:
Field Name | type | required | length | Field Description |
---|---|---|---|---|
X-Business-Token | String | Y | 请求头(request header)里需要传:X-Business-Token, 不同请求对应 X-Business-Token 值确保唯一;若同一请求,请求多次,确保 X-Business-Token 值是一样如兑礼订单,需要在此字段传入兑礼订单号。 |
Body:
Field Name | type | required | length | Field Description |
---|---|---|---|---|
accountType | String | required | 20 | 积分账户type,例如往期积分为CPBPAST |
changeType | String | required | 积分变更type,可选值为SEND(立即发放),DEDUCT(扣减) | |
channelType | String | required | 20 | 渠道type |
description | String | required | 255 | 备注,包括事件type、事件等信息,使用JSON字符串格式 |
effectTime | String | 积分生效时间,格式为yyyy-MM-dd HH:mm:ss,为空时表示立即生效 | ||
expiredTime | String | 积分过期时间,格式为yyyy-MM-dd HH:mm:ss | ||
memberId | String | required | 32 | 会员ID |
memberType | String | required | 20 | 会员type |
point | Number | required | 积分 | |
shopCode | String | 32 | 店铺code | |
KZZD1 | String | 255 | 积分type | |
KZZD2 | String | 255 | 积分来源 | |
KZZD3 | String | required | 255 | 变更事件typecode |
parameter example
{
"memberId": "0040a85608844820900558fc2671cb7c",
"accountType": "CPBPAST",
"point": 20,
"effectTime": "2021-07-13 08:36:03",
"expiredTime": "2021-07-13 08:36:03",
"changeType": "SEND",
"description": "备注",
"channelType": "POS",
"memberType": "shuyun",
"shopCode": "10001",
"KZZD1": "活动积分",
"KZZD2": ”线下活动",
"KZZD3": "E0001"
}
Return status code:
200: 请求成功
201: Created
204: 修改会员积分成功
401:api-gateway 鉴权失败
403: 禁止访问
404: 请求的 URL 不存在
error Example
{
"module": "Solution Package",
"service": "openapi",
"code": "010407",
"desc": "参数异常",
"uri": "http://..."
}
6.Member order API
6.1. Query member order information
Interface Request: /order/{memberType}/page
Interface Description: Used to query member order information
Request method: HTTP GET
Request Body Description:
Field Name | type | required | length | Field Description |
---|---|---|---|---|
channelType | String | 20 | 渠道type | |
currentPage | integer | 当前页数,默认为1 | ||
keyType | String | 搜索type | ||
keyWord | String | 搜索关键字 | ||
memberId | String | 32 | 会员ID,与mobile二选一,如果两个都有,则以memberId为主 | |
memberType | String | Y | 20 | 会员type |
mobile | String | 20 | 手机号,与memberId二选一 | |
orderBeginTime | String | 搜索此时间之后的订单,格式为yyyy-MM-dd HH:mm:ss | ||
orderEndTime | String | 搜索此时间之前的订单,格式为yyyy-MM-dd HH:mm:ss | ||
pageSize | Integer | 分页容量,默认为20 | ||
status | String | 20 | 订单状态 |
Response Body Description:
Field Name | type | Field Description |
---|---|---|
currentPage | Integer | 当前页 |
data | Array | 分页数据 |
pageSize | Integer | 分页容量 |
totalCount | Integer | 总记录数 |
totalPage | Integer | 总页数 |
Response body example
{
"currentPage": 0,
"pageSize": 0,
"totalCount": 0,
"totalPage": 0,
"data": [
{
"memberType": "shuyun",
"orderId": "087989aaf6af4e58897794d18axxxxx",
"originOrderId": "087989aaf6af4e58897794d18axxxxx",
"customerNo": "T000001",
"shopCode": "SHOP001",
"shopName": "SHOP001",
"memberId": "1c25f18ad274493882d01660e3exxxxx",
"shopTypeCode": "TAOBAO",
"orderType": "NORMAL",
"orderStatus": "FINISHED",
"channelType": "TAOBAO",
"totalQuantity": 1,
"totalFee": 85,
"payment": 85,
"freight": 10,
"discountRate": 0.85,
"discountFee": 15,
"receiverName": "abc",
"receiverMobile": "18900000000",
"receiverTelephone": "18900000000",
"receiverProvince": "上海",
"receiverCity": "上海",
"receiverDistrict": "浦东新区",
"receiverAddress": "南京东路 100 号",
"receiverZipCode": "200000",
"couponNo": "C123456",
"couponFee": 15,
"guideCode": "001",
"description": "无",
"orderTime": "2021-10-13T12:26:58.386+08:00",
"payTime": "2021-10-13T12:26:58.386+08:00",
"finishTime": "2021-10-13T12:26:58.386+08:00",
"receiveTime": "2021-10-13T12:26:58.386+08:00",
"shippingTime": "2021-10-13T12:26:58.386+08:00",
"exchangeTime": "2021-10-13T12:26:58.386+08:00",
"refundTime": "2021-10-13T12:26:58.386+08:00",
"pointFlag": 1,
"orderItems": [
{
"orderItemId": "bf3a654f1afa4859bb5c0e8846bxxxxx",
"originOrderItemId": "bf3a654f1afa4859bb5c0e8846bxxxxx",
"productCode": "P001",
"productName": "P001",
"totalFee": 85,
"payment": 85,
"quantity": 1,
"channelType": "TAOBAO",
"status": "FINISHED",
"skuId": "S001",
"shopTypeCode": "TAOBAO",
"tagPrice": 100,
"retailPrice": 100,
"discountRate": 0.85,
"discountFee": 15,
"orderType": "NORMAL",
"finishTime": "2021-10-13T12:26:58.386+08:00",
"payTime": "2021-10-13T12:26:58.386+08:00",
"orderTime": "2021-10-13T12:26:58.386+08:00",
"picture": [
"https://allpro.saas.top/FsB-uzzX4WtCzpDuVuwqp2OdNbQ?e=1547742055&token=yNjhOp7gnH4St9yP72OlwuQ6JUNQf49pxAuGWYFt
:1eZIUjRKIekGuMGG-c-s7UqNF1Y=;"
],
"customizedProperties": {
"string": "update"
}
}
],
"customizedProperties": {
"ticketNum": "123456789",
"salesMode": "123456789",
"presaleFlag": "123456789",
"presaleStoreId": "123456789",
"presalePosId": "123456789",
"presaleBillNo": "123456789",
"presaleReturnStoreId": "123456789",
"presaleReturnPosId": "123456789",
"presaleReturnBillNo": "123456789",
"orderSource": "10"
},
"id": "string"
}
]
}
Return status code:
200: 成功
401:api-gateway 鉴权失败
403: 禁止访问
404: 请求的 URL 不存在
error Example
{
"module": "Solution Package",
"service": "openapi",
"code": "010407",
"desc": "参数异常",
"uri": "http://..."
}
6.2. Check member order details
Interface Request: /order/{memberType}/{orderId}
Interface Description: Used to query the details of the main order and suborder
Request method: HTTP GET
Request Body Description:
Field Name | type | required | length | Field Description |
---|---|---|---|---|
channelType | String | 20 | 渠道type | |
memberType | String | Y | 20 | 会员type |
orderId | String | Y | 32 | 订单ID |
orderType | String | Y | 20 | 订单type,可选值为NORMAL(正常单),REFUND(退单) |
Response Body Description:
Field Name | type | Field Description |
---|---|---|
orderInfo | Object | 结构体如下 |
orderInfo:
Field Name | type | required | length | Field Description |
---|---|---|---|---|
channelType | String | 20 | 渠道 | |
couponFee | Number | 优惠劵金额 | ||
couponNo | String | 64 | 优惠劵码 | |
customerNo | String | 64 | 渠道ID,渠道唯一标识,用于区分渠道会员 | |
description | String | 255 | 订单备注 | |
discountFee | Number | 折扣金额 | ||
discountRate | Number | 折扣率(小于等于1) | ||
exchangeTime | String | 订单换货时间,格式为yyyy-MM-dd'T'HH:mm:ss.SSSXXX,时区为GMT+8 | ||
freight | Number | 运费 | ||
guideCode | String | 32 | 订单对应导购 | |
lastSync | String | 数据同步时间 | ||
memberId | String | 32 | 会员ID | |
memberType | String | 20 | 会员type | |
orderId | String | 32 | 订单ID | |
orderItems | Array | 正常订单子订单 | ||
orderStatus | String | 20 | 订单状态 | |
orderTime | String | 下单时间,格式为yyyy-MM-dd'T'HH:mm:ss.SSSXXX,时区为GMT+8 | ||
orderType | String | 20 | 订单type,可选值为NORMAL(正常单)、REFUND(退单) | |
originOrderId | String | 32 | 原始订单ID,退单时传 | |
payTime | String | 订单付款时间,格式为yyyy-MM-dd'T'HH:mm:ss.SSSXXX,时区为GMT+8 | ||
payment | Number | 实付金额 | ||
pointFlag | integer | 是否计算积分,0-不计算积分,1-计算积分 | ||
receiveTime | String | 订单收货时间,格式为yyyy-MM-dd'T'HH:mm:ss.SSSXXX,时区为GMT+8 | ||
finishTime | String | 订单完成时间,格式为yyyy-MM-dd HH:mm:ss | ||
receiverAddress | String | 255 | 收货人地址 | |
receiverCity | String | 100 | 市 | |
receiverDistrict | String | 100 | 区/县 | |
receiverMobile | String | 20 | 收货人手机号 | |
receiverName | String | 100 | 收货人姓名 | |
receiverProvince | String | 100 | 省 | |
receiverTelephone | String | 20 | 收货人固定电话 | |
receiverZipCode | String | 20 | 邮编 | |
refundTime | String | 订单退货时间,格式为yyyy-MM-dd'T'HH:mm:ss.SSSXXX,时区为GMT+8 | ||
shippingTime | String | 订单发货时间,格式为yyyy-MM-dd'T'HH:mm:ss.SSSXXX,时区为GMT+8 | ||
shopCode | String | 32 | 注册门店code | |
shopName | String | 255 | 注册门店名称 | |
shopTypeCode | String | 32 | 注册门店typecode | |
totalFee | Number | 应付金额 | ||
totalQuantity | integer | 商品总数 | ||
updateTime | String | 更新时间 | ||
customizedProperties{} | Object(Map) | 扩展字段 |
customizedProperties:
|ticketNum|String| |100|小票号|
|salesMode|String| |10|销售type,可选值为0(常规销售)、1(团购)|
|presaleFlag|String| |10|预售区分,可选值为0(普通)、1(预售)、2(提货)|
|presaleStoreId|String| |32|预售店铺编号|
|presalePosId|String| |32|预售POS机号|
|presaleBillNo|String| |32|预售小票号|
|presaleReturnStoreId|String| |32|预售退货店铺编号|
|presaleReturnPosId|String| |32|预售退货POS机号|
|presaleReturnBillNo|String| |32|预售退货小票号|
|orderSource|String| |64|订单来源,枚举type字段,具体枚举值参考枚举字典文档|
Response body example
{
"memberType": "shuyun",
"orderId": "087989aaf6af4e58897794d18axxxxx",
"originOrderId": "087989aaf6af4e58897794d18axxxxx",
"customerNo": "T000001",
"shopCode": "SHOP001",
"shopName": "SHOP001",
"memberId": "1c25f18ad274493882d01660e3exxxxx",
"shopTypeCode": "TAOBAO",
"orderType": "NORMAL",
"orderStatus": "FINISHED",
"channelType": "TAOBAO",
"totalQuantity": 1,
"totalFee": 85,
"payment": 85,
"freight": 10,
"discountRate": 0.85,
"discountFee": 15,
"receiverName": "abc",
"receiverMobile": "18900000000",
"receiverTelephone": "18900000000",
"receiverProvince": "上海",
"receiverCity": "上海",
"receiverDistrict": "浦东新区",
"receiverAddress": "南京东路 100 号",
"receiverZipCode": "200000",
"couponNo": "C123456",
"couponFee": 15,
"guideCode": "001",
"description": "无",
"orderTime": "2021-10-13T12:26:58.386+08:00",
"payTime": "2021-10-13T12:26:58.386+08:00",
"finishTime": "2021-10-13T12:26:58.386+08:00",
"receiveTime": "2021-10-13T12:26:58.386+08:00",
"shippingTime": "2021-10-13T12:26:58.386+08:00",
"exchangeTime": "2021-10-13T12:26:58.386+08:00",
"refundTime": "2021-10-13T12:26:58.386+08:00",
"pointFlag": 1,
"orderItems": [
{
"orderItemId": "bf3a654f1afa4859bb5c0e8846bxxxxx",
"originOrderItemId": "bf3a654f1afa4859bb5c0e8846bxxxxx",
"productCode": "P001",
"productName": "P001",
"totalFee": 85,
"payment": 85,
"quantity": 1,
"channelType": "TAOBAO",
"status": "FINISHED",
"skuId": "S001",
"shopTypeCode": "TAOBAO",
"tagPrice": 100,
"retailPrice": 100,
"discountRate": 0.85,
"discountFee": 15,
"orderType": "NORMAL",
"finishTime": "2021-10-13T12:26:58.386+08:00",
"payTime": "2021-10-13T12:26:58.386+08:00",
"orderTime": "2021-10-13T12:26:58.386+08:00",
"picture": [
"https://allpro.saas.top/FsB-uzzX4WtCzpDuVuwqp2OdNbQ?e=1547742055&token=yNjhOp7gnH4St9yP72OlwuQ6JUNQf49pxAuGWYFt
:1eZIUjRKIekGuMGG-c-s7UqNF1Y=;"
],
"customizedProperties": {
"string": "update"
}
}
],
"customizedProperties": {
"ticketNum": "123456789",
"salesMode": "123456789",
"presaleFlag": "123456789",
"presaleStoreId": "123456789",
"presalePosId": "123456789",
"presaleBillNo": "123456789",
"presaleReturnStoreId": "123456789",
"presaleReturnPosId": "123456789",
"presaleReturnBillNo": "123456789",
"orderSource": "10"
},
"id": "string"
}
Return status code:
200: 成功
401:api-gateway 鉴权失败
403: 禁止访问
404: 请求的 URL 不存在
error Example
{
"module": "Solution Package",
"service": "openapi",
"code": "010407",
"desc": "参数异常",
"uri": "http://..."
}
6.3. Order save or update
Interface Request: /order/save
Interface Description: Order save or update
Request method: HTTP POST
Request Body Description:
Field Name | type | required | length | Field Description |
---|---|---|---|---|
Order | Object | required | 结构体如下 |
Order:
Field Name | type | required | length | Field Description |
---|---|---|---|---|
channelType | String | Y | 20 | 渠道 |
couponFee | Number | 优惠劵金额 | ||
couponNo | String | 32 | 优惠劵码 | |
customerNo | String | 64 | 客户编号 | |
description | String | 255 | 订单备注 | |
discountFee | Number | 折扣金额 | ||
discountRate | Number | 折扣率(小于等于1) | ||
exchangeTime | String | 订单换货时间,格式为yyyy-MM-dd HH:mm:ss | ||
freight | Number | 运费 | ||
guideCode | String | 32 | 订单对应导购 | |
memberId | String | 32 | 会员ID | |
memberType | String | Y | 20 | 会员type |
orderId | String | Y | 32 | 订单ID |
orderItems | Array | 正常订单子订单 | ||
orderStatus | String | Y | 20 | 订单状态 |
orderTime | String | 下单时间,格式为yyyy-MM-dd HH:mm:ss | ||
orderType | String | Y | 20 | 订单type,可选值为NORMAL(正常单)、REFUND(退单) |
originOrderId | String | 32 | 原始订单ID,退单时传 | |
payTime | String | 订单付款时间,格式为yyyy-MM-dd HH:mm:ss | ||
payment | Number | Y | 实付金额 | |
pointFlag | Integer | 是否计算积分,0-不计算积分,1-计算积分 | ||
receiveTime | String | 订单收货时间,格式为yyyy-MM-dd HH:mm:ss | ||
receiverAddress | String | 255 | 收货人地址 | |
receiverCity | String | 100 | 市 | |
receiverDistrict | String | 100 | 区/县 | |
receiverMobile | String | 20 | 收货人手机号 | |
receiverName | String | 100 | 收货人姓名 | |
receiverProvince | String | 100 | 省 | |
receiverTelephone | String | 20 | 收货人固定电话 | |
receiverZipCode | String | 20 | 邮编 | |
refundTime | String | 订单退货时间,格式为yyyy-MM-dd HH:mm:ss | ||
shippingTime | String | 订单发货时间,格式为yyyy-MM-dd HH:mm:ss | ||
finishTime | String | 订单完成时间,格式为yyyy-MM-dd HH:mm:ss | ||
shopCode | String | Y | 32 | 下单门店code |
shopName | String | Y | 255 | 下单门店名称 |
shopTypeCode | String | 32 | 下单门店typecode | |
totalFee | Number | Y | 应付金额 | |
totalQuantity | Integer | Y | 商品总数 | |
customizedProperties{} | Object(Map) | 扩展字段,数据结构见下方 |
customizedProperties:
Field Name | type | required | length | Field Description |
---|---|---|---|---|
ticketNum | String | 100 | 小票号 | |
salesMode | String | 10 | 销售type,可选值为0(常规销售)、1(团购) | |
presaleFlag | String | 10 | 预售区分,可选值为0(普通)、1(预售)、2(提货) | |
presaleStoreId | String | 32 | 预售店铺编号 | |
presalePosId | String | 32 | 预售POS机号 | |
presaleBillNo | String | 32 | 预售小票号 | |
presaleReturnStoreId | String | 32 | 预售退货店铺编号 | |
presaleReturnPosId | String | 32 | 预售退货POS机号 | |
presaleReturnBillNo | String | 32 | 预售退货小票号 | |
orderSource | String | 64 | 订单来源,枚举type字段,具体枚举值参考枚举字典文档 |
parameter example
{
"memberType": "shuyun",
"orderId": "087989aaf6af4e58897794d18axxxxx",
"originOrderId": "087989aaf6af4e58897794d18axxxxx",
"customerNo": "T000001",
"shopCode": "SHOP001",
"shopName": "SHOP001",
"memberId": "1c25f18ad274493882d01660e3exxxxx",
"shopTypeCode": "TAOBAO",
"orderType": "NORMAL",
"orderStatus": "FINISHED",
"channelType": "TAOBAO",
"totalQuantity": 1,
"totalFee": 85,
"payment": 85,
"freight": 10,
"discountRate": 0.85,
"discountFee": 15,
"receiverName": "abc",
"receiverMobile": "18900000000",
"receiverTelephone": "18900000000",
"receiverProvince": "上海",
"receiverCity": "上海",
"receiverDistrict": "浦东新区",
"receiverAddress": "南京东路 100 号",
"receiverZipCode": "200000",
"couponNo": "C123456",
"couponFee": 15,
"guideCode": "001",
"description": "无",
"orderTime": "2021-07-13 08:36:03",
"payTime": "2021-07-13 08:36:03",
"finishTime": "2021-07-13 08:36:03",
"receiveTime": "2021-07-13 08:36:03",
"shippingTime": "2021-07-13 08:36:03",
"exchangeTime": "2021-07-13 08:36:03",
"refundTime": "2021-07-13 08:36:03",
"pointFlag": 1,
"orderItems": [
{
"orderItemId": "bf3a654f1afa4859bb5c0e8846bxxxxx",
"originOrderItemId": "bf3a654f1afa4859bb5c0e8846bxxxxx",
"productCode": "P001",
"productName": "P001",
"totalFee": 85,
"payment": 85,
"quantity": 1,
"channelType": "TAOBAO",
"status": "FINISHED",
"skuId": "S001",
"shopTypeCode": "TAOBAO",
"tagPrice": 100,
"retailPrice": 100,
"discountRate": 0.85,
"discountFee": 15,
"orderType": "NORMAL",
"finishTime": "2021-07-13 08:36:03",
"payTime": "2021-07-13 08:36:03",
"orderTime": "2021-07-13 08:36:03",
"picture": [
"https://allpro.saas.top/FsB-uzzX4WtCzpDuVuwqp2OdNbQ?e=1547742055&token=yNjhOp7gnH4St9yP72OlwuQ6JUNQf49pxAuGWYFt
:1eZIUjRKIekGuMGG-c-s7UqNF1Y=;"
],
"customizedProperties": {
"string": "update"
}
}
],
"customizedProperties": {
"ticketNum": "123456789",
"salesMode": "123456789",
"presaleFlag": "123456789",
"presaleStoreId": "123456789",
"presalePosId": "123456789",
"presaleBillNo": "123456789",
"presaleReturnStoreId": "123456789",
"presaleReturnPosId": "123456789",
"presaleReturnBillNo": "123456789",
"orderSource": "10"
}
}
Return status code:
200: 成功
201: Created
401:api-gateway 鉴权失败
403: 禁止访问
404: 请求的 URL 不存在
error Example
{
"module": "Solution Package",
"service": "openapi",
"code": "010407",
"desc": "参数异常",
"uri": "http://..."
}
7.Voucher API
7.1. Check the list of card voucher programs
Interface Request: /offer/project/list
Interface Description: This parameter is used to query the card item list. The field returned by the actual interface is consistent with the definition of the voucher type
Request method: HTTP POST
Request Body Description:
Field Name | type | required | length | Field Description |
---|---|---|---|---|
channelType | String | Y | 20 | 渠道type |
currentPage | Integer | Y | 当前页,默认为1 | |
memberType | String | Y | 20 | 会员type |
name | String | 卡券项目名称 | ||
pageSize | Integer | Y | 每页显示数量,默认为10,上限为100 | |
projectIds | Array | 卡券项目id集合 | ||
status | String | 项目状态,可选值为VALID(已生效)、HAS_FINISHED(已结束) | ||
updateTime | Date | 修改时间,查询此时间之后的项目,格式为yyyy-MM-dd HH:mm:ss |
parameter example
{
"memberType": "shuyun",
"channelType": "KYLIN_GUIDE",
"currentPage": 1,
"pageSize": 10,
"status": "VALID",
"name": "xxx",
"projectIds": "[11,12]",
"updateTime": "2021-10-10 11:00:00"
}
Response Body Description:
Field Name | type | Field Description |
---|---|---|
currentPage | Integer | 当前页 |
data | Array | 分页数据 |
pageSize | Integer | 分页容量 |
Response body example
{
"currentPage": 0,
"pageSize": 0,
"data": [
{
"instanceId": "001",
"status": "VALID",
"memberId": "32345464545",
"projectId": "1001",
"couponCode": "couponCode",
"projectType": "CASH",
"projectName": "新会员券",
"validTime": "2022-05-30T02:59:48.190Z",
"expireTime": "2022-05-30T02:59:48.190Z",
"effectText": "12 元、8.5 折",
"ruleText": "具体规则",
"grantTime": "2022-05-30T02:59:48.190Z",
"useTime": "2022-05-30T02:59:48.190Z",
"selectorRule": {
"productScope": [
"P001",
"P002",
"P003"
],
"excludeProduct": [
"P001",
"P002",
"P003"
],
"receiveProductScope": [
"P001",
"P002",
"P003"
],
"applicationShop": [
"S001",
"S002",
"S003"
]
},
"customizedProperties": {
"couponType": "Initiative",
"multiLayer": "0",
"applicableGrade1": "1",
"applicableGrade2": "0",
"applicableGrade3": "0",
"applicableGrade4": "0",
"applicableGrade5": "0",
"ownerShop": "1",
"limitOwnerShop": "0",
"orderAmount": 100,
"orderNumber": 2,
"points": 100,
"isMobileCheck": "1",
"giftName": "精华",
"giftContent": "精华 20ml",
"giftValue": "20",
"activityCounter": "",
"useRule": "",
"reminder": "",
"validyType": "",
"configuredUsableDays": "",
"isChangeCoupon": ""
}
"presetOrCustomField": {
"key": "value"
}
}
]
}
Return status code:
200: 成功
201: Created
204: 操作积分成功
401:api-gateway 鉴权失败
403: 禁止访问
404: 请求的 URL 不存在
error Example
{
"module": "Solution Package",
"service": "openapi",
"code": "010407",
"desc": "参数异常",
"uri": "http://..."
}
7.2. Check the details of the voucher program
Interface Request: /offer/project/detail
Interface Description: This parameter is used to query the details of the card item. The field returned by the actual interface must be consistent with the definition of the coupon type
Request method: HTTP GET
Request Body Description:
Field Name | type | required | length | Field Description |
---|---|---|---|---|
channelType | String | Y | 20 | 渠道type |
memberType | String | Y | 20 | 会员type |
projectId | String | Y | 32 | 卡券项目id |
Response Body Description:
Field Name | type | Field Description |
---|---|---|
project | Object | 结构体如下 |
project:
Field Name | type | required | length | Field Description |
---|---|---|---|---|
effectText | String | 20 | 效果描述,对于代金券为具体的代金金额,对于折扣券为具体的折扣 | |
expireTime | String | 实例过期时间,格式为yyyy-MM-dd'T'HH:mm:ss.SSSXXX,时区为GMT+8 | ||
name | String | 255 | 卡券项目名称 | |
projectId | String | 32 | 卡券项目ID | |
type | String | 20 | 卡券项目type,可选值为DISCOUNT(折扣)、CASH(现金)、EXCHANGE(兑礼) | |
ruleText | String | 255 | 使用规则/使用说明 | |
status | String | 20 | 卡券项目状态 | |
updateTime | String | 变更时间,格式为yyyy-MM-dd'T'HH:mm:ss.SSSXXX | ||
validTime | String | 实例生效时间,格式为yyyy-MM-dd'T'HH:mm:ss.SSSXXX,时区为GMT+8 | ||
totalCount | String | 可发放总数 | ||
selectorRule | Object(Map) | 选择器规则,会展示在系统前端配置的详细规则字段 | ||
customizedProperties | Object(Map) | 扩展字段 |
selectorRule:
Field Name | type | required | length | Field Description |
---|---|---|---|---|
productScope[] | Array | 订单中包含指定商品的商品范围 | ||
excludeProduct[] | Array | 订单中不包含指定商品的商品范围 | ||
receiveProductScope[] | Array | 券可领取的商品范围 | ||
applicationShop[] | Array | 券适用门店范围 |
customizedProperties:
Field Name | type | required | Field Description |
---|---|---|---|
couponType | String | 卡券type | |
multiLayer | String | 是否可叠加使用,可选值为是(1)或否(0) | |
applicableGrade1 | String | 券适用会员等级 1,可选值为是(1)或否(0) | |
applicableGrade2 | String | 券适用会员等级 2,可选值为是(1)或否(0) | |
applicableGrade3 | String | 券适用会员等级 3,可选值为是(1)或否(0) | |
applicableGrade4 | String | 券适用会员等级 4,可选值为是(1)或否(0) | |
applicableGrade5 | String | 券适用会员等级 5,可选值为是(1)或否(0) | |
ownerShop | String | 商品是否仅会员所属门店可领取,可选值为是(1)或否(0) | |
limitOwnerShop | String | 商品是否限制会员选择的所属门店领取,可选值为是(1)或否(0) | |
orderAmount | Int | 订单满足指定金额及以上 | |
orderNumber | Int | 订单满足商品指定件数及以上 | |
points | Int | 券可赠送积分 | |
isMobileCheck | String | 券核销是否需要手机验证码验证 | |
giftName | String | 礼品名称 | |
giftContent | String | 礼品内容 | |
giftValue | String | 礼品价值 | |
activityCounter | String | 活动专柜 | |
useRule | String | 使用规则 | |
reminder | String | 温馨提示 | |
validyType | String | 有效期type,可选值为absolutely(绝对时间)或relative(相对时间) | |
configuredUsableDays | String | 相对失效时间 | |
isChangeCoupon | String | 是否可转赠 |
Response body example
{
"projectId": "001",
"type": "cashEffect",
"status": "VALID",
"name": "数云项目",
"validTime": "2020-11-30T16:48:03+08:00",
"expireTime": "2020-11-30T16:48:03+08:00",
"totalCount": "100",
"effectText": "12 元、8.5 折",
"ruleText": "具体规则",
"selectorRule": {
"productScope": [
"P001",
"P002",
"P003"
],
"excludeProduct": [
"P001",
"P002",
"P003"
],
"receiveProductScope": [
"P001",
"P002",
"P003"
],
"applicationShop": [
"S001",
"S002",
"S003"
]
},
"customizedProperties": {
"couponType": "Initiative",
"multiLayer": "0",
"applicableGrade1": "1",
"applicableGrade2": "0",
"applicableGrade3": "0",
"applicableGrade4": "0",
"applicableGrade5": "0",
"ownerShop": "1",
"limitOwnerShop": "0",
"orderAmount": 100,
"orderNumber": 2,
"points": 100,
"isMobileCheck": "1",
"giftName": "精华",
"giftContent": "精华 20ml",
"giftValue": "20",
"activityCounter": "",
"useRule": "",
"reminder": "",
"validyType": "",
"configuredUsableDays": "",
"isChangeCoupon": ""
},
"updateTime": "2020-11-30T16:48:03+08:00"
}
Return status code:
200: 成功
401:api-gateway 鉴权失败
403: 禁止访问
404: 请求的 URL 不存在
error Example
{
"module": "Solution Package",
"service": "openapi",
"code": "010407",
"desc": "参数异常",
"uri": "http://..."
}
7.3. Card issue with idempotent (Single member sheet)
Interface Request: /offer/instance/grant
Interface Description: It is recommended to limit the entry fields of voucher issuance to the fields defined by [card item] to avoid misunderstandings when using subsequent data (the card interface will remember all the fields described in the body and extension fields, without restriction).
Request method: HTTP POST
Request Body Description:
header:
Field Name | type | required | length | Field Description |
---|---|---|---|---|
X-Request-Sequence | String | Y | 请求头(request header)里需要传:X-Request-Sequence, 不同请求对应 X-Request-Sequence值确保唯一;若同一请求,请求多次,确保X-Request-Sequence 值是一样。 |
Body:
Field Name | type | required | length | Field Description |
---|---|---|---|---|
channelType | String | Y | 20 | 渠道type |
memberType | String | Y | 20 | 会员type |
memberId | String | Y | 32 | 会员ID |
projectId | String | Y | 32 | 卡券项目ID |
params{} | Object(Map) | 发放扩展属性,数据结构见下方 |
params:
Field Name | type | required | length | Field Description |
---|---|---|---|---|
campaignId | String | Y | 100 | 活动ID |
selectShopCode | String | Y | 32 | 选择门店编码 |
orderId | String | Y | 32 | 订单ID |
sharedBy | String | Y | 32 | 分享人ID |
sharedCouponCode | String | Y | 32 | 分享券ID |
parameter example
{
"channelType": "KYLIN_GUIDE",
"memberType": "shuyun",
"memberId": "10001",
"projectId": "1001",
"params": {
"campaignId": "100001",
"selectShopCode": "100001",
"orderId": "100001",
"sharedBy": "100001",
"sharedCouponCode": "100001"
}
}
Response Body Description:
Field Name | type | Field Description |
---|---|---|
msg | String | 实例状态更新成功时为空,更新失败时为对应的失败原因 |
success | Boolean | 是否成功 |
instanceInfos | Array | 批量请求失败详情 |
Response body example
{
"success": true,
"msg": "xxx",
"instanceIds": "11,22",
"instanceInfos": [
{
"instanceId": "001",
"couponCode": "SDSDSZ1",
"projectId": "1001",
"status": "GRANTED",
"grantTime": "2021-12-15T17:10:01.218+08:00"
}
]
}
Return status code:
200: 请求成功
201: Created
401:api-gateway 鉴权失败
403: 禁止访问
404: 请求的 URL 不存在
error Example
{
"module": "Solution Package",
"service": "openapi",
"code": "010407",
"desc": "参数异常",
"uri": "http://..."
}
7.4. Cancellation of frozen card (single card)
Interface Request: /offer/coupon/writeoff
Interface Description: Used for the verification of frozen card vouchers (single card vouchers), this interface will verify the status and validity of the voucher, and other fields are not restricted
Request method: HTTP POST
Request Body Description:
Field Name | type | required | length | Field Description |
---|---|---|---|---|
channelType | String | Y | 20 | 渠道type |
memberType | String | Y | 20 | 会员type |
couponCode | String | Y | 100 | 券码 |
params{} | Object(Map) | 扩展属性 |
params:
Field Name | type | required | length | Field Description |
---|---|---|---|---|
employeeId | String | Y | 64 | 核销员工号 |
counterId | String | Y | 64 | 核销POS机号 |
ticketNum | String | Y | 64 | 核销小票号 |
recordId | String | Y | 32 | 兑换记录ID |
shopCode | String | Y | 32 | 核销门店编码 |
productCode | String | Y | 32 | 核销商品编码 |
parameter example
{
"channelType": "KYLIN_GUIDE",
"couponCode": "96800081",
"memberType": "shuyun",
"params": {
"shopCode": "123",
"employeeId": "123"
"counterId": "123"
"ticketNum": "123"
"recordId": "123"
"productCode": "123"
}
}
Response Body Description:
Field Name | type | Field Description |
---|---|---|
msg | String | 实例状态更新成功时为空,更新失败时为对应的失败原因 |
success | Boolean | 是否成功 |
Response body example
{
"msg": "xxx",
"success": true
}
Return status code:
200: 成功
201: Created
401:api-gateway 鉴权失败
403: 禁止访问
404: 请求的 URL 不存在
error Example
{
"module": "Solution Package",
"service": "openapi",
"code": "010407",
"desc": "参数异常",
"uri": "http://..."
}
7.5. Card cancellation (single card)
Interface Request: /offer/coupon/anticounting
Interface Description: Used for card cancellation
Request method: HTTP POST
Request Body Description:
Field Name | type | required | length | Field Description |
---|---|---|---|---|
channelType | String | Y | 20 | 渠道type |
memberType | String | Y | 20 | 会员type |
couponCode | String | Y | 100 | 券码 |
params{} | Object(Map) | 扩展属性 |
parameter example
{
"channelType": "KYLIN_GUIDE",
"couponCode": "96800081",
"memberType": "shuyun",
"params": {
"shopCode": "123"
}
}
Response Body Description:
Field Name | type | Field Description |
---|---|---|
msg | String | 实例状态更新成功时为空,更新失败时为对应的失败原因 |
success | Boolean | 是否成功 |
Response body example
{
"msg": "xxx",
"success": true
}
Return status code:
200: 成功
201: Created
401:api-gateway 鉴权失败
403: 禁止访问
404: 请求的 URL 不存在
error Example
{
"module": "Solution Package",
"service": "openapi",
"code": "010407",
"desc": "参数异常",
"uri": "http://..."
}
7.6. Card Freeze (Single Card)
Interface Request: /offer/coupon/frozen
Interface Description: Card Freeze (Single Card)
Request method: HTTP POST
Request Body Description:
Field Name | type | required | length | Field Description |
---|---|---|---|---|
channelType | String | Y | 20 | 渠道type |
memberType | String | Y | 20 | 会员type |
couponCode | String | Y | 100 | 券码 |
params{} | Object(Map) | 扩展属性 |
parameter example
{
"channelType": "KYLIN_GUIDE",
"couponCode": "96800081",
"memberType": "shuyun",
"params": {
"shopCode": "123"
}
}
Response Body Description:
Field Name | type | Field Description |
---|---|---|
msg | String | 实例状态更新成功时为空,更新失败时为对应的失败原因 |
success | Boolean | 是否成功 |
Response body example
{
"msg": "xxx",
"success": true
}
Return status code:
200: 成功
201: Created
401:api-gateway 鉴权失败
403: 禁止访问
404: 请求的 URL 不存在
error Example
{
"module": "Solution Package",
"service": "openapi",
"code": "010407",
"desc": "参数异常",
"uri": "http://..."
}
7.7. Coupon Unfreezing (Single Coupon)
Interface Request: /offer/coupon/thaw
Interface Description: For card unfreezing (Single Card)
Request method: HTTP POST
Request Body Description:
Field Name | type | required | length | Field Description |
---|---|---|---|---|
channelType | String | Y | 20 | 渠道type |
memberType | String | Y | 20 | 会员type |
couponCode | String | Y | 100 | 券码 |
params{} | Object(Map) | 扩展属性 |
parameter example
{
"channelType": "KYLIN_GUIDE",
"couponCode": "96800081",
"memberType": "shuyun",
"params": {
"shopCode": "123"
}
}
Response Body Description:
Field Name | type | Field Description |
---|---|---|
msg | String | 实例状态更新成功时为空,更新失败时为对应的失败原因 |
success | Boolean | 是否成功 |
Response body example
{
"msg": "xxx",
"success": true
}
Return status code:
200: 成功
201: Created
401:api-gateway 鉴权失败
403: 禁止访问
404: 请求的 URL 不存在
error Example
{
"module": "Solution Package",
"service": "openapi",
"code": "010407",
"desc": "参数异常",
"uri": "http://..."
}
7.8. Card cancellation (single card)
Interface Request: /offer/coupon/use
Interface Description: For card cancellation (single card)
Request method: HTTP POST
Request Body Description:
Field Name | type | required | length | Field Description |
---|---|---|---|---|
channelType | String | Y | 20 | 渠道type |
memberType | String | Y | 20 | 会员type |
couponCode | String | Y | 100 | 券码 |
params{} | Object(Map) | 扩展属性 |
parameter example
{
"channelType": "KYLIN_GUIDE",
"couponCode": "96800081",
"memberType": "shuyun",
"params": {
"shopCode": "123"
}
}
Response Body Description:
Field Name | type | Field Description |
---|---|---|
msg | String | 实例状态更新成功时为空,更新失败时为对应的失败原因 |
success | Boolean | 是否成功 |
Response body example
{
"msg": "xxx",
"success": true
}
Return status code:
200: 成功
201: Created
401:api-gateway 鉴权失败
403: 禁止访问
404: 请求的 URL 不存在
error Example
{
"module": "Solution Package",
"service": "openapi",
"code": "010407",
"desc": "参数异常",
"uri": "http://..."
}
7.9. Query the list of coupon relationships
Interface Request: /offer/instance/list
Interface Description: Used to query the card instance list information, the actual interface return fields include: the passed field when issuing the card and the passed field when writing off the card;
Request method: HTTP POST
Request Body Description:
Field Name | type | required | length | Field Description |
---|---|---|---|---|
channelType | String | Y | 20 | 渠道type |
currentPage | String | Y | 当前页,默认为1 | |
memberId | String | Y | 32 | 会员ID |
memberType | String | Y | 20 | 会员type |
pageSize | String | Y | 每页显示数量,默认为10,上限为100 | |
status | String | 券实例状态:VALID(已生效)、USED(已使用)、EXPIRED(已失效)、GRANTED(已发放)、FROZEN(冻结中) |
parameter example
{
"memberType": "shuyun",
"channelType": "KYLIN_GUIDE",
"memberId": "001",
"status": "VALID",
"currentPage": 1,
"pageSize": 10
}
Response Body Description:
Field Name | type | Field Description |
---|---|---|
currentPage | Integer | 当前页 |
data | Array | 分页数据 |
pageSize | Integer | 分页容量 |
Response body example
{
"currentPage": 0,
"pageSize": 0,
"data": [
{
"instanceId": "001",
"status": "VALID",
"memberId": "32345464545",
"projectId": "1001",
"couponCode": "couponCode",
"projectType": "CASH",
"projectName": "新会员券",
"validTime": "2022-06-01T04:00:36.761Z",
"expireTime": "2022-06-01T04:00:36.761Z",
"effectText": "12 元、8.5 折",
"ruleText": "具体规则",
"grantTime": "2022-06-01T04:00:36.761Z",
"useTime": "2022-06-01T04:00:36.761Z",
"selectorRule": {
"additionalProp1": {},
"additionalProp2": {},
"additionalProp3": {}
},
"presetOrCustomField": {
"employeeId":"100001",
"counterId":"100001",
"recordId":"100001",
"ticketNum":"100001",
"shopCode":"100001",
"productCode":"100001",
"campaignId":"100001",
"selectShopCode":"100001",
"orderId":"100001",
"sharedBy": "100001",
"sharedCouponCode": "100001"
},
"customizedProperties": {
"key": "value"
}
}
]
}
Return status code:
200: 成功
201: Created
401:api-gateway 鉴权失败
403: 禁止访问
404: 请求的 URL 不存在
error Example
{
"module": "Solution Package",
"service": "openapi",
"code": "010407",
"desc": "参数异常",
"uri": "http://..."
}
7.10. Inquire membership information
Interface Request: /offer/coupon/detail
Interface Description: It is used to query the details of the card instance. The fields returned by the actual interface include: the fields passed in when the card is issued and the fields passed in when the card is cancelled;
Request method: HTTP GET
Request Body Description:
Field Name | type | required | length | Field Description |
---|---|---|---|---|
channelType | String | Y | 20 | 渠道type |
memberType | String | Y | 20 | 会员type |
couponCode | String | Y | 100 | 卡券实例id |
Response Body Description:
Field Name | type | Field Description |
---|---|---|
instanceInfoData | Object | 结构体如下 |
instanceInfoData:
Field Name | type | required | length | Field Description |
---|---|---|---|---|
expireTime | String | 实例过期时间,格式:yyyy-MM-dd'T'HH:mm:ss.SSSXXX,时区:GMT+8 | ||
grantTime | String | 发放时间,格式:yyyy-MM-dd'T'HH:mm:ss.SSSXXX,时区:GMT+8 | ||
couponCode | String | Y | 150 | 优惠券码 |
memberId | String | Y | 32 | 会员ID |
projectId | String | Y | 32 | 卡券项目ID |
projectName | String | 255 | 卡券项目名称 | |
projectType | String | 20 | 卡券项目type-使用效果type | |
ruleText | String | 255 | 使用规则/使用说明 | |
status | String | 20 | 卡券实例状态:GRANTED(已发放)、VALID(已生效)、EXPIRED(已失效)、USED(已使用)、FROZEN(冻结中) | |
useTime | String | 核销时间,格式:yyyy-MM-dd'T'HH:mm:ss.SSSXXX,时区:GMT+8 | ||
validTime | String | 实例生效时间,格式:yyyy-MM-dd'T'HH:mm:ss.SSSXXX,时区:GMT+8 | ||
presetOrCustomField | Object(Map) | 扩展属性 | ||
instanceId | String | 32 | 卡券实例ID | |
effectText | String | 255 | 效果描述 | |
selectorRule | Object(Map) | 选择器规则 | ||
customizedProperties | Object(Map) | 其他规则属性 |
presetOrCustomField:
Field Name | type | required | length | Field Description |
---|---|---|---|---|
campaignId | String | Y | 100 | 活动ID |
employeeId | String | Y | 32 | 核销员工号 |
counterId | String | Y | 64 | 核销POS机号 |
ticketNum | String | Y | 64 | 核销小票号 |
recordId | String | Y | 32 | 兑换记录ID |
shopCode | String | Y | 32 | 核销门店编码 |
productCode | String | Y | 32 | 核销商品编码 |
selectShopCode | String | Y | 32 | 选择门店编码 |
orderId | String | Y | 32 | 发放订单ID |
sharedBy | String | Y | 32 | 分享人 |
sharedCouponCode | String | Y | 32 | 分享券ID |
Response body example
{
"instanceId": "001",
"status": "VALID",
"memberId": "32345464545",
"projectId": "1001",
"couponCode": "couponCode",
"projectType": "CASH",
"projectName": "新会员券",
"validTime": "2022-05-30T03:25:56.873Z",
"expireTime": "2022-05-30T03:25:56.873Z",
"effectText": "12 元、8.5 折",
"ruleText": "具体规则",
"grantTime": "2022-05-30T03:25:56.873Z",
"useTime": "2022-05-30T03:25:56.873Z",
"selectorRule": {
"additionalProp1": {},
"additionalProp2": {},
"additionalProp3": {}
},
"customizedProperties": {
"key": "value"
},
"presetOrCustomField": {
"employeeId":"100001",
"counterId":"100001",
"recordId":"100001",
"ticketNum":"100001",
"shopCode":"100001",
"productCode":"100001",
"campaignId":"100001",
"selectShopCode":"100001",
"orderId":"100001",
"sharedBy": "100001",
"sharedCouponCode": "100001"
}
}
Return status code:
200: 成功
401:api-gateway 鉴权失败
403: 禁止访问
404: 请求的 URL 不存在
error Example
{
"module": "Solution Package",
"service": "openapi",
"code": "010407",
"desc": "参数异常",
"uri": "http://..."
}
7.11. Voucher expired
Interface Request: /offer/coupon/invalid
Interface Description: The card module does not allow secondary failure of the card, and the related operation returns operation failure (succsess is not true).
Request method: HTTP POST
Request Body Description:
Field Name | type | required | length | Field Description |
---|---|---|---|---|
channelType | String | Y | 20 | 渠道type |
memberType | String | Y | 20 | 会员type |
couponCode | String | Y | 100 | 券码 |
params{} | Object(Map) | 扩展属性 |
parameter example
{
"channelType": "KYLIN_GUIDE",
"couponCode": "96800081",
"memberType": "shuyun",
"params": {
"shopCode": "123"
}
}
Response Body Description:
Field Name | type | Field Description |
---|---|---|
msg | String | 实例状态更新成功时为空,更新失败时为对应的失败原因 |
success | Boolean | 是否成功 |
Response body example
{
"msg": "xxx",
"success": true
}
Return status code:
200: 成功
401:api-gateway 鉴权失败
403: 禁止访问
404: 请求的 URL 不存在
error Example
{
"module": "Solution Package",
"service": "openapi",
"code": "010407",
"desc": "参数异常",
"uri": "http://..."
}
7.12. Voucher valid
Interface Request: /offer/coupon/effective
Interface Description: Valid for card vouchers
Request method: HTTP POST
Request Body Description:
Field Name | type | required | length | Field Description |
---|---|---|---|---|
channelType | String | Y | 20 | 渠道type |
memberType | String | Y | 20 | 会员type |
couponCode | String | Y | 100 | 券码 |
params{} | Object(Map) | 扩展属性 |
parameter example
{
"channelType": "KYLIN_GUIDE",
"couponCode": "96800081",
"memberType": "shuyun",
"params": {
"shopCode": "123"
}
}
Response Body Description:
Field Name | type | Field Description |
---|---|---|
msg | String | 实例状态更新成功时为空,更新失败时为对应的失败原因 |
success | Boolean | 是否成功 |
Response body example
{
"msg": "xxx",
"success": true
}
Return status code:
200: 成功
401:api-gateway 鉴权失败
403: 禁止访问
404: 请求的 URL 不存在
error Example
{
"module": "Solution Package",
"service": "openapi",
"code": "010407",
"desc": "参数异常",
"uri": "http://..."
}
7.13. Voucher extension
Interface Request: /offer/coupon/{couponCode}/{memberType}/extension
Interface Description: Used for card extension
Request method: HTTP PUT
Request Body Description:
Field Name | type | required | length | Field Description |
---|---|---|---|---|
unit | String | Y | 20 | 相对时间单位:DAY(天)、WEEK(周)、MONTH(月)、YEAR(年) |
time | Date | Y | 具体日期:绝对时间必传,格式为yyyy-MM-dd HH:mm:ss | |
value | Integer | Y | 相对时间值:相对时间必传 | |
type | Integer | Y | 延期时间type:1-相对时间,2-绝对时间 |
parameter example
{
"unit": "DAY",
"time": "2022-05-17T07:59:11.135Z",
"value": 0,
"type": 0
}
Response Body Description:
Field Name | type | Field Description |
---|---|---|
msg | String | 实例状态更新成功时为空,更新失败时为对应的失败原因 |
success | Boolean | 是否成功 |
Response body example
{
"msg": "xxx",
"success": true
}
Return status code:
200: 成功
401:api-gateway 鉴权失败
403: 禁止访问
404: 请求的 URL 不存在
error Example
{
"module": "Solution Package",
"service": "openapi",
"code": "010407",
"desc": "参数异常",
"uri": "http://..."
}
8.Wechat member API
8.1. Registering wechat members
Interface Request: /wechat/member/register
Interface Description: For registering wechat members
Request method: HTTP POST
Request Body Description:
Field Name | type | required | length | Field Description |
---|---|---|---|---|
wechatMember | Object | 结构体如下 |
wechatMember:
Field Name | type | required | length | Field Description |
---|---|---|---|---|
address | String | Y | 255 | 联系地址(中文) |
appId | String | Y | 64 | 微信App ID |
appType | String | Y | 20 | 应用typecode:WECHAT_MINI_PROGRAM(微信小程序)、WECHAT_OFFICIAL_ACCOUNT(微信公众号) |
birthDay | String | 会员生日-月日 | ||
birthYear | String | Y | 20 | 会员生日-年 |
cardNo | String | Y | 64 | 会员卡号 |
channelType | String | Y | 20 | 渠道type |
city | String | Y | 100 | 用户所在城市名称 |
country | String | Y | 20 | 国籍 |
customerNo | String | Y | 64 | 各渠道的渠道ID,若为空,微信渠道默认为appId_openId |
district | String | Y | 100 | 用户所在区/县名称 |
String | Y | 255 | 邮箱 | |
gender | String | Y | 2 | 性别:F(女)、M(男)、O(未知) |
headImgUrl | String | 头像链接(微信专用) | ||
identityCard | String | Y | 20 | 身份证号 |
job | String | Y | 255 | 职业名称 |
memberName | String | Y | 255 | 会员名称 |
memberType | String | Y | 20 | 会员type |
mobile | String | Y | 20 | 手机号 |
nickname | String | Y | 255 | 微信昵称 |
openId | String | Y | 64 | 微信openId |
province | String | Y | 255 | 用户所在省名称 |
salesrepId | String | 64 | 导购编号 | |
shopName | String | Y | 255 | 会员注册门店名称 |
shopCode | String | Y | 32 | 会员注册门店编码 |
unionId | String | Y | 64 | 微信union_id(微信专用) |
age | Integer | 32 | 年龄 | |
registerTime | String | 注册时间,格式为yyyy-MM-dd HH:mm:ss | ||
customizedProperties | Object(Map) | 会员扩展属性 |
customizedProperties:
Field Name | type | required | length | Field Description |
---|---|---|---|---|
registerSource | String | Y | 100 | 注册来源 |
customizedTag | String | Y | 1000 | 个性标签,传入JSON字符串 |
checkPolicyStatus | String | Y | 10 | 会员是否同意隐私授权:1(同意)、0(不同意) |
referrerMobile | String | Y | 20 | 推荐人手机号 |
isGetInfoByEmail | String | Y | 10 | 是否同意接收邮件:1(同意)、0(不同意) |
isGetInfoBySMS | String | Y | 10 | 是否同意接收短信:1(同意)、0(不同意) |
isGetInfoByServiceSMS | String | Y | 10 | 是否同意接收服务类短信:1(同意)、0(不同意) |
memberSalutation | String | Y | 100 | 会员称谓(品牌需求新增) |
memberStatus | String | Y | 20 | 会员状态(品牌需求新增) |
sportsPreference | String | Y | 100 | 运动偏好 |
makeUpPreference | String | Y | 100 | 美妆偏好 |
parameter example
{
"memberId": "0040a85608844820900558fc2671cb7c",
"memberType": "shuyun",
"mobile": "15021425981",
"memberName": "会员 1",
"unionId": "unionId28154751841",
"nickname": "昵称",
"headImgUrl": "http://www.xx.com/url?id=13256",
"gender": "F",
"city": "shanghaishi",
"province": "shanghaishi",
"district": "xuhui",
"country": "china",
"address": "上海市徐汇区天钥桥路 1001 号",
"job": "teacher",
"cardNo": "1001",
"email": "10001@shuyun.com",
"birthYear": "1997",
"birthDay": "01-01",
"age": 25,
"identityCard": "235407195106112745",
"registerTime": "2019-11-12 10:10:10",
"openId": "openId28154751841",
"appId": "appId28154751841",
"appType": "WECHAT_MINI_PROGRAM",
"shopName": "tb001",
"shopCode": "tb001",
"customerNo": "appId_openId",
"customizedProperties": {
"registerSource": "线下活动",
"customizedTag": "{“爱好”:”篮球”}",
"checkPolicyStatus": "1",
"referrerMobile": "15021228866",
"isGetInfoByEmail": "1",
"isGetInfoBySMS": "1",
"isGetInfoByServiceSMS": "1",
"memberSalutation": "王女士",
"memberStatus": "FREEZE",
"sportsPreference": "篮球",
"makeUpPreference": "口红"
},
"bindingExtProperties": {
"string": "update"
},
"salesrepId": "TA1002",
"channelType": "WECHAT"
}
Response Body Description:
Field Name | type | Field Description |
---|---|---|
memberId | String | 会员 ID |
status | String | 注册状态 NEW: 新注册, BINDING: 添加绑定, REGISTERED: 已注册 |
Response body example
{
"memberId": "0040a85608844820900558fc2671cb7c",
"status": "NEW"
}
Return status code:
200: 成功
201: Created
401:api-gateway 鉴权失败
403: 禁止访问
404: 请求的 URL 不存在
error Example
{
"module": "Solution Package",
"service": "openapi",
"code": "010407",
"desc": "参数异常",
"uri": "http://..."
}
8.2. Query member information according to unionId
Interface Request: /wechat/member/queryByUnionId
Interface Description: According to unionId query member information and wechat channel information, failure to query will throw an exception
Request method: HTTP GET
Request Body Description:
Field Name | type | required | length | Field Description |
---|---|---|---|---|
memberType | String | Y | 20 | 会员type |
unionId | String | Y | 64 | 微信unionId |
Response Body Description:
Field Name | type | Field Description |
---|---|---|
memberId | String | 会员ID,全渠道唯一 |
memberType | String | 会员type |
mobile | String | 手机号码 |
memberName | String | 姓名 |
unionId | String | 微信unionId |
nickname | String | 微信昵称 |
headImgUrl | String | 用户头像 |
gender | String | 性别:F(女)、M(男)、O(未知) |
city | String | 用户所在城市名称 |
province | String | 用户所在省份名称 |
district | String | 用户所在区/县名称 |
country | String | 国籍 |
address | String | 会员联系地址 |
job | String | 会员职业 |
cardNo | String | 会员卡号 |
String | 邮箱地址 | |
birthYear | String | 会员生日-年,格式为yyyy |
birthDay | String | 会员生日-月日,格式为MM-dd |
age | Integer | 会员年龄 |
identityCard | String | 会员身份证 |
registerTime | String | 注册时间,格式为yyyy-MM-dd'T'HH:mm:ss.SSSXXX,时区为GMT+8 |
memberBindings | Array | 微信渠道关系数据 |
customizedProperties | Object(Map) | 会员扩展属性,数据结构详见下方 |
memberBindings:
Field Name | type | required | length | Field Description |
---|---|---|---|---|
appId | String | Y | 20 | 微信appId |
openId | String | Y | 64 | 微信openId |
unionId | String | Y | 64 | 公众平台唯一标识 |
customerNo | String | Y | 64 | 渠道ID,若为空,则注册时默认为appId_openId |
customizedProperties:
Field Name | type | required | length | Field Description |
---|---|---|---|---|
registerSource | String | Y | 100 | 注册来源 |
customizedTag | String | Y | 1000 | 个性标签,传入JSON字符串 |
belongBC | String | Y | 100 | 所属BC工号 |
belongShop | String | Y | 100 | 所属店铺ID |
checkPolicyStatus | String | Y | 10 | 会员是否同意隐私授权:1(同意)、0(不同意) |
referrerMobile | String | Y | 20 | 推荐人手机号 |
isGetInfoByEmail | String | Y | 10 | 是否同意接收邮件:1(同意)、0(不同意) |
isGetInfoBySMS | String | Y | 10 | 是否同意接收短信:1(同意)、0(不同意) |
isGetInfoByServiceSMS | String | Y | 10 | 是否同意接收服务类短信:1(同意)、0(不同意) |
wxOpenId | String | Y | 32 | 公众号openid |
isSubscribe | String | Y | 5 | 是否关注公众号:1(已关注)、2(已取关) |
memberSalutation | String | Y | 100 | 会员称谓(品牌需求新增) |
memberStatus | String | Y | 20 | 会员状态(品牌需求新增) |
Response body example
{
"memberId": "0040a85608844820900558fc2671cb7c",
"memberType": "shuyun",
"mobile": "15021425981",
"memberName": "会员 1",
"unionId": "unionId28154751841",
"nickname": "昵称",
"headImgUrl": "http://www.xx.com/url?id=13256",
"gender": "F",
"city": "shanghaishi",
"province": "shanghaishi",
"district": "xuhui",
"country": "china",
"address": "上海市徐汇区天钥桥路 1001 号",
"job": "teacher",
"cardNo": "1001",
"email": "10001@shuyun.com",
"birthYear": "1997",
"birthDay": "01-01",
"age": 25,
"identityCard": "235407195106112745",
"registerTime": "2021-10-13T12:26:58.386+08:00",
"memberBindings": [
{
"appId": "appId28154751841",
"openId": "openId28154751841",
"unionId": "unionId28154751841",
"customerNo": "appId_openId"
}
]
"customizedProperties": {
"registerSource": "线下活动",
"customizedTag": "{“爱好”:”篮球”}",
"checkPolicyStatus": "1",
"referrerMobile": "15021228866",
"isGetInfoByEmail": "1",
"isGetInfoBySMS": "1",
"isGetInfoByServiceSMS": "1",
"wxOpenId": "HBNUJIOBuihUIh",
"isSubscribe": "1",
"memberSalutation": "王女士",
"memberStatus": "FREEZE",
"sportsPreference": "篮球",
"makeUpPreference": "口红"
}
}
Return status code:
200: 请求成功
401:api-gateway 鉴权失败
403: 禁止访问
404: 请求的 URL 不存在
error Example
{
"module": "Solution Package",
"service": "openapi",
"code": "010407",
"desc": "参数异常",
"uri": "http://..."
}
8.3. Query basic member information based on appId and openId
Interface Request: /wechat/member/queryByOpenId
Interface Description: Query basic member information based on appId and openId
Request method: HTTP GET
Request Body Description:
Field Name | type | required | length | Field Description |
---|---|---|---|---|
memberType | String | Y | 20 | 会员type |
appId | String | Y | 32 | 微信appId |
openId | String | Y | 64 | 微信open_id |
Response Body Description:
Field Name | type | Field Description |
---|---|---|
memberId | String | 会员ID,全渠道唯一 |
memberType | String | 会员type |
mobile | String | 手机号码 |
memberName | String | 姓名 |
unionId | String | 微信unionId |
nickname | String | 微信昵称 |
headImgUrl | String | 用户头像 |
gender | String | 性别(F:女,M:男,O:未知) |
city | String | 用户所在城市名称 |
province | String | 用户所在省份名称 |
district | String | 用户所在区/县名称 |
country | String | 国籍 |
address | String | 会员联系地址 |
job | String | 会员职业 |
cardNo | String | 会员卡号 |
String | 邮箱地址 | |
birthYear | String | 会员生日-年(格式: yyyy) |
birthDay | String | 会员生日-月日(格式: MM-dd) |
age | Integer | 会员年龄 |
identityCard | String | 会员身份证 |
registerTime | String | 注册时间(格式: yyyy-MM-dd'T'HH:mm:ss.SSSXXX,时区:GMT+8) |
customizedProperties | Object(Map) | 会员扩展属性,数据结构见下方 |
customizedProperties:
Field Name | type | required | length | Field Description |
---|---|---|---|---|
registerSource | String | Y | 100 | 注册来源 |
customizedTag | String | Y | 1000 | 个性标签,传入JSON字符串 |
belongBC | String | Y | 100 | 所属BC工号 |
belongShop | String | Y | 100 | 所属店铺ID |
checkPolicyStatus | String | Y | 10 | 会员是否同意隐私授权:1(同意)、0(不同意) |
referrerMobile | String | Y | 20 | 推荐人手机号 |
isGetInfoByEmail | String | Y | 10 | 是否同意接收邮件:1(同意)、0(不同意) |
isGetInfoBySMS | String | Y | 10 | 是否同意接收短信:1(同意)、0(不同意) |
isGetInfoByServiceSMS | String | Y | 10 | 是否同意接收服务类短信:1(同意)、0(不同意) |
wxOpenId | String | Y | 32 | 公众号openid |
isSubscribe | String | Y | 5 | 是否关注公众号:1(已关注)、2(已取关) |
memberSalutation | String | Y | 100 | 会员称谓(品牌需求新增) |
memberStatus | String | Y | 20 | 会员状态(品牌需求新增) |
Response body example
{
"memberId": "0040a85608844820900558fc2671cb7c",
"memberType": "shuyun",
"mobile": "15021425981",
"memberName": "会员 1",
"unionId": "unionId28154751841",
"nickname": "昵称",
"headImgUrl": "http://www.xx.com/url?id=13256",
"gender": "F",
"city": "shanghaishi",
"province": "shanghaishi",
"district": "xuhui",
"country": "china",
"address": "上海市徐汇区天钥桥路 1001 号",
"job": "teacher",
"cardNo": "1001",
"email": "10001@shuyun.com",
"birthYear": "1997",
"birthDay": "01-01",
"age": 25,
"identityCard": "235407195106112745",
"registerTime": "2021-10-13T12:26:58.386+08:00",
"memberBindings": [
{
"appId": "appId28154751841",
"openId": "openId28154751841",
"unionId": "unionId28154751841",
"customerNo": "appId_openId"
}
]
"customizedProperties": {
"registerSource": "线下活动",
"customizedTag": "{“爱好”:”篮球”}",
"checkPolicyStatus": "1",
"referrerMobile": "15021228866",
"isGetInfoByEmail": "1",
"isGetInfoBySMS": "1",
"isGetInfoByServiceSMS": "1",
"wxOpenId": "HBNUJIOBuihUIh",
"isSubscribe": "1",
"memberSalutation": "王女士",
"memberStatus": "FREEZE",
"sportsPreference": "篮球",
"makeUpPreference": "口红"
}
}
Return status code:
200: 请求成功
401:api-gateway 鉴权失败
403: 禁止访问
404: 请求的 URL 不存在
error Example
{
"module": "Solution Package",
"service": "openapi",
"code": "010407",
"desc": "参数异常",
"uri": "http://..."
}