编辑商品

编辑商品

请求URL:

POST https://kf.fw199.com/gateway/dd/product/edit/v2

公共参数

参数名称 参数类型 是否必须 示例值 参数描述
appid String 合作伙伴AppId
timestamp String 1657525936 当前Unix时间戳,秒
seller_nick String 38173182 抖店的账号,对应蜂巢授权返回doudianseller字段
sign String

业务参数

参数名称 参数类型 是否必须 示例值 参数描述
product_id String 3506108675121111111 商品ID
product_type Int64 0 0-普通,3-虚拟,6玉石闪购,7云闪购
category_leaf_id Int64 20000 叶子类目ID通过/shop/getShopCategory接口获取
name String xxx补水液 商品名称,最多60个字符(30个汉字),不能含emoj表情
recommend_remark String 这个商品很好啊 商家推荐语,不能含emoj表情
pic String img_url1 img_url2
description String img_url1 img_url2
pay_type Int64 1 支付方式,0货到付款 1在线支付,2,货到付款+在线支付
delivery_method Int32 7 海南免税生效。 0:离岛免税、1:邮寄、2:离岛自提+邮寄
cdf_category String 1 海南免税:海关限购分类编码
reduce_type Int64 1 1 减库存类型:1-拍下减库存 2-付款减库存
assoc_ids String 1 2
freight_id Int64 123 运费模板id,传0表示包邮,通过/freightTemplate/list接口获取
weight Double 1000 重量
weight_unit Int64 1 重量单位,0-kg, 1-g
delivery_delay_day Int64 7 delivery_delay_day: 承诺发货时间,单位是天,不传则默认为2天。现货发货(presell_type=0)和阶梯发货模式(presell_type=2)时必填,支持传入9999 、1、 2 (分别表示当日发、次日发、48小时发),具体支持传入的参数范围/product/getProductUpdateRule
presell_type Int64 0 发货模式,0-现货发货,1-预售发货,2-阶梯发货,默认0
presell_delay Int64 7 全款预售模式时的发货时间/阶梯模式下阶梯发货时间,具体支持传入的参数范围/product/getProductUpdateRule。
presell_end_time String 2020-02-21 18:54:27 预售结束时间,格式2020-02-21 18:54:27,最多支持设置距离当前30天
supply_7day_return Int64 该字段将在2023年4月30日下线,请开发使用最新的after_sale_service字段传值; 是否支持7天无理由,0不支持,1支持,2支持(拆封后不支持)
mobile String 40012345 客服电话号码
commit Bool true false仅保存,true保存+提审
remark String 备注 商家可见备注
out_product_id Int64 123 外部product_id。超市小时达场景不推荐使用。out_product_id 、outer_product_id 都传了的话,要求相等。
+quality_list List - 资质,可通过/product/qualificationConfig获取
-quality_key String 3457***9470978 资质key
-quality_name String 进货凭证 资质名称
-+quality_attachments List - 资质
- -media_type Int64 1 1-图片
- -url String http://www.byted***.com/YYYY" 凭证url
-quality_id Int64 1234 资质id
-quality_content_name String 版权页资质 资质名
spec_name String 颜色-尺码 如果不填,则规格名为各级规格名用 “-“ 自动生成
specs String 颜色 红色,黑色^尺码
spec_prices String [{“spec_detail_name1”:”红色”,”spec_detail_name2”:”S”,”spec_detail_name3”:””,”stock_num”:11,”price”:100,”code”:””,”step_stock_num”:0,”supplier_id”:””,”outer_sku_id”:””,”delivery_infos”:[{“info_type”:”weight”,”info_value”:”100”,”info_unit”:”mg”}]},{“spec_detail_name1”:”红色”,”spec_detail_name2”:”M”,”spec_detail_name3”:””,”stock_num”:22,”price”:100,”code”:””,”step_stock_num”:0,”supplier_id”:””,”outer_sku_id”:””,”delivery_infos”:[{“info_type”:”weight”,”info_value”:”100”,”info_unit”:”mg”}]},{“spec_detail_name1”:”黑色”,”spec_detail_name2”:”S”,”spec_detail_name3”:””,”stock_num”:44,”price”:100,”code”:””,”step_stock_num”:0,”supplier_id”:””,”outer_sku_id”:””,”delivery_infos”:[{“info_type”:”weight”,”info_value”:”100”,”info_unit”:”mg”}]},{“spec_detail_name1”:”黑色”,”spec_detail_name2”:”M”,”spec_detail_name3”:””,”stock_num”:55,”price”:100,”code”:””,”step_stock_num”:0,”supplier_id”:””,”outer_sku_id”:””,”delivery_infos”:[{“info_type”:”weight”,”info_value”:”100”,”info_unit”:”mg”}]}] sku详情,数量应该等于规格1规格2规格3,sku数量和规格组合数必须一致 sku不可售时,库存可设置为0。price单位为分。 delivery_infos为SKU物流信息,info_value为字符串类型(示例:”12”),info_type填weight,info_unit支持mg,g,kg,超市小时达场景主品用普通库存,子品用区域库存(”sku_type”: 1 // 区域库存,”stock_num_map”:{“123”:99999 // 门店ID:库存数量}); “gold_process_charge”为黄金加工费,只有计价金类目可填并且必填。sell_properties为sku规格信息,代替spec_detail_name1、spec_detail_name2、spec_detail_name3,支持填写超过三级规格,样式:[{“property_id”:123,”property_name”:”颜色”,”value_id”:456,”value_name”:”红色”,”remark”:”偏深”},{“property_id”:789,”property_name”:”净含量”,”value_id”:891,”value_name”:”30ml”,”remark”:null,”measurement”:{“measure_unit”:”ml”,”measure_unit_id”:4,”value”:”30”}}] 其中property_id规格项属性id,自定义时传0,property_name为规格项名称,value_id为规格值属性id自定义时传0,value_name为规格值名称,remark为规格值备注(选填),measurement为度量衡信息,当规格值为度量衡属性自定义值时传递。
spec_pic String img_url,img_url,img_url 如颜色-尺寸, 颜色就是主规格, 颜色如黑,白,黄,它们图片url以逗号分隔 注:”pic”、”description”、”spec_pic”这三个字段里的传入的图片数量总和,不得超过50张。
maximum_per_order Int64 200 每个用户每次下单限购件数
limit_per_buyer Int64 1 每个用户累计限购件数
minimum_per_order Int64 2 每个用户每次下单至少购买的件数
product_format_new String {“405”:[{“value”:27664,”name”:”复习资料”,”diy_type”:0}],”449”:[{“value”:0,”name”:”佚名”,”diy_type”:0}],”501”:[{“value”:7310,”name”:”否”,”diy_type”:0}],”855”:[{“value”:61683,”name”:”北京出版社”,”diy_type”:0}],”1088”:[{“value”:407,”name”:”小学五年级”,”diy_type”:0}],”1319”:[{“value”:0,”name”:”1”,”diy_type”:0}],”1601”:[{“value”:13911,”name”:”通用版”,”diy_type”:0}],”1618”:[{“value”:0,”name”:”9787218122861”,”diy_type”:0}],”1831”:[{“value”:0,”name”:”小学英语看图说话写话二年级”,”diy_type”:0}],”2000”:[{“value”:34762,”name”:”无”,”diy_type”:0}],”2229”:[{“value”:0,”name”:”1”,”diy_type”:0}],”2763”:[{“value”:25193,”name”:”英语”,”diy_type”:0}],”3271”:[{“value”:0,”name”:”1”,”diy_type”:0}],”3296”:[{“value”:0,”name”:”16.80元”,”diy_type”:0}]} 属性,通过/product/getCatePropertyV2获取 格式:{“property_id”:[{“value”:value,”name”:”property_name”,”diy_type”:0}]} name的类型是string,value和diy_type的类型是number
spu_id Int64 14567 spu_id
appoint_delivery_day Int64 2 可预约发货天数
third_url String http://img.alicdn.com/xxxx third_url
extra String extra
src String src
standard_brand_id Int64 111 品牌id,通过/brand/list获取,无品牌id则传596120136
need_check_out Bool true 卡券类型需要传true
+ poi_resource Struct - 卡券信息
-valid_days Int64 5 有效时间段,从领取日开始计算,优先级高于ValidStart-ValidEnd
-valid_start Int64 1636616483 卡券有效开始时间,秒单位时间戳
-valid_end Int64 1636616483 卡券有效截止时间,秒单位时间戳
- service_num String 13111111111 客服电话
-notification String 领取须知 领取须知
-code_type Int64 1 平台产生券码:1;合作方api实时传入的券码:4
-count Int64 1 券码总量,0/-1表示不限制,平台券时须>0
-couponSecondExchange Int64 0 0-不支持二次兑换,1-支持二次兑换
-total_can_use_count Int32 1 可核销总次数
- link String https://xxx.xxx.xxx 兑换链接
-condition String 券码使用条件 券码使用条件
-coupon_return_methods List [1] 数组当前只支持一个元素且只可为1或2,其中1表示随时退+过期自动退,2表示不支持退
car_vin_code String BA111111111111111 汽车vin码
presell_config_level Int64 3 0:全款预售,1:sku预售,2:现货+预售,3:新预售
need_recharge_mode Bool true 充值模式
account_template_id String 122112 账号模板id
presell_delivery_type Int64 1 全款预售和sku预售时传递,其他不传:0预售结束后发货 1支付完成后发货
white_back_ground_pic_url String http://aaaa 白底图url(仅素材中心url有效),白底图比例要求1:1
long_pic_url String http://aaaa 3:4长图url(仅素材中心url有效)
after_sale_service Map “damaged_order_return”: “1” 推荐传入,售后服务参数,key:value格式。supply_day_return_selector(7天无理由选项):N天-政策代号,N只支持7和15,政策代号枚举https://bytedance.feishu.cn/docs/doccnF946oh1c98e7mo9DlYZtig 。supply_red_ass_return(红屁屁无忧):0不支持,1支持。supply_allergy_return(过敏无忧,仅跨境可选):0不支持,1支持。damaged_order_return(坏损包退):0不支持,1支持。support_allergy_returnV2(过敏包退,境内可选):0不支持,1支持
sell_channel List 0 售卖方式;0:全渠道手售卖,1:仅指定直播间售卖
start_sale_type Int64 0 审核通过后上架售卖时间配置:0-立即上架售卖 1-放入仓库
+ delay_rule Struct - 特殊日期延迟发货规则
-enable Bool true 是否开启特殊日期延迟发货
-config_type Int32 1 1 时间点;2 时间范围
-config_value Int64 1673539199 特殊日期延迟发货时间最晚发货时间,时间戳,单位秒:当config_type=1时,传时间戳,代表最晚x发货;当config_type=2时,传天数,代表延迟x天发货
-start_time Int64 1643040000 特殊日期延迟发货时间下单开始时间,时间戳,单位秒
-end_time Int64 1672502400 特殊日期延迟发货时间下单结束时间,时间戳,单位秒
material_video_id String vaaaa 主图视频ID,可以先通过https://op.jinritemai.com/docs/api-docs/69/1617接口上传视频,获取审核通过的视频素材ID进行传入
pickup_method String 0 提取方式新字段,推荐使用。”0”: 普通商品-使用物流发货, “1”: 虚拟商品-无需物流与电子交易凭证, “2”: 虚拟商品-使用电子交易凭证, “3”: 虚拟商品-充值直连
size_info_template_id Int64 101 尺码模板ID
substitute_goods_url String https://xxx.xxx.xxx 外部商品url
sale_channel_type String sameAsOffline 销售渠道类型,可选onlineOnly(纯电商,仅在线上售卖)或sameAsOffline(专柜同款,线上线下都有售卖),云零售商家(https://fxg.jinritemai.com/ffa/merchant-growth/cloud-retail)可以设置
+recruit_info Struct - 招商信息
-recruit_follow_id String 122332 线索ID
-recruit_type String 0 招商类型
store_id Int64 12345 门店ID
main_product_id Int64 3121213121212 主商品ID
sale_limit_id Int64 123 限售模板ID
name_prefix String 钛钢木质耳饰 通过/product/getRecommendName接口推荐的商品标题前缀(注意系统根据类目属性生成前缀字符串时,末尾有一个空格)
reference_price Int64 12300 参考价,单位分,需大于商品价格并小于商品价格的10倍
+reference_price_certificate Struct - 参考价凭证信息
- certificate_type Int64 1 通过/product/getProductUpdateRule获取可选的参考价格类型
- certificate_urls List [“http://www.aaa.com"] 图片url需要使用商品素材中心的url并且只能有一张
main_image_three_to_four String img_url1 img_url2
+unit_price_info Struct - 商品价格规则信息
- process_charge Int64 0 如果传了unit_price_info字段,请写死传0。内部不会消费,只是用于标识
- price_rule_type Int32 1 1表示投资金,2表示首饰金
+quality_inspection_info Struct - 前置质检相关(特定二手商家、特定二手类目使用)
- supported Bool true 是否支持前置质检
- agency String 111 机构编码,请通过/inspection/QueryBtasAgencyList接口获取
- certificate_code String 123 质检证书编码
- mode Int32 2 1: 单库存模式,只允许售卖一个sku;2: 多库存模式,不限售卖次数
is_c2b_switch_on Bool true 是否支持c2b小程序(特定c2b定制商家使用,请使用/product/getProductUpdateRule接口获取是否支持)
micro_app_id String abcde 支持c2b定制时的小程序id(特定c2b定制商家使用,请使用/product/getProductUpdateRule接口获取是否支持)
is_auto_charge Bool false 是否是自动充值商品
short_product_name String 新品牛肉干 导购短标题,短标题可用于物流打单及商品搜索场景,若未填写,则系统将智能生成最优短标题在商详购买页面展示,说明详见:短标题创建指南
+after_sale_service_v2 Struct - 售后服务新结构(老的after_sale_service中的字段后续会慢慢迁移到这里)
-+three_guarantees Struct - 三包服务配置
- - duration Int64 180 售后天数
- - service_type Int64 1 服务类型 1-寄修 2-延保
- is_large_product Int64 1 当前商品是否是大件商品
spec_info Struct - 规格详细信息,代替specs和spec_name,请查看json对象,此处略…
spec_prices_v2 List - 新sku参数,代替spec_prices,请查看json对象,此处略…
with_sku_type Bool true true:主动设置库存类型(仅对区域库存生效,普通库存、阶梯库存不受此字段影响)
name_suffix String 36.9度 通过/product/getRecommendName接口推荐的商品标题后缀(注意系统根据类目属性生成后缀字符串时,前面可能有一个空格)
use_brand_name Bool false 是否勾选使用品牌名, 注意勾选时需要接入/product/getRecommendName接口
+open_logistics_info Struct - 跨境物流信息
-customs_clear_type Int64 1 通关模式,1:BBC 2:BC 3:CC邮关
-origin_country_id Int64 6251999 原产国id
-source_country_id Int64 2963597 货源国id
-brand_country_id Int64 6251999 品牌所在地id
-tax_payer Int64 0 税金承担方(一般都填0,走商家承担):0商家承担,1用户承担
-net_weight_qty Double 1 商品净重
-cross_warehouse_id String FOURPLTEST 商家仓id

2. 请求示例代码(Java)

请求示例代码

    @Test
    public void  DDProductEditV2() throws Exception {
        Map<String, Object> data = new HashMap<String, Object>();
        data.put("appid",  Config.AppId);
        Long timestamp = System.currentTimeMillis() / 1000;
        data.put("timestamp", timestamp.toString());
        data.put("seller_nick", Config.DDSellerNick);
        data.put("product_id", "3668963015870513459");
        data.put("name", "测试商品-请勿购买!!USB打印机商务办公小票机-test");
        //其它参数此处省略。。。
        //false仅保存,true保存+提审
        data.put("commit",false);

        data.put("sign", Sign(data,Config.AppSecret));
        // 调用服务API
        String resp = doHttpRequest(Config.DDProductEditV2, data);
        System.out.println(resp);
    }

product_format_new对象:

{
  "241": [
    {
      "diy_type": 1,
      "name": "常规款",
      "value": 17314
    }
  ],
  "631": [
    {
      "diy_type": 1,
      "name": "东西南北风",
      "value": 0
    }
  ],
  "785": [
    {
      "diy_type": 1,
      "name": "亚麻100%",
      "value": 0,
      "measure_info": {
        "template_id": 252,
        "value_name": "亚麻100%",
        "values": [
          {
            "module_id": 582,
            "value": "亚麻",
            "unit_id": 0
          },
          {
            "module_id": 583,
            "unit_name": "%",
            "unit_id": 15,
            "value": "100"
          }
        ]
      }
    }
  ],
  "813": [
    {
      "diy_type": 1,
      "name": "X型",
      "value": 8017
    }
  ],
  "981": [
    {
      "diy_type": 1,
      "name": "蛋糕裙",
      "value": 22253
    }
  ],
  "1467": [
    {
      "diy_type": 0,
      "name": "59%-69%(含)",
      "value": 168368
    }
  ],
  "1551": [
    {
      "diy_type": 1,
      "name": "超短裙",
      "value": 22064
    }
  ],
  "1687": [
    {
      "diy_type": 0,
      "name": "",
      "value": 0
    }
  ],
  "1878": [
    {
      "diy_type": 1,
      "name": "高腰",
      "value": 16521
    }
  ],
  "2592": [
    {
      "diy_type": 1,
      "name": "甜美风",
      "value": 192481
    }
  ]
}

spec_info对象:


{
  "spec_values": [
    {
      "property_name": "颜色分类",
      "property_id": 2752,
      "values": [
        {
          "value_name": "白色",
          "value_id": 35497
        }
      ]
    },
    {
      "property_name": "尺码大小",
      "property_id": 4704,
      "values": [
        {
          "value_name": "M",
          "value_id": 0
        }
      ]
    }
  ]
}

spec_prices_v2对象:


[
  {
    "sell_properties": [
      {
        "value_name": "白色",
        "property_name": "颜色分类"
      },
      {
        "value_name": "M",
        "property_name": "尺码大小"
      }
    ],
    "stock_num": 11,
    "price": 1,
    "code": "sk100"
  }
]

3. 返回结果如下:


{"code":0,"message":"ok","data":null}

说明: code为0表示成功,非0为失败,message会包含失败原因。返回字段说明见文档
https://op.jinritemai.com/docs/api-docs/14/250

文档更新时间: 2024-05-22 15:47   作者:JSL