有赞新零售社区

发帖
API使用问题»关于券限制商品的api调用问题

[API调用-会员/营销] 关于券限制商品的api调用问题

4a94c6a73f1a 02-21 1193 浏览 3 评论 | 只看楼主 [打印]
这张券指定了这些商品不可用,下面显示的是网店商品。
我调用活动详情查询接口
api文档地址:https://doc.youzanyun.com/detail/API/0/3518
api名称:通过活动Id查询活动详情信息
请求如下:
{"aPIParams":{"activity_id":29286857},"gateway":"https://open.youzanyun.com","headers":{},"httpMethod":"POST","name":"youzan.ump.voucheractivity.detail.query","oAuthType":"TOKEN","paramModelClass":"com.youzan.cloud.open.sdk.gen.v3_0_2.model.YouzanUmpVoucheractivityDetailQueryParams","version":"3.0.2"}
返回如下:
{"code":200,"data":{"absolute_valid_end_time":1711900799000,"absolute_valid_start_time":1699545600000,"activity_type":7,"applicable_offline_goods_group_ids":[],"applicable_offline_goods_ids":[],"applicable_offline_goods_range_type":0,"applicable_offline_root_goods_ids":[],"applicable_online_goods_group_ids":[],"applicable_online_goods_ids":[2604095287,2579045754,1699020103,2683802034,2409014929,3451676788,2137538657,2714830940,2604096441,1838276160,3275681965,2165846923,1701392253,2718910105,2990886232,2328494679,2138330986,2390625249,2714839223,2319247514,3275682198,2806887333,2640299634,2622231163,3049684158,2498948363,2735411505,1701075551,2499228425],"applicable_online_goods_range_type":3,"applicable_online_root_goods_ids":[1699020103,1701075551,1701392253,1838276160,2137538657,2138330986,2165846923,2319247514,2328494679,2390625249,2409014929,2498948363,2499228425,2579045754,2604095287,2604096441,2622231163,2640299634,2683802034,2714830940,2714839223,2718910105,2735411505,2806887333,2990886232,3049684158,3275681965,3275682198,3451676788],"applicable_shop_ids":[105481348],"applicable_shop_range_type":2,"budget_send_total_qty":10000,"budget_use_total_qty":10000,"card_alias":[],"created_at":1704253024000,"customer_level_limit_type":0,"description":"11月积分活动券\n活动时间:2023-11-10 00:00:00 到 2024-02-29 23:59:59\n优惠内容:积分商城商品不可用,满任意金额可用,减免50.00元优惠券\n优惠叠加:优惠券仅原价购买时可用\n适用范围:RESIMPLE全国门店可用\n备注:卡券不支持退换","expire_notice_days":7,"external_platform_type":0,"fetch_url":"https://shop105673516.youzan.com/v2/ump/promocard/fetch?alias=l4v64ybj&sign=f54d435b03be119a3727571217be8093","id":29286857,"is_expire_notice":true,"is_forbid_overlay_preferential":false,"is_handsel":false,"is_public_display":false,"is_sharable":false,"is_wechat_paymch_sync":false,"is_weixin_sync":false,"kdt_id":105481348,"level_alias":[],"max_discount_amount":0,"max_value":0,"member_card_limit_type":0,"min_value":0,"preferential_mode":1,"relative_valid_time_begin_interval":0,"relative_valid_time_duration":0,"remark":"50元优惠券2088积分兑换","send_stock_qty":9999,"status":0,"taken_qty":1,"threshold_amount":0,"title":"IT测试不可用","total_fans_taked":0,"updated_at":1708416227000,"use_stock_qty":10000,"used_qty":0,"user_take_num_limit":0,"valid_time_generate_type":1,"value":5000,"voucher_value_generate_type":1},"message":"successful","success":true,"trace_id":"zan-open-sdk-7546387f-bf6f-402c-8171-0eed1306caaf"}
他的所有商品绑定全是在applicable_online_goods_ids, 请问如何将商品绑定在 applicable_offline_goods_ids 上,或者 这两个字段的区别是线上线下吗?

