schm-shuyun-crm-papi

(0 reviews)

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 RequestDescription
/member/registerFor registered members
/member/queryQuery Member information
/member/loyalty/pointUsed to query member points
/member/loyalty/gradeUsed to query membership level
/member/point/recordsFor querying member points change records
/member/grade/recordUsed to query membership level change records
/member/pointUsed to change member points
/member/freezePointUsed to freeze member points
/member/unfreezePointUsed to unfreeze member points
/member/freezeDeductPointUsed to consume members' frozen points
/member/updateFor modifying membership
/member/modify/mobileused to change the mobile phone number of a member
/member/modify/policyUpdate member privacy policy loading and privacy policy time
/member/getAttributs/pageQuery member properties interface, you can query joint member information
/member/updateMemberStatusModify Member status
/member/purchase/channelQuery member consumption channel interface
/member/loyalty/grade/nextGradeAmountQuery Member Consumption channel interface Query member next level required amount
/customer/queryByChannelIdQuery basic member information according to channel Id
/member/invalid/pointUsed to query members' points that will expire in the current month
/member/loyalty/accountGradeUsed to query the membership level of a specified account
/member/accountGrade/recordUsed to query the membership level change record of the specified account
/member/past/pointUsed to query members' past points
/member/past/point/recordsIt is used to query the change records of members' past points
/member/past/pointchangeUsed to change members' past points
/order/{memberType}/pageUsed to query member order information
/order/{memberType}/{orderId}Used to query the details of the main order and suborder
/order/saveFor order saving or updating
/offer/project/listUsed to query card item list information
/offer/project/detailUsed to query the details of the card voucher project
/offer/instance/grantIdempotent for card issuance (Single member sheet)
/offer/coupon/writeoffFor cancellation of frozen cards (single card)
/offer/coupon/anticountingUsed for card cancellation
/offer/coupon/frozenFor card freezing (Single Card)
/offer/coupon/thawFor card unfreezing (Single Card)
/offer/coupon/useFor card cancellation (single card)
/offer/instance/listUsed to query the card instance list
/offer/coupon/detailUsed to query details about a voucher instance
/offer/coupon/invalidUsed for card invalidation
/offer/coupon/effectiveValid for card vouchers
/offer/coupon/{couponCode}/{memberType}/extensionUsed for card extension
/wechat/member/registerFor registering wechat members
/wechat/member/queryByUnionIdAccording to unionId query member information and wechat channel information, failure to query will throw an exception
/wechat/member/queryByOpenIdQuery 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 NameTyperequiredlengthField Description
RegisterMemberObject
–addressString255联系地址(中文)
-appTypeCodeString64应用类型 code:EBRAND: 会员通, WISDOM: 智慧门店, INTERACT: 互动赢家, WECHAT_OFFICIAL_ACCOUNT: 微信公众号, WECHAT_MINI_PROGRAM: 微信小程序
-appTypeNameString255应用类型名称
-birthDayString会员生日-月日:格式: MM-dd 例:07-05
-birthYearString会员生日-年:格式: yyyy 例:1988
-cardNoString64会员卡号
-channelTypeStringY20渠道类型
-cityCodeString32市 code
-cityNameString100城市名称
-countryString20国籍
-customerNoStringY64渠道 ID:渠道唯一标识,用于区分渠道会员。
-districtCodeString32区 code
-districtNameString100区名称
-emailString255邮箱地址
-genderString性别:F:女 M:男 O:其他
-identityCardString20身份证号码
-jobString100职业名称
-memberNameString255会员姓名
-memberTypeStringY20会员类型
-mobileString20手机号码
-provinceCodeString32省 code
-provinceNameString100省份名称
-registerTimeString注册时间,不传则默认为当前时间格式: yyyy-MM-dd HH:mm:ss
-shopCodeString32注册门店 code
-shopNameString255注册门店名称
-shopTypeCodeString32注册门店类型 code
-customizedProperties{}Object(Map)会员扩展字段:数据结构见下方
-bindingExtProperties{}Object(Map)会员拓展属性扩展字段:数据结构见下方

customizedProperties

Field NameTyperequiredlengthField Description
registerSourceString100注册来源
customizedTagString1000个性标签:传入 json 字符串
checkPolicyStatusString10会员是否同意隐私授权 1:同意;0:不同意
referrerMobileString20推荐人手机号
isGetInfoByEmailString10是否同意接收邮件 1:同意;0:不同意
isGetInfoBySMSString10是否同意接收短信 1:同意;0:不同意
isGetInfoByServiceSMSString10是否同意接收服务类短信 1:同意;0:不同意
unionIdString64微信 unionid,ECMP调用传入
memberSalutationString100会员称谓:bs 品牌需求新增
memberStatusString20会员状态:bs 品牌需求新增
sportsPreferenceString100运动偏好
makeUpPreferenceString100美妆偏好

bindingExtProperties

Field NameTyperequiredlengthField Description
unionIdString64微信 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 NameTypeField Description
memberIdString会员 ID
cardNoString会员卡号
statusString注册状态: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 NameTyperequiredlengthField Description
cardNoString64会员卡号, memberId,mobile,cardNo 三种参数至少输入一
channeString20渠道来源
memberIdString32会员 ID , memberId,mobile,cardNo 三种参数至少输入一
memberTypeString20会员类型
mobileString20手机号码 , memberId,mobile,cardNo 三种参数至少输入一

Response Body Description:

Field NameTypeField Description
addressstring联系地址(中文)
ageString年龄
birthDaystring会员生日-月日 如:07-05
birthYearstring会员生日-年 1988
cardNostring会员卡号
cityCodestring市 code
cityNamestring城市名称
countrystring国籍
districtCodestring区 code
districtNameboolean区名称
emailstring邮箱地址
firstRegisterChannelTypestring首次注册渠道
firstRegisterChannelTypeDescstring首次注册渠道描述
genderstring性别 F:女 M:男 O:其他
headImgUrlString头像 URL
identityCardString身份证号码
jobString职业名称
memberIdString会员 ID
memberNameString会员姓名
memberTypeString会员类型
mobileString手机号码
provinceCodeString省 code
provinceNameString省份名称
registerTimeString注册时间 格式: yyyy-MM-dd'T'HH:mm:ss.SSSXXX 时区:GMT+8
shopCodeString注册门店 code
shopNameString注册门店名称
shopTypeCodeString注册门店类型 code
unionIdStringunionId
wechatNickString微信昵称
memberBindingArray
customizedProperties{}Object(Map)会员扩展属性

