根据货号获取商品信息

根据商品货号查询商品信息。 支持 1~3 个货号(英文逗号分隔)

一、接口名称

  • 接口地址:https://kf.fw199.com/gateway/dewu/spu/getbyarticlenumber
  • 请求方式:POST
  • Content-Type:application/x-www-form-urlencoded

三、请求参数

公共参数

参数名 类型 是否必需 说明
appid string 必需 开发者 appid
timestamp string 必需 时间戳(秒)
sign string 必需 参数签名

业务参数

参数名 类型 是否必需 说明
seller_nick string 必需 店铺标识(授权回调中的 seller_nick)
article_number string 必需 货号;多个用英文逗号分隔,最多 3 个,如 AGWN041-1 或 AGWN041-1,AMRV051-3
sysid string 必需 应用标识

五、请求示例代码(Java)

5.1 查询单个货号

@Test
public void dewuGetByArticleNumber() throws Exception {

    String apiUrl = "https://kf.fw199.com/gateway/dewu/spu/getbyarticlenumber";

    Map<String, String> data = new HashMap<>();
    data.put("appid", Config.AppId);
    data.put("timestamp", String.valueOf(System.currentTimeMillis() / 1000));
    data.put("seller_nick", "your_dewu_seller_nick");
    data.put("sys_id", "580");
    data.put("article_number", "AGWN041-1");
    data.put("sign", Utils.Sign(data, Config.AppSecret));

    String result = doHttpRequest(apiUrl, data);
    System.out.println("result:" + result);
}

5.2 批量查询(最多 3 个)

@Test
public void dewuGetByArticleNumberBatch() throws Exception {

    String apiUrl = "https://kf.fw199.com/gateway/dewu/spu/getbyarticlenumber";

    Map<String, String> data = new HashMap<>();
    data.put("appid", Config.AppId);
    data.put("timestamp", String.valueOf(System.currentTimeMillis() / 1000));
    data.put("seller_nick", "your_dewu_seller_nick");
    data.put("sys_id", "580");
    data.put("article_number", "AGWN041-1,AMRV051-3");
    data.put("sign", Utils.Sign(data, Config.AppSecret));

    String result = doHttpRequest(apiUrl, data);
    System.out.println("result:" + result);
}

六、响应说明

HTTP 状态码始终为 200,业务成败看 JSON 中的 code 字段(0 表示成功)。

6.1 成功示例

{
  "code": 0,
  "message": "ok",
  "data": [
    {
      "spu_id": 9773,
      "category_id": 1001176,
      "category_name": "复古篮球鞋",
      "brand_id": 1012419,
      "brand_name": "中国李宁",
      "article_number": "AGWN041-1",
      "other_numbers": "",
      "title": "LiNing李宁 悟道2 ACE ...",
      "spu_properties": "{\"一级规格\":\"尺码\"}",
      "auth_price": 89900,
      "status": 1,
      "spu_logo": "https://cdn.poizon.com/...",
      "support_cross": 1,
      "has_auth": true,
      "skus": [
        {
          "sku_id": 58632565,
          "status": 1,
          "properties": "{\"尺码\":\"39\"}",
          "barcode": "6919521612965",
          "merchant_sku_code": null,
          "extra_code": "6919521612965",
          "other_merchant_sku_codes": null,
          "suit_flag": null
        }
      ]
    }
  ],
  "trace_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

6.2 data[] 主要字段

参数名 类型 说明
spu_id number 得物 SPU ID
article_number string 货号
title string 商品标题
brand_id / brand_name number / string 品牌
category_id / category_name number / string 类目
auth_price number 官方价(单位:分)
status number SPU 状态
spu_logo string 主图 URL
has_auth boolean 当前商家是否有该商品权限
skus array SKU 列表
skus[].sku_id number SKU ID
skus[].properties string 规格 JSON 字符串,如 {"尺码":"39"}
skus[].barcode string 条码
skus[].status number SKU 状态

完整字段以上游得物开放平台返回为准;

6.3 失败示例

参数错误:

{
  "code": 1,
  "message": "参数article_number不能为空"
}

货号超限:

{
  "code": 1,
  "message": "货号数量不能超过3个"
}

文档更新时间: 2026-09-26 23:27   作者:admin