商品编辑接口

单个商品编辑

1.请求参数:

请求URL:

POST https://kf.fw199.com/gateway/pdd/goods/update

参数名 类型 必须 说明
appid String 必填 合作伙伴AppId
timestamp String 必填 当前时间戳
tb_seller_nick String 必填 拼多多账号, 非店铺名称
sign String 必填 如何计算生成见示例代码
request_data json 必填 商品数据,参考示例

request_data请求报文示例, 下面示例只是部分数据。完整的入参见拼多多文档商品编辑接口

{
  "goods_id":725122171818,
  "multi_price": 80000,
  "thumb_url": "https://img.pddpic.com/open-gw/2021-10-11/ffc9a1e35840c3cf7f7af66f56c004c1.jpeg",
  "two_pieces_discount": 95,
  "shipment_limit_second": 86400,
  "is_onsale": 0,
  "is_folt": true,
  "image_url":"https://img.pddpic.com/garner-api-open/2025-08-11/39b3e14a36a0e0e4e79681381d6e6c73.jpg",
  "sku_properties": [
    {
      "template_pid": 96688,
      "template_module_id": 22326,
      "ref_pid": 310,
      "pid": 5,
      "value": "",
      "value_unit": ""
    }
  ],
  "second_hand": false,
  "price": 80000,
  "cat_id": 8464,
  "limit_quantity": 999,
  "is_pre_sale": false,
  "goods_name": "女装测试的宝贝,不要拍!!!",
  "quantity": 100,
  "weight": 100,
  "goods_desc": "女装测试的内容,好宝贝,update",
  "is_refundable": true,
  "sku_list": [

    {
      "id": 0,
      "limit_quantity": 0,
      "out_sku_sn": "",
      "spec_id_list": "[767]",
      "is_onsale": 1,
      "multi_price": 79900,
      "price": 80000,
      "quantity": 20
    }
  ],
  "market_price": 82000,
  "goods_type": 2,
  "cost_template_id": 163280639235619,
  "country_id": 10
}

2. 请求示例代码(Java)


 @Test
    public void PddGoodsUpdateRequest() throws Exception {

        String seller_nick = Config.PddSellerNick; // 拼多多卖家账号
        Map<String, String> data = new HashMap<String, String>();
        data.put("appid", Config.AppId);
        data.put("seller_nick", seller_nick);
        Long timestamp = System.currentTimeMillis() / 1000;
        data.put("timestamp", timestamp.toString());
        String  reqData ="{\n" + "  \"goods_id\":725122171818,\n" + "  \"multi_price\": 80000,\n" + "  \"thumb_url\": \"https://img.pddpic.com/open-gw/2021-10-11/ffc9a1e35840c3cf7f7af66f56c004c1.jpeg\",\n" + "  \"two_pieces_discount\": 95,\n" + "  \"shipment_limit_second\": 86400,\n" + "  \"is_onsale\": 0,\n" + "  \"is_folt\": true,\n" + "  \"image_url\":\"https://img.pddpic.com/garner-api-open/2025-08-11/39b3e14a36a0e0e4e79681381d6e6c73.jpg\",\n" + "  \"sku_properties\": [\n" + "    {\n" + "      \"template_pid\": 96688,\n" + "      \"template_module_id\": 22326,\n" + "      \"ref_pid\": 310,\n" + "      \"pid\": 5,\n" + "      \"value\": \"\",\n" + "      \"value_unit\": \"\"\n" + "    }\n" + "  ],\n" + "  \"second_hand\": false,\n" + "  \"price\": 80000,\n" + "  \"cat_id\": 8464,\n" + "  \"limit_quantity\": 999,\n" + "  \"is_pre_sale\": false,\n" + "  \"goods_name\": \"女装测试的宝贝,不要拍!!!\",\n" + "  \"quantity\": 100,\n" + "  \"weight\": 100,\n" + "  \"goods_desc\": \"女装测试的内容,好宝贝,update\",\n" + "  \"is_refundable\": true,\n" + "  \"sku_list\": [\n" + "   \n" + "    {\n" + "      \"id\": 0,\n" + "      \"limit_quantity\": 0,\n" + "      \"out_sku_sn\": \"\",\n" + "      \"spec_id_list\": \"[767]\",\n" + "      \"is_onsale\": 1,\n" + "      \"multi_price\": 79900,\n" + "      \"price\": 80000,\n" + "      \"quantity\": 20\n" + "    }\n" + "  ],\n" + "  \"market_price\": 82000,\n" + "  \"goods_type\": 2,\n" + "  \"cost_template_id\": 163280639235619,\n" + "  \"country_id\": 10\n" + "}";
        data.put("request_data",reqData);
        data.put("sign", Utils.Sign(data, Config.AppSecret));
        doHttpRequest(Config.PddGoodsUpdateRequestUrl, data);

    }

3. 返回结果

成功返回结果如下:

{
  "code": 0,
  "data": {
    "goods_commit_id": 165255005423,
    "is_success": true,
    "matched_spu_id": null,
    "request_id": "17555744062371665"
  },
  "message": "ok"
}

失败返回的结果如下:

 {"code":999,"message":"下架的规格不能修改库存"}

说明: code为0表示成功,非0为失败,message会包含失败原因。

文档更新时间: 2025-08-19 11:54   作者:admin