有赞新零售社区

发帖
API使用问题»调用优惠券/码编辑接口无效

[API调用-会员/营销] 调用优惠券/码编辑接口无效

XV 06-13 1272 浏览 4 评论 | 只看楼主 [打印]
调用优惠券/码编辑接口:https://doc.youzanyun.com/detail/API/0/1056
修改适用网店的商品id,返回成功,但是实际没改。帮忙看下是啥原因?

请求:调用有赞接口 request:{"APIParams":{"request":{"app_name":"app_cloud","budget_send_total_qty":1,"budget_use_total_qty":1,"description":"优惠券\n活动时间:2024-06-11 21:12:45 到 2024-06-12 21:12:45\n优惠内容:全部商品可用,满100元可用,减免20元优惠券","id":31433788,"is_expire_notice":false,"is_handsel":false,"is_public_display":true,"is_sharable":true,"open_voucher_gen_rule":{"preferential_mode":1,"value":2000,"voucher_value_generate_type":1},"open_voucher_sending_rule":{"customer_level_limit_type":0,"member_card_limit_type":0},"open_voucher_using_rule":{"applicable_online_goods_ids":[2997808625,4053479387,4053582623,3003444800,4073890654,3013246292,3014417702]},"operator_id":0,"operator_type":1,"remark":"","title":"优惠券"}},"headers":{},"httpMethod":"POST","name":"youzan.ump.voucheractivity.edit","paramModelClass":"com.youzan.cloud.open.sdk.gen.v3_0_2.model.YouzanUmpVoucheractivityEditParams","version":"3.0.2"},token*******************85e317e5622b4

响应:调用有赞接口 result:{"code":200,"data":{"is_success":true},"message":"successful","success":true,"trace_id":"zan-open-sdk-4f1be748-0ea5-4edd-ba5c-0011e31654d8"}

本帖最后由 XV 于 2024-6-18 13:59 编辑
用手机打开
收藏 ··· 回复
    尊敬的有赞用户 您好,我们已收到您的问题,并已安排相关技术支持正在处理中,请耐心等待。建议您留言邮箱地址,问题进度将通过邮件提醒方式触达,减少论坛等待时间。

      您好,参数问题导致的,获取OpenId失败!userId=0,[color=rgba(0, 0, 0, 0.85)]request.is_forbid_public_take参数校验失败,参数必填,不能为空!
      • XV 06-13
        用户id怎么获取?为啥这里要校验这么多参数,我只想修改适用网店的商品id
      • XV 06-14
        request.is_forbid_public_take参数这个参数,能后续在查询接口里面返回一下吗?这样我就可以修改的时候传过去了:https://doc.youzanyun.com/detail/API/0/3518
      • XV 06-14
        看这一笔,这几个属性我都传了,还是不好使。

        调用有赞接口 request:{"APIParams":{"request":{"app_name":"DTC-ERP","budget_send_total_qty":1,"budget_use_total_qty":1,"description":"优惠券\n活动时间:2024-06-13 18:47:05 到 2024-06-14 18:47:05\n优惠内容:部分商品可用,满100元可用,减免20元优惠券","id":31447319,"is_expire_notice":false,"is_forbid_public_take":false,"is_handsel":false,"is_public_display":true,"is_sharable":true,"open_voucher_gen_rule":{"preferential_mode":1,"value":2000,"voucher_value_generate_type":1},"open_voucher_sending_rule":{"customer_level_limit_type":0,"member_card_limit_type":0},"open_voucher_using_rule":{"applicable_online_goods_ids":[4077791635]},"operator_id":404630029,"operator_type":1,"remark":"","title":"优惠券"}},"headers":{},"httpMethod":"POST","name":"youzan.ump.voucheractivity.edit","paramModelClass":"com.youzan.cloud.open.sdk.gen.v3_0_2.model.YouzanUmpVoucheractivityEditParams","version":"3.0.2"},token*******************85e317e5622b4

        调用有赞接口 result:{"code":200,"data":{"is_success":true},"message":"successful","success":true,"trace_id":"zan-open-sdk-76638edb-dc81-4a7d-a1d0-ac109424605a"}
      • 千寻 回复 XV 06-13
        您好,必填参数都是要传入的哈,获取OpenId 可以使用https://doc.youzanyun.com/detail/API/0/323
      • XV 回复 千寻 06-14
        我没有userId,我只有手机号,用什么接口能查到用户信息
      • 千寻 回复 XV 06-14
        使用https://doc.youzanyun.com/detail/API/0/4451
      • XV 回复 千寻 06-14
        这个接口没有返回用户id,我看里面只有openId,是string类型,而原优惠券编辑接口:operator_id是个long类型
      • 千寻 回复 XV 06-14
        您好,使用yz_open_id字段信息哈,看下您的劵类型是满减券,不是兑换劵,满减劵使用https://doc.youzanyun.com/detail/API/0/2274
      • XV 回复 千寻 06-14
        我用的是优惠券的接口。你这个是满减送的接口,而且这个接口还是大客户权限包才能用。优惠券里面分满减券,折扣券之类的。跟满减送应该不是一种营销活动吧?
      • 千寻 回复 XV 06-14
        您好,是的,很抱歉看成满减/送了,可以用https://doc.youzanyun.com/detail/API/0/1056编辑优惠劵
      • XV 回复 千寻 06-14
        看这一笔,这几个属性我都传了,还是不好使。

        调用有赞接口 request:{"APIParams":{"request":{"app_name":"DTC-ERP","budget_send_total_qty":1,"budget_use_total_qty":1,"description":"优惠券\n活动时间:2024-06-13 18:47:05 到 2024-06-14 18:47:05\n优惠内容:部分商品可用,满100元可用,减免20元优惠券","id":31447319,"is_expire_notice":false,"is_forbid_public_take":false,"is_handsel":false,"is_public_display":true,"is_sharable":true,"open_voucher_gen_rule":{"preferential_mode":1,"value":2000,"voucher_value_generate_type":1},"open_voucher_sending_rule":{"customer_level_limit_type":0,"member_card_limit_type":0},"open_voucher_using_rule":{"applicable_online_goods_ids":[4077791635]},"operator_id":404630029,"operator_type":1,"remark":"","title":"优惠券"}},"OAuthType":"TOKEN*******************/zlnjxxb8.t1.dewu-inner.net","headers":{},"httpMethod":"POST","name":"youzan.ump.voucheractivity.edit","paramModelClass":"com.youzan.cloud.open.sdk.gen.v3_0_2.model.YouzanUmpVoucheractivityEditParams","version":"3.0.2"},token*******************85e317e5622b4

        调用有赞接口 result:{"code":200,"data":{"is_success":true},"message":"successful","success":true,"trace_id":"zan-open-sdk-76638edb-dc81-4a7d-a1d0-ac109424605a"}
      加载更多

      您好,看编辑记录是生效的,是哪个参数没有生效?
      • XV 06-14
        "applicable_online_goods_ids":[4077791635] 这个属性,我改成一个了,但是页面看还是有两个

      收到,这边核实下

        1跳至
        您需要登录后才可以回帖 登录 | 立即注册

        本版积分规则

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

        • 评分

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

        复制成功