有赞新零售社区

发帖
有赞云历史板块»【会员相关接口】场景七:积分增加/扣减

【会员相关接口】场景七:积分增加/扣减

有赞-大羽 2018-09-30 3278 浏览 0 评论 | 只看楼主 [打印]


——买家在外部系统获得了积分,通过哪个接口可以给买家在有赞店铺里的对应账户增加积分?
(1)给用户加积分:youzan.crm.customer.points.increase
(3)重要字段说明:
》》fans_id:粉丝ID,从各渠道进入微商城后,粉丝在微商城中的唯一ID,如果没有写0,mobile/fans_id/open_user_id 三选一传入;
》》fans_type:粉丝类型(自有粉丝: fans_type = 1),与fans_id同时存在,当没有fans_id时,则fans_id与fans_type需要同时置为0;
》》mobile:手机号,如果用户主动绑定了手机号,或是直接通过手机号注册的方式进入微商城,后台会优先以手机号作为用户标识;如果没有写0,mobile/fans_id/open_user_id 三选一传入;
》》open_user_id:三方用户ID,此ID只出现在APPSDK开店业务场景中,在登录态打通过程中,三方将open_user_id传给有赞,作为三方APP用户在微商城中的用户标识;如果没有写0,mobile/fans_id/open_user_id 三选一传入;
》》points:积分值,此处传入的积分值就是用户积分的增加值;比如用户原有积分20,points入参15,接口调用成功后,用户积分为35;
(4)调用格式,通过(2)中链接访问后:
(5)HTTP调用示例:
(6)JAVA调用示例:
YZClient client = new DefaultYZClient(newToken("token")); //new Sign(appKey, appSecret)
YouzanCrmCustomerPointsIncreaseParamsyouzanCrmCustomerPointsIncreaseParams = newYouzanCrmCustomerPointsIncreaseParams();
youzanCrmCustomerPointsIncreaseParams.setPoints(3L);
youzanCrmCustomerPointsIncreaseParams.setFansId(2321505678L);
YouzanCrmCustomerPointsIncreaseyouzanCrmCustomerPointsIncrease = new YouzanCrmCustomerPointsIncrease();
youzanCrmCustomerPointsIncrease.setAPIParams(youzanCrmCustomerPointsIncreaseParams);
YouzanCrmCustomerPointsIncreaseResult result =client.invoke(youzanCrmCustomerPointsIncrease);

——买家在外部系统使用了积分,通过哪个接口可以给买家在有赞店铺里的对应账户扣除积分?
(1)给用户减积分:youzan.crm.customer.points.decrease
(3)重要字段说明:
》》fans_id:粉丝ID,从各渠道进入微商城后,粉丝在微商城中的唯一ID,如果没有写0,mobile/fans_id/open_user_id 三选一传入;
》》fans_type:粉丝类型(自有粉丝: fans_type = 1),与fans_id同时存在,当没有fans_id时,则fans_id与fans_type需要同时置为0;
》》mobile:手机号,如果用户主动绑定了手机号,或是直接通过手机号注册的方式进入微商城,后台会优先以手机号作为用户标识;如果没有写0,mobile/fans_id/open_user_id 三选一传入;
》》open_user_id:三方用户ID,此ID只出现在APPSDK开店业务场景中,在登录态打通过程中,三方将open_user_id传给有赞,作为三方APP用户在微商城中的用户标识;如果没有写0,mobile/fans_id/open_user_id 三选一传入;
》》points:积分值,此处传入的积分值就是用户积分的扣除值;比如用户原有积分20,points入参15,接口调用成功后,用户积分为5;
(4)调用格式,通过(2)中链接访问后:
(5)HTTP调用示例:

(6)JAVA调用示例:
YZClient client = new DefaultYZClient(newToken("token")); //new Sign(appKey, appSecret)
YouzanCrmCustomerPointsDecreaseParamsyouzanCrmCustomerPointsDecreaseParams = newYouzanCrmCustomerPointsDecreaseParams();
youzanCrmCustomerPointsDecreaseParams.setPoints(1L);
youzanCrmCustomerPointsDecreaseParams.setFansId(2321505678L);
YouzanCrmCustomerPointsDecreaseyouzanCrmCustomerPointsDecrease = new YouzanCrmCustomerPointsDecrease();
youzanCrmCustomerPointsDecrease.setAPIParams(youzanCrmCustomerPointsDecreaseParams);
YouzanCrmCustomerPointsDecreaseResult result =client.invoke(youzanCrmCustomerPointsDecrease);

——买家在有赞店铺中消耗或增加积分,外部系统通过哪个接口获取最新的用户积分数值?
(1)获取用户积分:youzan.crm.fans.points.get
(3)重要字段说明:
》》fans_id:粉丝ID,从各渠道进入微商城后,粉丝在微商城中的唯一ID,mobile/fans_id/open_user_id 三选一传入;
》》mobile:手机号,如果用户主动绑定了手机号,或是直接通过手机号注册的方式进入微商城,后台会优先以手机号作为用户标识;mobile/fans_id/open_user_id 三选一传入;
》》open_user_id:三方用户ID,此ID只出现在APPSDK开店业务场景中,在登录态打通过程中,三方将open_user_id传给有赞,作为三方APP用户在微商城中的用户标识;mobile/fans_id/open_user_id 三选一传入;
(4)调用格式,通过(2)中链接访问后:
(5)HTTP调用示例:

(6)JAVA调用示例:
YZClient client = new DefaultYZClient(newToken("token")); //new Sign(appKey, appSecret)
YouzanCrmFansPointsGetParams youzanCrmFansPointsGetParams =new YouzanCrmFansPointsGetParams();
youzanCrmFansPointsGetParams.setMobile("15088886668");
YouzanCrmFansPointsGet youzanCrmFansPointsGet = newYouzanCrmFansPointsGet();
youzanCrmFansPointsGet.setAPIParams(youzanCrmFansPointsGetParams);
YouzanCrmFansPointsGetResult result =client.invoke(youzanCrmFansPointsGet);


主帖>【会员相关接口】八大场景接口对接说明
用手机打开
收藏 ··· 回复
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    复制链接
    新浪微博
    QQ空间
    微信扫码
    • 回复

    • 评分

    客服工作时间是9:00-18:00,客服妹子当前不在线,若不能及时回复请谅解。试试右上角的搜索吧,论坛有丰富的经验贴、公告贴,相信一定能够帮到您~

    复制成功