Skip to content

条码查询

应用场景

根据商品条码查询商品信息,包括商品条码,商品名称,售价中位数(元)。

请求参数

接口名称: item.product.get

参数名称 必填 类型 示例 说明
product_id String(13) 6902022132537 商品条码,支持UPC-A、UPC-E、EAN-13、EAN-8等

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>6902022132537</product_id>
    <sign>D5E5397531111D35C3D7B6BCCB5B991A</sign>
</xml>

json请求示例:

{
  "version": "1.0.0",
  "charset": "UTF-8",
  "sign_type": "MD5",
  "method": "item.product.get",
  "appid": "12012324",
  "nonce_str": "5K8264ILTKCH16CQ",
  "sign": "D5E5397531111D35C3D7B6BCCB5B991A",
  "product_id": "6902022132537"
}

返回结果

参数名称 必填 类型 示例 说明
product_id String(13) 6902022132537 商品条码
title String(255) 蓝月亮彩色衣物色渍净清新柠檬花香600g 商品名称
price Float 15.00 售价中位数(元)
brand_name String(255) 蓝月亮 品牌名称
image_url String(255) https://img1.banmahui.cn/1/pimg/x800_v1/sym/6902022132537-76d86eff1a8f515af07f50a3d54e864d.jpg 主图

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

xml返回示例:

<xml>
    <product_id>6902022132537</product_id>
    <title>蓝月亮彩色衣物色渍净清新柠檬花香600g</title>
    <price>15.00</price>
    <brand_name>蓝月亮</brand_name>
    <image_url>https://img1.banmahui.cn/1/pimg/x800_v1/sym/6902022132537-76d86eff1a8f515af07f50a3d54e864d.jpg</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": "6902022132537",
  "title": "蓝月亮彩色衣物色渍净清新柠檬花香600g",
  "price": "15.00",
  "brand_name": "蓝月亮",
  "image_url": "https://img1.banmahui.cn/1/pimg/x800_v1/sym/6902022132537-76d86eff1a8f515af07f50a3d54e864d.jpg"
}

C++ sdk 下载