用手机打开
收藏 ··· 回复
    店铺id:105481348,是微商城店铺,不是零售店铺所以没有门店,所以该店铺查询优惠劵该  applicable_offline_goods_ids字段永远为空
    applicable_online_goods_ids就是网店的商品id,也就是微商城商品的商品id
    applicable_online_goods_range_type是3代表部分不可用,然后配合applicable_online_goods_ids使用
    • 我重新建了一张券,选择了门店,为何还是没有;查询请求:{"aPIParams":{"activity_id":30161917},"gateway":"https://open.youzanyun.com","headers":{},"httpMethod":"POST","name":"youzan.ump.voucheractivity.detail.query","oAuthType":"TOKEN","paramModelClass":"com.youzan.cloud.open.sdk.gen.v3_0_2.model.YouzanUmpVoucheractivityDetailQueryParams","version":"3.0.2"}
      查询返回:
      {"code":200,"data":{"absolute_valid_end_time":4102416000000,"absolute_valid_start_time":1708478730000,"activity_type":7,"applicable_offline_goods_group_ids":[],"applicable_offline_goods_ids":[],"applicable_offline_goods_range_type":1,"applicable_offline_root_goods_ids":[],"applicable_online_goods_group_ids":[],"applicable_online_goods_ids":[3781886457,3781886062,2869608060,3781888908,3781887827,2869606480,3781888245],"applicable_online_goods_range_type":2,"applicable_online_root_goods_ids":[2869606480,2869608060,3781886062,3781886457,3781887827,3781888245,3781888908],"applicable_shop_ids":[143786915,149581912,147978834,149986341,150977401,150978801],"applicable_shop_range_type":2,"budget_send_total_qty":100,"budget_use_total_qty":100,"card_alias":[],"created_at":1708478730000,"customer_level_limit_type":0,"description":"测试20240221\n活动时间:领券当日起7天内可用\n优惠内容:部分商品可用,无门槛,减免1元优惠券","expire_notice_days":4,"external_platform_type":3,"fetch_url":"https://shop105673516.youzan.com/v2/ump/promocard/fetch?alias=156ilvka6&sign=709fc8753866a8551b88947b883a549f","id":30161917,"is_expire_notice":false,"is_forbid_overlay_preferential":false,"is_handsel":false,"is_public_display":false,"is_sharable":false,"is_wechat_paymch_sync":true,"is_weixin_sync":false,"kdt_id":105481348,"level_alias":[],"max_discount_amount":0,"max_value":0,"member_card_limit_type":0,"min_value":0,"preferential_mode":1,"relative_valid_time_begin_interval":0,"relative_valid_time_duration":7,"remark":"","send_stock_qty":99,"status":0,"taken_qty":1,"threshold_amount":0,"title":"测试20240221","total_fans_taked":0,"updated_at":1708478730000,"use_stock_qty":100,"used_qty":0,"user_take_num_limit":0,"valid_time_generate_type":2,"value":100,"voucher_value_generate_type":1},"message":"successful","success":true,"trace_id":"zan-open-sdk-9e43fca7-4cd3-4ee1-82e6-789971fad0d4"}
    • 原因还是这个,店铺id:105481348,是微商城店铺,不是零售店铺所以没有门店,所以该店铺查询优惠劵该  applicable_offline_goods_ids字段永远为空

      您说的门店是CRM的门店,不是零售店铺的门店
      applicable_online_goods_ids就是网店的商品id,也就是微商城商品的商品id
      applicableShopIds适用的店铺id
      applicable_online_goods_range_type是2代表部分可用,然后配合applicable_online_goods_ids以及applicableShopIds使用

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

    本版积分规则

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

    • 评分

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

    复制成功