Skip to content

条码查询

应用场景

根据商品条码查询商品信息,包括商品条码,商品名称,区域参考价(元)。

请求参数

接口名称: item.product.get

参数名称 必填 类型 示例 说明
product_id String(13) 6934522809831 商品条码,支持UPC-A、UPC-E、EAN-13、EAN-8等
district_code String(10) 110105 参考行政区划代码

xml请求示例:

<xml>
    <version>1.0.0</version>
    <charset>UTF-8</charset>
    <sign_type>MD5</sign_type>
    <appid>12012324</appid>
    <nonce_str>5K8264ILTKCH16CQ</nonce_str>
    <method>item.product.get</method>
    <product_id>6923290400029</product_id>
    <sign>D5E5397531111D35C3D7B6BCCB5B991A</sign>
</xml>

json请求示例:

{
  "version": "1.0.0",
  "charset": "UTF-8",
  "sign_type": "MD5",
  "method": "item.product.get",
  "appid": "13682463",
  "nonce_str": "58feb19886422",
  "sign": "DB1FCAA31660653116955BF13230A912",
  "product_id": "6934522809831"
}

返回结果

参数名称 必填 类型 示例 说明
product_id String(13) 6900873000029 商品条码
title String(50) 康师傅红烧牛肉面迷你随心杯64g/杯 商品名称
price float 3.2 区域参考价(元)
brand_name string 康师傅 品牌名称
image_url string https://img1.banmahui.cn/1/pimg/x800_v1/sym/6900873000029-e97efebd9ab8eabd05498dcd0fdce231.png 图片

注:brand_name, image_url 字段默认不提供,需要申请对应权限

xml返回示例:

<xml>
    <product_id>6900873000029</product_id>
    <title>康师傅红烧牛肉面迷你随心杯64g/杯</title>
    <price>3.2</price>
    <brand_name>康师傅</brand_name>
    <image_url>https://img1.banmahui.cn/1/pimg/x800_v1/sym/6900873000029-e97efebd9ab8eabd05498dcd0fdce231.png</image_url>
    <charset>UTF-8</charset>
    <version>1.0.0</version>
    <sign_type>MD5</sign_type>
    <nonce_str>5e96ebe2814d7</nonce_str>
    <return_code>SUCCESS</return_code>
    <result_code>SUCCESS</result_code>
    <appid>12012324</appid>
    <sign>4A317BED5450494444A8E2852BB33B45</sign>
</xml>

json返回示例:

{
  "return_code": "SUCCESS",
  "nonce_str": "FvYSnPuFFPkAr77M",
  "appid": "13682463",
  "version": "1.0.0",
  "charset": "UTF-8",
  "sign_type": "MD5",
  "sign": "63238039D6E43634297CF2A6EB5F3B72",
  "result_code": "SUCCESS",
  "product_id": "6900873000029",
  "title": "康师傅红烧牛肉面迷你随心杯64g/杯",
  "price": "3.2",
  "brand_name": "康师傅",
  "image_url": "https://img1.banmahui.cn/1/pimg/x800_v1/sym/6900873000029-e97efebd9ab8eabd05498dcd0fdce231.png"
}

C++ sdk 下载