MemberBinding:

Field NameTyperequiredlengthField Description
appIdString64公众号 appId
appTypeCodeString64应用类型 code EBRAND: 会员通, WISDOM: 智慧门店, INTERACT: 互动赢家,
appTypeNameString255应用类型名称
channelTypeString20渠道类型
customerNoString64客户编号 若创建时未传系统自动生成
memberTypeString20会员类型
mixMobileString64混淆手机号 格式: yyyy-MM-dd’T’HH:mm:ss.SSSXXX
openIdString64客户 openid
relTypeInteger关系类型 0: 注册, 1: 绑定,2: 解绑
shopCodeString32绑定/解绑门店 code
shopNameString255绑定/解绑门店名称
shopTypeCodeString32绑定/解绑门店类型code
unionIdString64微信 union_id(微信专用)

customizedProperties:

Field NameTypeField Description
registerSourceString注册来源
customizedTagString个性标签,传入 JSON 字符串
belongBCString所属 BC 工号
belongShopString所属店铺 ID
checkPolicyStatusString会员是否同意隐私授权,1:同意;0:不同意
referrerMobileString推荐人手机号
isGetInfoByEmailString是否同意接收邮件,1:同意;0:不同意
isGetInfoBySMSString是否同意接收短信,1:同意;0:不同意
isGetInfoByServiceSMSString是否同意接收服务类短信,1:同意;0:不同意
wxOpenIdString公众号 openid
isSubscribeString是否关注公众号,1:已关注;2:已取关
memberSalutationString会员称谓,bs 品牌需求新增
memberStatusString会员状态,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 NametyperequiredlengthField Description
channelTypeString20渠道来源
memberIdString32memberId, mobile 二者必须传入一个
memberTypeStringY20会员type
mobileString20memberId, mobile 二者必须传入一个

Response Body Description:

Field NametypeField Description
pointInteger积分

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 NametyperequiredlengthField Description
channelTypeString20渠道来源
memberIdString32memberId, mobile 二者必须传入一个
memberTypeStringY20会员type
mobileString20memberId, mobile 二者必须传入一个

Response Body Description:

Field NametypeField Description
effectiveTimeString等级生效时间格式: yyyy-MM-dd'T'HH:mm:ss.SSSXXX 时区:GMT+8 ,2021-10-13T12:26:58.386+08:00
expiredTimeString等级过期时间格式: yyyy-MM-dd'T'HH:mm:ss.SSSXXX 时区:GMT+8 ,2021-10-13T12:26:58.386+08:00
idString等级 ID
nameString等级名称

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 NametyperequiredlengthField Description
channelTypeString20变更渠道
endTimeString结束时间 格式:yyyy-MM-dd HH:mm:ss
memberIdString32会员ID,memberId,mobile两种参数至少输入一个
memberTypeStringY20会员type
mobileString20手机号码,memberId,mobile两种参数至少输入一个
pageInteger当前页码,默认:1
pageSizeInteger当页数量,默认:20,上限:100
recordTypeString20积分变更type,可选值:SEND(立即发放)、DELAY_SEND(延迟发放)、EXPIRE(过期)、FREEZE(冻结)、UNFREEZE(取消冻结)、DEDUCT(扣减)、LOCK(预扣)、UNLOCK(解锁)、ABOLISH(作废)、TIMER(定时)、RECALCULATE(废弃重算)、SPECIAL_DEDUCT(特殊扣除)、SPECIAL_FREEZE(特殊冻结)、SPECIAL_UNFREEZE(特殊解冻)、SPECIAL_ABOLISH(特殊废弃)、MANUAL_ABOLISH(手动废弃)
startTimeString起始时间 格式:yyyy-MM-dd HH:mm:ss

Response Body Description:

Field NametypeField Description
PointRecordArray结构体如下

PointRecord:

Field NametyperequiredlengthField Description
changeModeString50变更方式
changeTimeString积分变更时间 格式: yyyy-MM-dd'T'HH:mm:ss.SSSXXX 时区:GMT+8 2021-10-13T12:26:58.386+08:00
changeTypeString20积分变更type,可选值:END(立即发放)、DELAY_SEND(延迟发放)、EXPIRE(过期)、FREEZE(冻结)、UNFREEZE(取消冻结)、DEDUCT(扣减)、LOCK(预扣)、UNLOCK(解锁)、ABOLISH(作废)、TIMER(定时)、RECALCULATE(废弃重算)、SPECIAL_DEDUCT(特殊扣除)、SPECIAL_FREEZE(特殊冻结)、SPECIAL_UNFREEZE(特殊解冻)、SPECIAL_ABOLISH(特殊废弃)、MANUAL_ABOLISH(手动废弃)
channelString20渠道type
descriptionString255备注
effectiveTimeString积分生效时间 格式: yyyy-MM-dd'T'HH:mm:ss.SSSXXX 时区:GMT+8 2021-10-13T12:26:58.386+08:00
expiredTimeString积分过期时间 格式: yyyy-MM-dd'T'HH:mm:ss.SSSXXX 时区:GMT+8 2021-10-13T12:26:58.386+08:00
memberIdstring32会员ID
pointInteger变更积分
totalPointString历史总积分
traceIdString255追溯id
KZZD1String255积分type
KZZD2String255积分来源
KZZD3String255变更事件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 NametyperequiredlengthField Description
channelTypeString20变更渠道
endTimeString结束时间 格式:yyyy-MM-dd HH:mm:ss
memberIdString32会员ID,memberId,mobile两种参数至少输入一个
memberTypeStringY20会员type
mobileString20手机号码,memberId,mobile两种参数至少输入一个
pageInteger当前页码,默认:1
pageSizeInteger当页数量,默认:20,上限:100
startTimeString起始时间 格式:yyyy-MM-dd HH:mm:ss

Response Body Description:

Field NametypeField Description
GradeRecordArray结构体如下

GradeRecord:

