条形码查询 商品条码查询
- 相关
- ISBN书号查询
- 接口:http://api.3023data.com/item/barcode?barcode=6937913311241 / barcode=889652114873
- 方式:GET
- 支持:EAN-13 / UPC / ISBN / EAN-8
- 价格:0.02元/次 价格优惠,最低至3折
- 3折时:0.006元/次
与 多个权威数据源 同步,100%准确
数据来源 source
顺序 | 数据源 | 说明 |
1 | gs1cn | 中国物品编码 |
2 | upc | 美国商品统一代码 |
3 | isbn | 国际标准书号 |
4 | other | 其他 |
系统按照以上顺序调用数据源,首选中国物品编码。
当中国物品编码无相关条码数据时,自动调用其他权威数据源。
条码类型 type
EAN-13 | 13位标准码 |
UPC | UPC条码 |
ISBN | ISBN书号 |
EAN-8 | 8位缩短码 |
自动识别条码类型
请求参数
参数 | 位置 | 必填 | 值 |
key | header | 是 | key |
barcode | url | 是 | 商品条码(8-14位数字) 8/12/13/14位 |
key in request header or url
13位标准码 EAN-13
{ "code": 0, "data": { "barcode": "6937913311241", //条码 "type": "EAN-13", //类型 "name": "润肠胶囊", //商品名称 "spec": "12粒*2板/盒", //规格 "description": "", //说明 "price": "", //价格(建议零售价) "brand": "碧生源", //品牌 "gpc": "药品", //产品分类 "country": "中国", //国家、地区或应用领域 "company": "吉林省银诺克药业有限公司", //公司(发布企业) "addr": "", //公司地址 "importer": "", //进口商 "launch": "2018-10-10", //上市时间 "image": "https://oss.gds.org.cn/userfile/20201010/672731255.png", //商品图片 "prefix": "69379133", //厂商识别代码 "gtin": "http://bc.3023data.com/barcode/gensvg?type=ean13&msg=6937913311241&fmt=png", //条码图片 "source": "gs1cn" //数据来源 } }
UPC条码 UPC
{ "code": 0, "data": { "barcode": "889652114873", "type": "UPC", "name": "Saint Laurent SL 205/K 002 Havana Square Sunglasses", "spec": "57/17/145", "description": "SL 205/K", "price": "184.01 USD", "brand": "SAINT LAURENT", "gpc": "Clothing, Shoes & Jewelry", "country": "", "company": "Saint Laurent", "addr": "", "importer": "", "launch": "", "image": "https://images-na.ssl-images-amazon.com/images/I/31L9hy7vIjL.jpg", "prefix": "", "gtin": "http://bc.3023data.com/barcode/gensvg?type=upca&msg=889652114873&fmt=png", "source": "upc" } }
ISBN书号 ISBN
{ "code": 0, "data": { "barcode": "9787020002207", "type": "ISBN", "name": "红楼梦", //标题 "spec": "1606页", //页数 "description": "平装", //装帧 "price": "59.70元", //定价 "brand": "[清] 曹雪芹 著", //作者 "gpc": "文本/印刷/参考资料", //产品分类 "country": "图书", //应用领域 "company": "人民文学出版社", //出版社 "addr": "", "importer": "", "launch": "1996-12", //出版日期 "image": "https://img1.doubanio.com/view/subject/m/public/s1070959.jpg", //封面图片 "prefix": "97870200", "gtin": "http://bc.3023data.com/barcode/gensvg?type=ean13&msg=9787020002207&fmt=png", "source": "isbn" } } 如需查询图书详细数据,请使用 ISBN书号查询 接口
8位缩短码 EAN-8
{
"code": 0,
"data": {
"barcode": "69021220",
"type": "EAN-8",
"name": "绿箭口香糖",
"spec": "3g×15片",
"description": "复合纸", //包装
"price": "",
"brand": "绿箭",
"gpc": "",
"country": "中国",
"company": "玛氏箭牌糖果(中国)有限公司",
"addr": "",
"importer": "",
"launch": "",
"image": "",
"prefix": "69021220",
"gtin": "http://bc.3023data.com/barcode/gensvg?type=ean8&msg=69021220&fmt=png",
"source": "gs1cn"
}
}
进口商品
{
"code": 0,
"data": {
"barcode": "9555655005265",
"type": "EAN-13",
"name": "麦可利槟城香辣虾汤面",
"spec": "420克",
"description": "",
"price": "",
"brand": "麦可利",
"gpc": "食品/饮料/香烟组合装",
"country": "马来西亚",
"company": "杭州裕联贸易有限公司",
"addr": "",
"importer": "上海擎鹏商贸有限公司", //进口商
"launch": "",
"image": "https://oss.gds.org.cn/userfile/importcpfile/202009091158156459679039074.jpg",
"prefix": "95556550",
"gtin": "http://bc.3023data.com/barcode/gensvg?type=ean13&msg=9555655005265&fmt=png",
"source": "gs1cn"
}
}
条码数据库 MySQL
CREATE TABLE `barcode` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `barcode` char(13) NOT NULL, `name` varchar(512) NOT NULL, `spec` varchar(512) DEFAULT NULL, `brand` varchar(512) DEFAULT NULL, `company` varchar(512) DEFAULT NULL, `gpc` varchar(512) DEFAULT NULL, `description` varchar(512) DEFAULT NULL, `price` varchar(512) DEFAULT NULL, `addr` varchar(512) DEFAULT NULL, `importer` varchar(512) DEFAULT NULL, `launch` varchar(512) DEFAULT NULL, `image` varchar(512) DEFAULT NULL, `source` varchar(32) DEFAULT NULL, `time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), UNIQUE KEY `barcode` (`barcode`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
错误码
302311 | 条码错误 |
302312 | 条码无效 |
302313 | 繁忙 不扣费,稍后重试 |
302314 | 其他错误 不扣费,错误原因(message) |
302303 | 余额不足 |
以上为接口错误码,公共错误码见帮助中心