Field NametyperequiredlengthField Description
changeTimeString等级变更时间
changeTypeString20等级变更type,可选值:UPGRADE(升级)、DEGRADE(降级)、HOLD_BACK_GRADE(保级)
effectiveTimeString变更后等级生效时间 格式: yyyy-MM-dd'T'HH:mm:ss.SSSXXX 时区:GMT+8 2021-10-13T12:26:58.386+08:00
expiredTimeString变更后等级过期时间 格式: yyyy-MM-dd'T'HH:mm:ss.SSSXXX 时区:GMT+8 2021-10-13T12:26:58.386+08:00
gradeIdString64变更后等级ID
gradeNameString255变更后等级名称
memberIdString32会员ID
originEffectiveTimeString变更前等级生效时间 格式: yyyy-MM-dd'T'HH:mm:ss.SSSXXX 时区:GMT+8 2021-10-13T12:26:58.386+08:00
originExpiredTimestring变更前等级过期时间 格式: yyyy-MM-dd'T'HH:mm:ss.SSSXXX 时区:GMT+8 2021-10-13T12:26:58.386+08:00
originalGradeIdInteger64变更前等级ID
originalGradeNameString255变更前等级名称

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:

Field NametyperequiredlengthField Description
X-Business-TokenString请求头(request header)里需要传:X-Business-Token, 不同请求对应 X-Business-Token 值确保唯一;若同一请求,请求多次,确保 X-Business-Token 值是一样,如兑礼订单,需要在此字段传入兑礼订单号。
Body:
Field NametyperequiredlengthField Description
changeTypeStringY积分变更type,可选值:SEND(立即发放)、DEDUCT(扣减)
channelTypeStringY20渠道type
descriptionStringY255备注,包括事件type、事件等信息,JSON字符串
effectTimeString积分生效时间,为空时立即生效,格式: yyyy-MM-dd HH:mm:ss
expiredTimeString积分过期时间,格式: yyyy-MM-dd HH:mm:ss
memberIdStringY32会员ID
memberTypeStringY20会员type
pointNumberY积分
shopCodeString32店铺code
KZZD1String255积分type
KZZD2String255积分来源
KZZD3StringY255变更事件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:

Field NametyperequiredlengthField Description
X-Business-TokenString请求头(request header)里需要传:X-Business-Token, 不同请求对应 X-Business-Token 值确保唯一;若同一请求,请求多次,确保 X-Business-Token 值是一样。
Body:
Field NametyperequiredlengthField Description
channelTypeString20渠道type
descriptionString255备注,包括事件type、事件等信息,JSON字符串
memberIdString32会员ID
memberTypeString20会员type
pointNumber积分
shopCodeString32店铺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:

Field NametyperequiredlengthField Description
X-Business-TokenString请求头(request header)里需要传:X-Business-Token, 不同请求对应 X-Business-Token 值确保唯一;若同一请求,请求多次,确保 X-Business-Token 值是一样(解冻时需要与对应冻结积分的 token 一致)。
Body:
Field NametyperequiredlengthField Description
channelTypeStringY20渠道type
descriptionStringY255备注,包括事件type、事件等信息,JSON字符串
memberIdStringY32会员ID
memberTypeStringY20会员type
shopCodeString32店铺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:

Field NametyperequiredlengthField Description
X-Business-TokenStringY请求头(request header)里需要传:X-Business-Token, 不同请求对应 X-Business-Token 值确保唯一;若同一请求,请求多次,确保 X-Business-Token 值是一样(消耗冻结积分时需要与冻结积分时的 token一致)
Body:
Field NametyperequiredlengthField Description
channelTypeStringY20渠道type
descriptionStringY255备注,包括事件type、事件等信息,JSON字符串
memberIdStringY32会员ID
memberTypeStringY20会员type
shopCodeString32店铺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 NametyperequiredlengthField Description
updateMemberObject结构体如下

updateMember:

Field NametyperequiredlengthField Description
addressString255联系地址(中文)
birthDayString会员生日-月日,格式: MM-dd,例:07-05
birthYearString会员生日-年,格式: yyyy,例:1988
channelTypeStringY20渠道type
cityCodeString32市code
cityNameString100城市名称
contactTelString20联系电话
countryString20国籍,例:china
districtCodeString32区code
districtNameString100区名称
emailString255邮箱地址
genderString性别,可选值:F(女)、M(男)、O(其他)
headImgUrlString头像链接
identityCardString20身份证号码
jobString100职业名称
memberIdStringY32会员ID
memberNameString255会员姓名
memberTypeStringY20会员type
provinceCodeString32省code
provinceNameString100省份名称
customizedProperties{}Object会员扩展属性

customizedProperties:

Field NametyperequiredlengthField Description
registerSourceString100注册来源
customizedTagString1000个性标签,传入JSON字符串
belongBCString100所属BC工号
belongShopString100所属店铺id
checkPolicyStatusString10会员是否同意隐私授权,可选值:1(同意)、2(不同意)
referrerMobileString20推荐人手机号
isGetInfoByEmailString10是否同意接收邮件,可选值:1(同意)、0(不同意)
isGetInfoBySMSString10是否同意接收短信,可选值:1(同意)、0(不同意)
isGetInfoByServiceSMSString10是否同意接收服务类短信,可选值:1(同意)、0(不同意)
memberSalutationString100会员称谓,品牌需求新增
sportsPreferenceString100运动偏好
makeUpPreferenceString100美妆偏好

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 NametyperequiredlengthField Description
memberTypeStringY20会员type
newMobileStringY20新手机号码
memberIdStringY32会员 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 NametyperequiredlengthField Description
memberTypeStringY20会员type
memberIdStringY32会员ID
checkPolicyStatusStringY20会员是否同意隐私政策,可选值:1(同意)、0(不同意)
policyStatusUpdateTimedataTime隐私协议修改时间(不填默认为当前时间)

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 NametyperequiredlengthField Description
memberTypeStringY20会员type
memberIdStringY32会员ID
currentPageinteger当前页数,默认为1
pageSizeinteger分页容量,默认为20

Response Body Description:

Field NametypeField Description
memberAttributsArray会员属性集合

memberAttributs:

Field NametyperequiredlengthField Description
memberIdString32会员ID
memberTypeString20会员type
attributeCodeString64属性编码
attributeNameString200属性名称
createTimedateTime创建时间
updateTimedateTime更新时间

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 NametyperequiredlengthField Description
memberTypeStringY20会员type
memberIdStringY32会员ID
memberStatusString20会员状态

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 NametyperequiredlengthField Description
memberTypeStringY20会员type
memberIdStringY32会员ID

Response Body Description:

Field NametypeField Description
memberIdString会员 ID
purchaseChannelArray会员消费渠道列表

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 NametyperequiredlengthField Description
memberTypeStringY20会员type
memberIdStringY32会员ID

Response Body Description:

Field NametypeField Description
currentGradeIdInteger当前等级 id
currentGradeNameString当前等级名称
memberIdString会员 ID
consumeAmountNumber当前累计消费金额
needAmountNumber升级所需金额
nextGradeIdInteger下一等级 id
nextGradeNameString下一等级名称
nextGradeNeedAmountNumber下一等级所需消费金额
updatedTimeDateTime更新时间

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 NametyperequiredlengthField Description
memberTypeStringY会员type
channelTypeStringY渠道type
customerNoStringY渠道ID,例如:淘宝渠道-麒麟ID;京东-OpenID;微信-AppID_OpenID;其他渠道唯一ID等

Response Body Description:

Field NametypeField Description
SimpleMemberDtoObject结构体如下

SimpleMemberDto:

Field NametyperequiredlengthField Description
cardNoString64会员卡号
emailString255邮箱
memberIdString64会员ID
memberNameString255会员名称
memberTypeString20会员type
mobileString20手机号
registerTimeString注册时间
shopCodeString64店铺code
shopNameString255店铺名称
dateOfBirthString出生年月日

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 NametyperequiredlengthField Description
accountTypeStringY20积分账户type
memberIdStringY32会员ID
memberTypeStringY20会员type

Response Body Description:

Field NametypeField Description
pointInteger积分值

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 NametyperequiredlengthField Description
channelTypeString20渠道来源
memberIdString32会员ID,memberId和mobile二者必须传入一个
memberTypeStringY20会员type
mobileString20手机号,memberId和mobile二者必须传入一个
accountTypeStringY20账户type,例如集雅荟账户type为JYHGRADE

Response Body Description:

Field NametypeField Description
effectiveTimeString等级生效时间 格式: yyyy-MM-dd'T'HH:mm:ss.SSSXXX 时区:GMT+8 2021-10-13T12:26:58.386+08:00
expiredTimeString等级过期时间 格式: yyyy-MM-dd'T'HH:mm:ss.SSSXXX 时区:GMT+8 2021-10-13T12:26:58.386+08:00
idInteger等级 ID
nameString等级名称

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 NametyperequiredlengthField Description
channelTypeString20变更渠道
endTimeString结束时间,格式为yyyy-MM-dd HH:mm:ss
memberIdString32会员ID,memberId和mobile两种参数至少输入一个
memberTypeStringrequired20会员type
mobileString20手机号码,memberId和mobile两种参数至少输入一个
pageInteger当前页码,默认为1
pageSizeInteger当页数量,默认为20,上限为100
startTimeString起始时间,格式为yyyy-MM-dd HH:mm:ss
accountTypeStringrequired20账户type,例如集雅荟账户type为JYHGRADE

Response Body Description:

Field NametypeField Description
GradeRecordArray结构体如下

GradeRecord:

Field NametyperequiredlengthField Description
changeTimeString等级变更时间
changeTypeString20等级变更type,可选值为UPGRADE(升级),DEGRADE(降级),HOLD_BACK_GRADE(保级)
effectiveTimeString变更后等级生效时间,格式为yyyy-MM-dd'T'HH:mm:ss.SSSXXX,时区为GMT+8
expiredTimeString变更后等级过期时间,格式为yyyy-MM-dd'T'HH:mm:ss.SSSXXX,时区为GMT+8
gradeIdString64变更后等级ID
gradeNameString255变更后等级名称
memberIdString32会员ID
originEffectiveTimeString变更前等级生效时间,格式为yyyy-MM-dd'T'HH:mm:ss.SSSXXX,时区为GMT+8
originExpiredTimeString变更前等级过期时间,格式为yyyy-MM-dd'T'HH:mm:ss.SSSXXX,时区为GMT+8
originalGradeIdInteger64变更前等级ID
originalGradeNameString255变更前等级名称

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 NametyperequiredlengthField Description
accountTypeStringY20积分账户type,例如往期积分为CPBPAST
memberIdStringY32会员ID
memberTypeStringY20会员type

Response Body Description:

Field NametypeField Description
pointInteger积分值

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 NametyperequiredlengthField Description
accountTypeStringY20积分账户type,例如往期积分为CPBPAST
channelTypeString20变更渠道
endTimeString结束时间,格式为yyyy-MM-dd HH:mm:ss
memberIdStringY32会员ID
memberTypeStringY20会员type
pageInteger当前页码,默认为1
pageSizeInteger当页数量,默认为20,上限为100
recordTypeString20积分变更type,可选值为SEND(立即发放),DELAY_SEND(延迟发放),EXPIRE(过期),FREEZE(冻结),UNFREEZE(取消冻结),DEDUCT(扣减),LOCK(预扣),UNLOCK(解锁),ABOLISH(作废),TIMER(定时),RECALCULATE(废弃重算),SPECIAL_DEDUCT(特殊扣除),SPECIAL_FREEZE(特殊冻结),SPECIAL_UNFREEZE(特殊解冻),SPECIAL_ABOLISH(特殊废弃),MANUAL_ABOLISH(手动废弃)
startTimeString起始时间,格式为yyyy-MM-dd HH:mm:ss

Response Body Description:

Field NametypeField Description
PointRecordArray结构体如下

PointRecord:

Field NametyperequiredlengthField Description
changeModeString50变更方式
changeTimeString积分变更时间,格式为yyyy-MM-dd'T'HH:mm:ss.SSSXXX,时区为GMT+8
changeTypeString20积分变更type,可选值为END(立即发放),DELAY_SEND(延迟发放),EXPIRE(过期),FREEZE(冻结),UNFREEZE(取消冻结),DEDUCT(扣减),LOCK(预扣),UNLOCK(解锁),ABOLISH(作废),TIMER(定时),RECALCULATE(废弃重算),SPECIAL_DEDUCT(特殊扣除),SPECIAL_FREEZE(特殊冻结),SPECIAL_UNFREEZE(特殊解冻),SPECIAL_ABOLISH(特殊废弃),MANUAL_ABOLISH(手动废弃)
channelString20渠道type
descriptionString255备注
effectiveTimeString积分生效时间,格式为yyyy-MM-dd'T'HH:mm:ss.SSSXXX,时区为GMT+8
expiredTimeString积分过期时间,格式为yyyy-MM-dd'T'HH:mm:ss.SSSXXX,时区为GMT+8
memberIdstring32会员ID
pointInteger变更积分
totalPointString历史总积分
traceIdString255追溯ID
KZZD1String255积分type
KZZD2String255积分来源
KZZD3String255变更事件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:

Field NametyperequiredlengthField Description
X-Business-TokenStringY请求头(request header)里需要传:X-Business-Token, 不同请求对应 X-Business-Token 值确保唯一;若同一请求,请求多次,确保 X-Business-Token 值是一样如兑礼订单,需要在此字段传入兑礼订单号。
Body:
Field NametyperequiredlengthField Description
accountTypeStringrequired20积分账户type,例如往期积分为CPBPAST
changeTypeStringrequired积分变更type,可选值为SEND(立即发放),DEDUCT(扣减)
channelTypeStringrequired20渠道type
descriptionStringrequired255备注,包括事件type、事件等信息,使用JSON字符串格式
effectTimeString积分生效时间,格式为yyyy-MM-dd HH:mm:ss,为空时表示立即生效
expiredTimeString积分过期时间,格式为yyyy-MM-dd HH:mm:ss
memberIdStringrequired32会员ID
memberTypeStringrequired20会员type
pointNumberrequired积分
shopCodeString32店铺code
KZZD1String255积分type
KZZD2String255积分来源
KZZD3Stringrequired255变更事件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 NametyperequiredlengthField Description
channelTypeString20渠道type
currentPageinteger当前页数,默认为1
keyTypeString搜索type
keyWordString搜索关键字
memberIdString32会员ID,与mobile二选一,如果两个都有,则以memberId为主
memberTypeStringY20会员type
mobileString20手机号,与memberId二选一
orderBeginTimeString搜索此时间之后的订单,格式为yyyy-MM-dd HH:mm:ss
orderEndTimeString搜索此时间之前的订单,格式为yyyy-MM-dd HH:mm:ss
pageSizeInteger分页容量,默认为20
statusString20订单状态

Response Body Description:

Field NametypeField Description
currentPageInteger当前页
dataArray分页数据
pageSizeInteger分页容量
totalCountInteger总记录数
totalPageInteger总页数

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 NametyperequiredlengthField Description
channelTypeString20渠道type
memberTypeStringY20会员type
orderIdStringY32订单ID
orderTypeStringY20订单type,可选值为NORMAL(正常单),REFUND(退单)

Response Body Description:

Field NametypeField Description
orderInfoObject结构体如下

orderInfo:

Field NametyperequiredlengthField Description
channelTypeString20渠道
couponFeeNumber优惠劵金额
couponNoString64优惠劵码
customerNoString64渠道ID,渠道唯一标识,用于区分渠道会员
descriptionString255订单备注
discountFeeNumber折扣金额
discountRateNumber折扣率(小于等于1)
exchangeTimeString订单换货时间,格式为yyyy-MM-dd'T'HH:mm:ss.SSSXXX,时区为GMT+8
freightNumber运费
guideCodeString32订单对应导购
lastSyncString数据同步时间
memberIdString32会员ID
memberTypeString20会员type
orderIdString32订单ID
orderItemsArray正常订单子订单
orderStatusString20订单状态
orderTimeString下单时间,格式为yyyy-MM-dd'T'HH:mm:ss.SSSXXX,时区为GMT+8
orderTypeString20订单type,可选值为NORMAL(正常单)、REFUND(退单)
originOrderIdString32原始订单ID,退单时传
payTimeString订单付款时间,格式为yyyy-MM-dd'T'HH:mm:ss.SSSXXX,时区为GMT+8
paymentNumber实付金额
pointFlaginteger是否计算积分,0-不计算积分,1-计算积分
receiveTimeString订单收货时间,格式为yyyy-MM-dd'T'HH:mm:ss.SSSXXX,时区为GMT+8
finishTimeString订单完成时间,格式为yyyy-MM-dd HH:mm:ss
receiverAddressString255收货人地址
receiverCityString100
receiverDistrictString100区/县
receiverMobileString20收货人手机号
receiverNameString100收货人姓名
receiverProvinceString100
receiverTelephoneString20收货人固定电话
receiverZipCodeString20邮编
refundTimeString订单退货时间,格式为yyyy-MM-dd'T'HH:mm:ss.SSSXXX,时区为GMT+8
shippingTimeString订单发货时间,格式为yyyy-MM-dd'T'HH:mm:ss.SSSXXX,时区为GMT+8
shopCodeString32注册门店code
shopNameString255注册门店名称
shopTypeCodeString32注册门店typecode
totalFeeNumber应付金额
totalQuantityinteger商品总数
updateTimeString更新时间
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 NametyperequiredlengthField Description
OrderObjectrequired结构体如下

Order:

Field NametyperequiredlengthField Description
channelTypeStringY20渠道
couponFeeNumber优惠劵金额
couponNoString32优惠劵码
customerNoString64客户编号
descriptionString255订单备注
discountFeeNumber折扣金额
discountRateNumber折扣率(小于等于1)
exchangeTimeString订单换货时间,格式为yyyy-MM-dd HH:mm:ss
freightNumber运费
guideCodeString32订单对应导购
memberIdString32会员ID
memberTypeStringY20会员type
orderIdStringY32订单ID
orderItemsArray正常订单子订单
orderStatusStringY20订单状态
orderTimeString下单时间,格式为yyyy-MM-dd HH:mm:ss
orderTypeStringY20订单type,可选值为NORMAL(正常单)、REFUND(退单)
originOrderIdString32原始订单ID,退单时传
payTimeString订单付款时间,格式为yyyy-MM-dd HH:mm:ss
paymentNumberY实付金额
pointFlagInteger是否计算积分,0-不计算积分,1-计算积分
receiveTimeString订单收货时间,格式为yyyy-MM-dd HH:mm:ss
receiverAddressString255收货人地址
receiverCityString100
receiverDistrictString100区/县
receiverMobileString20收货人手机号
receiverNameString100收货人姓名
receiverProvinceString100
receiverTelephoneString20收货人固定电话
receiverZipCodeString20邮编
refundTimeString订单退货时间,格式为yyyy-MM-dd HH:mm:ss
shippingTimeString订单发货时间,格式为yyyy-MM-dd HH:mm:ss
finishTimeString订单完成时间,格式为yyyy-MM-dd HH:mm:ss
shopCodeStringY32下单门店code
shopNameStringY255下单门店名称
shopTypeCodeString32下单门店typecode
totalFeeNumberY应付金额
totalQuantityIntegerY商品总数
customizedProperties{}Object(Map)扩展字段,数据结构见下方

customizedProperties:

Field NametyperequiredlengthField Description
ticketNumString100小票号
salesModeString10销售type,可选值为0(常规销售)、1(团购)
presaleFlagString10预售区分,可选值为0(普通)、1(预售)、2(提货)
presaleStoreIdString32预售店铺编号
presalePosIdString32预售POS机号
presaleBillNoString32预售小票号
presaleReturnStoreIdString32预售退货店铺编号
presaleReturnPosIdString32预售退货POS机号
presaleReturnBillNoString32预售退货小票号
orderSourceString64订单来源,枚举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 NametyperequiredlengthField Description
channelTypeStringY20渠道type
currentPageIntegerY当前页,默认为1
memberTypeStringY20会员type
nameString卡券项目名称
pageSizeIntegerY每页显示数量,默认为10,上限为100
projectIdsArray卡券项目id集合
statusString项目状态,可选值为VALID(已生效)、HAS_FINISHED(已结束)
updateTimeDate修改时间,查询此时间之后的项目,格式为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 NametypeField Description
currentPageInteger当前页
dataArray分页数据
pageSizeInteger分页容量

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 NametyperequiredlengthField Description
channelTypeStringY20渠道type
memberTypeStringY20会员type
projectIdStringY32卡券项目id

Response Body Description:

Field NametypeField Description
projectObject结构体如下

project:

Field NametyperequiredlengthField Description
effectTextString20效果描述,对于代金券为具体的代金金额,对于折扣券为具体的折扣
expireTimeString实例过期时间,格式为yyyy-MM-dd'T'HH:mm:ss.SSSXXX,时区为GMT+8
nameString255卡券项目名称
projectIdString32卡券项目ID
typeString20卡券项目type,可选值为DISCOUNT(折扣)、CASH(现金)、EXCHANGE(兑礼)
ruleTextString255使用规则/使用说明
statusString20卡券项目状态
updateTimeString变更时间,格式为yyyy-MM-dd'T'HH:mm:ss.SSSXXX
validTimeString实例生效时间,格式为yyyy-MM-dd'T'HH:mm:ss.SSSXXX,时区为GMT+8
totalCountString可发放总数
selectorRuleObject(Map)选择器规则,会展示在系统前端配置的详细规则字段
customizedPropertiesObject(Map)扩展字段

selectorRule:

Field NametyperequiredlengthField Description
productScope[]Array订单中包含指定商品的商品范围
excludeProduct[]Array订单中不包含指定商品的商品范围
receiveProductScope[]Array券可领取的商品范围
applicationShop[]Array券适用门店范围

customizedProperties:

Field NametyperequiredField Description
couponTypeString卡券type
multiLayerString是否可叠加使用,可选值为是(1)或否(0)
applicableGrade1String券适用会员等级 1,可选值为是(1)或否(0)
applicableGrade2String券适用会员等级 2,可选值为是(1)或否(0)
applicableGrade3String券适用会员等级 3,可选值为是(1)或否(0)
applicableGrade4String券适用会员等级 4,可选值为是(1)或否(0)
applicableGrade5String券适用会员等级 5,可选值为是(1)或否(0)
ownerShopString商品是否仅会员所属门店可领取,可选值为是(1)或否(0)
limitOwnerShopString商品是否限制会员选择的所属门店领取,可选值为是(1)或否(0)
orderAmountInt订单满足指定金额及以上
orderNumberInt订单满足商品指定件数及以上
pointsInt券可赠送积分
isMobileCheckString券核销是否需要手机验证码验证
giftNameString礼品名称
giftContentString礼品内容
giftValueString礼品价值
activityCounterString活动专柜
useRuleString使用规则
reminderString温馨提示
validyTypeString有效期type,可选值为absolutely(绝对时间)或relative(相对时间)
configuredUsableDaysString相对失效时间
isChangeCouponString是否可转赠

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:

Field NametyperequiredlengthField Description
X-Request-SequenceStringY请求头(request header)里需要传:X-Request-Sequence, 不同请求对应 X-Request-Sequence值确保唯一;若同一请求,请求多次,确保X-Request-Sequence 值是一样。
Body:
Field NametyperequiredlengthField Description
channelTypeStringY20渠道type
memberTypeStringY20会员type
memberIdStringY32会员ID
projectIdStringY32卡券项目ID
params{}Object(Map)发放扩展属性,数据结构见下方
params:
Field NametyperequiredlengthField Description
campaignIdStringY100活动ID
selectShopCodeStringY32选择门店编码
orderIdStringY32订单ID
sharedByStringY32分享人ID
sharedCouponCodeStringY32分享券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 NametypeField Description
msgString实例状态更新成功时为空,更新失败时为对应的失败原因
successBoolean是否成功
instanceInfosArray批量请求失败详情

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 NametyperequiredlengthField Description
channelTypeStringY20渠道type
memberTypeStringY20会员type
couponCodeStringY100券码
params{}Object(Map)扩展属性

params:

Field NametyperequiredlengthField Description
employeeIdStringY64核销员工号
counterIdStringY64核销POS机号
ticketNumStringY64核销小票号
recordIdStringY32兑换记录ID
shopCodeStringY32核销门店编码
productCodeStringY32核销商品编码

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 NametypeField Description
msgString实例状态更新成功时为空,更新失败时为对应的失败原因
successBoolean是否成功

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 NametyperequiredlengthField Description
channelTypeStringY20渠道type
memberTypeStringY20会员type
couponCodeStringY100券码
params{}Object(Map)扩展属性

parameter example

{
 "channelType": "KYLIN_GUIDE",
"couponCode": "96800081",
 "memberType": "shuyun",
 "params": {
 "shopCode": "123"
 }
}

Response Body Description:

Field NametypeField Description
msgString实例状态更新成功时为空,更新失败时为对应的失败原因
successBoolean是否成功

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 NametyperequiredlengthField Description
channelTypeStringY20渠道type
memberTypeStringY20会员type
couponCodeStringY100券码
params{}Object(Map)扩展属性

parameter example

{
 "channelType": "KYLIN_GUIDE",
"couponCode": "96800081",
 "memberType": "shuyun",
 "params": {
 "shopCode": "123"
 }
}

Response Body Description:

Field NametypeField Description
msgString实例状态更新成功时为空,更新失败时为对应的失败原因
successBoolean是否成功

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 NametyperequiredlengthField Description
channelTypeStringY20渠道type
memberTypeStringY20会员type
couponCodeStringY100券码
params{}Object(Map)扩展属性

parameter example

{
 "channelType": "KYLIN_GUIDE",
"couponCode": "96800081",
 "memberType": "shuyun",
 "params": {
 "shopCode": "123"
 }
}

Response Body Description:

Field NametypeField Description
msgString实例状态更新成功时为空,更新失败时为对应的失败原因
successBoolean是否成功

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 NametyperequiredlengthField Description
channelTypeStringY20渠道type
memberTypeStringY20会员type
couponCodeStringY100券码
params{}Object(Map)扩展属性

parameter example

{
 "channelType": "KYLIN_GUIDE",
"couponCode": "96800081",
 "memberType": "shuyun",
 "params": {
 "shopCode": "123"
 }
}

Response Body Description:

Field NametypeField Description
msgString实例状态更新成功时为空,更新失败时为对应的失败原因
successBoolean是否成功

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 NametyperequiredlengthField Description
channelTypeStringY20渠道type
currentPageStringY当前页,默认为1
memberIdStringY32会员ID
memberTypeStringY20会员type
pageSizeStringY每页显示数量,默认为10,上限为100
statusString券实例状态:VALID(已生效)、USED(已使用)、EXPIRED(已失效)、GRANTED(已发放)、FROZEN(冻结中)

parameter example

{
"memberType": "shuyun",
"channelType": "KYLIN_GUIDE",
"memberId": "001",
"status": "VALID",
"currentPage": 1,
"pageSize": 10
}

Response Body Description:

Field NametypeField Description
currentPageInteger当前页
dataArray分页数据
pageSizeInteger分页容量

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 NametyperequiredlengthField Description
channelTypeStringY20渠道type
memberTypeStringY20会员type
couponCodeStringY100卡券实例id

Response Body Description:

Field NametypeField Description
instanceInfoDataObject结构体如下

instanceInfoData:

Field NametyperequiredlengthField Description
expireTimeString实例过期时间,格式:yyyy-MM-dd'T'HH:mm:ss.SSSXXX,时区:GMT+8
grantTimeString发放时间,格式:yyyy-MM-dd'T'HH:mm:ss.SSSXXX,时区:GMT+8
couponCodeStringY150优惠券码
memberIdStringY32会员ID
projectIdStringY32卡券项目ID
projectNameString255卡券项目名称
projectTypeString20卡券项目type-使用效果type
ruleTextString255使用规则/使用说明
statusString20卡券实例状态:GRANTED(已发放)、VALID(已生效)、EXPIRED(已失效)、USED(已使用)、FROZEN(冻结中)
useTimeString核销时间,格式:yyyy-MM-dd'T'HH:mm:ss.SSSXXX,时区:GMT+8
validTimeString实例生效时间,格式:yyyy-MM-dd'T'HH:mm:ss.SSSXXX,时区:GMT+8
presetOrCustomFieldObject(Map)扩展属性
instanceIdString32卡券实例ID
effectTextString255效果描述
selectorRuleObject(Map)选择器规则
customizedPropertiesObject(Map)其他规则属性

presetOrCustomField:

Field NametyperequiredlengthField Description
campaignIdStringY100活动ID
employeeIdStringY32核销员工号
counterIdStringY64核销POS机号
ticketNumStringY64核销小票号
recordIdStringY32兑换记录ID
shopCodeStringY32核销门店编码
productCodeStringY32核销商品编码
selectShopCodeStringY32选择门店编码
orderIdStringY32发放订单ID
sharedByStringY32分享人
sharedCouponCodeStringY32分享券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 NametyperequiredlengthField Description
channelTypeStringY20渠道type
memberTypeStringY20会员type
couponCodeStringY100券码
params{}Object(Map)扩展属性

parameter example

{
 "channelType": "KYLIN_GUIDE",
"couponCode": "96800081",
 "memberType": "shuyun",
 "params": {
 "shopCode": "123"
 }
}

Response Body Description:

Field NametypeField Description
msgString实例状态更新成功时为空,更新失败时为对应的失败原因
successBoolean是否成功

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 NametyperequiredlengthField Description
channelTypeStringY20渠道type
memberTypeStringY20会员type
couponCodeStringY100券码
params{}Object(Map)扩展属性

parameter example

{
 "channelType": "KYLIN_GUIDE",
"couponCode": "96800081",
 "memberType": "shuyun",
 "params": {
 "shopCode": "123"
 }
}

Response Body Description:

Field NametypeField Description
msgString实例状态更新成功时为空,更新失败时为对应的失败原因
successBoolean是否成功

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 NametyperequiredlengthField Description
unitStringY20相对时间单位:DAY(天)、WEEK(周)、MONTH(月)、YEAR(年)
timeDateY具体日期:绝对时间必传,格式为yyyy-MM-dd HH:mm:ss
valueIntegerY相对时间值:相对时间必传
typeIntegerY延期时间type:1-相对时间,2-绝对时间

parameter example

{
 "unit": "DAY",
 "time": "2022-05-17T07:59:11.135Z",
 "value": 0,
 "type": 0
}

Response Body Description:

Field NametypeField Description
msgString实例状态更新成功时为空,更新失败时为对应的失败原因
successBoolean是否成功

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 NametyperequiredlengthField Description
wechatMemberObject结构体如下

wechatMember:

Field NametyperequiredlengthField Description
addressStringY255联系地址(中文)
appIdStringY64微信App ID
appTypeStringY20应用typecode:WECHAT_MINI_PROGRAM(微信小程序)、WECHAT_OFFICIAL_ACCOUNT(微信公众号)
birthDayString会员生日-月日
birthYearStringY20会员生日-年
cardNoStringY64会员卡号
channelTypeStringY20渠道type
cityStringY100用户所在城市名称
countryStringY20国籍
customerNoStringY64各渠道的渠道ID,若为空,微信渠道默认为appId_openId
districtStringY100用户所在区/县名称
emailStringY255邮箱
genderStringY2性别:F(女)、M(男)、O(未知)
headImgUrlString头像链接(微信专用)
identityCardStringY20身份证号
jobStringY255职业名称
memberNameStringY255会员名称
memberTypeStringY20会员type
mobileStringY20手机号
nicknameStringY255微信昵称
openIdStringY64微信openId
provinceStringY255用户所在省名称
salesrepIdString64导购编号
shopNameStringY255会员注册门店名称
shopCodeStringY32会员注册门店编码
unionIdStringY64微信union_id(微信专用)
ageInteger32年龄
registerTimeString注册时间,格式为yyyy-MM-dd HH:mm:ss
customizedPropertiesObject(Map)会员扩展属性

customizedProperties:

Field NametyperequiredlengthField Description
registerSourceStringY100注册来源
customizedTagStringY1000个性标签,传入JSON字符串
checkPolicyStatusStringY10会员是否同意隐私授权:1(同意)、0(不同意)
referrerMobileStringY20推荐人手机号
isGetInfoByEmailStringY10是否同意接收邮件:1(同意)、0(不同意)
isGetInfoBySMSStringY10是否同意接收短信:1(同意)、0(不同意)
isGetInfoByServiceSMSStringY10是否同意接收服务类短信:1(同意)、0(不同意)
memberSalutationStringY100会员称谓(品牌需求新增)
memberStatusStringY20会员状态(品牌需求新增)
sportsPreferenceStringY100运动偏好
makeUpPreferenceStringY100美妆偏好

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 NametypeField Description
memberIdString会员 ID
statusString注册状态 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 NametyperequiredlengthField Description
memberTypeStringY20会员type
unionIdStringY64微信unionId

Response Body Description:

Field NametypeField Description
memberIdString会员ID,全渠道唯一
memberTypeString会员type
mobileString手机号码
memberNameString姓名
unionIdString微信unionId
nicknameString微信昵称
headImgUrlString用户头像
genderString性别:F(女)、M(男)、O(未知)
cityString用户所在城市名称
provinceString用户所在省份名称
districtString用户所在区/县名称
countryString国籍
addressString会员联系地址
jobString会员职业
cardNoString会员卡号
emailString邮箱地址
birthYearString会员生日-年,格式为yyyy
birthDayString会员生日-月日,格式为MM-dd
ageInteger会员年龄
identityCardString会员身份证
registerTimeString注册时间,格式为yyyy-MM-dd'T'HH:mm:ss.SSSXXX,时区为GMT+8
memberBindingsArray微信渠道关系数据
customizedPropertiesObject(Map)会员扩展属性,数据结构详见下方

memberBindings:

Field NametyperequiredlengthField Description
appIdStringY20微信appId
openIdStringY64微信openId
unionIdStringY64公众平台唯一标识
customerNoStringY64渠道ID,若为空,则注册时默认为appId_openId

customizedProperties:

Field NametyperequiredlengthField Description
registerSourceStringY100注册来源
customizedTagStringY1000个性标签,传入JSON字符串
belongBCStringY100所属BC工号
belongShopStringY100所属店铺ID
checkPolicyStatusStringY10会员是否同意隐私授权:1(同意)、0(不同意)
referrerMobileStringY20推荐人手机号
isGetInfoByEmailStringY10是否同意接收邮件:1(同意)、0(不同意)
isGetInfoBySMSStringY10是否同意接收短信:1(同意)、0(不同意)
isGetInfoByServiceSMSStringY10是否同意接收服务类短信:1(同意)、0(不同意)
wxOpenIdStringY32公众号openid
isSubscribeStringY5是否关注公众号:1(已关注)、2(已取关)
memberSalutationStringY100会员称谓(品牌需求新增)
memberStatusStringY20会员状态(品牌需求新增)

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 NametyperequiredlengthField Description
memberTypeStringY20会员type
appIdStringY32微信appId
openIdStringY64微信open_id

Response Body Description:

Field NametypeField Description
memberIdString会员ID,全渠道唯一
memberTypeString会员type
mobileString手机号码
memberNameString姓名
unionIdString微信unionId
nicknameString微信昵称
headImgUrlString用户头像
genderString性别(F:女,M:男,O:未知)
cityString用户所在城市名称
provinceString用户所在省份名称
districtString用户所在区/县名称
countryString国籍
addressString会员联系地址
jobString会员职业
cardNoString会员卡号
emailString邮箱地址
birthYearString会员生日-年(格式: yyyy)
birthDayString会员生日-月日(格式: MM-dd)
ageInteger会员年龄
identityCardString会员身份证
registerTimeString注册时间(格式: yyyy-MM-dd'T'HH:mm:ss.SSSXXX,时区:GMT+8)
customizedPropertiesObject(Map)会员扩展属性,数据结构见下方

customizedProperties:

Field NametyperequiredlengthField Description
registerSourceStringY100注册来源
customizedTagStringY1000个性标签,传入JSON字符串
belongBCStringY100所属BC工号
belongShopStringY100所属店铺ID
checkPolicyStatusStringY10会员是否同意隐私授权:1(同意)、0(不同意)
referrerMobileStringY20推荐人手机号
isGetInfoByEmailStringY10是否同意接收邮件:1(同意)、0(不同意)
isGetInfoBySMSStringY10是否同意接收短信:1(同意)、0(不同意)
isGetInfoByServiceSMSStringY10是否同意接收服务类短信:1(同意)、0(不同意)
wxOpenIdStringY32公众号openid
isSubscribeStringY5是否关注公众号:1(已关注)、2(已取关)
memberSalutationStringY100会员称谓(品牌需求新增)
memberStatusStringY20会员状态(品牌需求新增)

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://..."
}

Reviews