【创想亚马逊采集】使用API上传功能自动上传数据到接口

| 2024-01-07 07:25:34

By | 2024年1月7日

介绍

20240001版本新增了API上传功能,如果您有开发能力(比如自己开发的ERP系统),通过本功能,可以将采集的数据实时上传到您的接口,实现边采集数据边上传。

本功能限旗舰版可用。

 

使用方法

在软件找到【自动上传】点【上传到API接口】

 

打开API上传设置页

 

把您的服务器接收采集数据的URL地址填写到“接口地址”,如果需要测试数据,可点击【测试提交】,软件会将测试数据提交,你也可以随意采集一份数据来测试数据提交。

填写好接口地址,勾上“开启提交数据到接口”,然后点击“保存设置”即可设置完成。

 

上传方式

只要采集商品详细信息,就会上传数据到接口,无需其他进一步设置。

也支持对采集完的数据进行手动上传操作,如下图:

 

 

开发技术说明

提交数据说明

上传的数据是POST方式发送,参数:

data(商品的JSON数据)

user_email(软件注册邮箱)

bath(上传批次号,每次开启新采集会生成一个新的批次号)

tag (标记文本,在设置上传API接口时可以自定义一串文本,没需要,可不用管)

 

商品JSON数据格式说明:字段为”product”,类型为 array,每个成员,第一个一般是主商品,其余为子商品(变体)的数据,可以通过is_parent字段来判断是否为主商品项,对于没采集到的数据会没有字段信息,例如 title、brand、sku等信息。具体您可以本地搭建一个服务器来接收数据后自行根据数据结果来解析操作,这里不再赘述。

以下是一个商品JSON格式例子:

{"product":[{"is_parent":1,"title":"Artemis Whelping Box for Dogs and Puppies - Large Birthing Supplies - Plastic Panel for Puppy Safety-Washable Kit with Liner-Birth -Containment Birthing and Playpen Boxes (Plus 80 X 40\", White)","remarker":"[已采集详情]","sku":"B08YWPPGJ2-1","brand":"Artemis Whelping","standard_price":"390.00","quantity":"30","color":" White ","point1":"ENHANCED FEATURES: The Artemis Whelping Box kit includes large, high panels to ensure the safety of your pregnant dog and her pups. This product requires no tools and is easy to assemble using the plug panels and rods, giving you the freedom to extend the box if needed.","point2":"QUALITY HIGH-GRADE PLASTIC: Our whelping box is made with original, high-grade plastic that ensures durability and endurance. It is created with three different molding techniques, delivering a longer-lasting product that can be used time and again.","point3":"EASY TO CLEAN: Each element of the Artemis Whelping Box is designed to be easily removed and cleaned. Simply rinse with water, or wipe clean using a cloth, and your item will be ready to use again in no time.","point4":"WHELPING BOX FOR DOGS: This whelping box measures 80 x 40 inches – 22-inch height to offer protection for mother and puppies – removable pig rail – easy to clean panels and connectors.","description":"Size40x40\"80\"x40\"80\"x40\"59\"x59\"Height22\"22\"22\"26\"Hollow Yard ? Extendable ? ? ? ? Including Free Pee Pad ? ? ? ? No Tool set up ? ? ? ? ","unit_size":"in","code":"B08YWPPGJ2","purchase":[{"url":"https:\/\/www.amazon.com\/dp\/B08YWPPGJ2?th=1&psc=1"}],"product_image":[{"image_url":"https:\/\/m.media-amazon.com\/images\/I\/217AY74b5oL._AC_.jpg","order":"1"},{"image_url":"https:\/\/m.media-amazon.com\/images\/I\/2171TCR+tuL._AC_.jpg","order":"2"},{"image_url":"https:\/\/m.media-amazon.com\/images\/I\/315TD85w12L._AC_.jpg","order":"3"},{"image_url":"https:\/\/m.media-amazon.com\/images\/I\/21ZnfbzqsPL._AC_.jpg","order":"4"},{"image_url":"https:\/\/m.media-amazon.com\/images\/I\/41XegBwm-IL._AC_.jpg","order":"5"},{"image_url":"https:\/\/m.media-amazon.com\/images\/I\/21305U4NsML._AC_.jpg","order":"6"},{"image_url":"https:\/\/m.media-amazon.com\/images\/I\/41jFaeY2pcL._AC_.jpg","order":"7"},{"image_url":"https:\/\/m.media-amazon.com\/images\/I\/21ueWQTFeiL._AC_.jpg","order":"8"}],"currency":"美元","nodeid":["3024198011"],"code_type":"ASIN","weight":"","lenght":"78.74","width":"39.37","height":"21.65"},{"is_parent":0,"title":"Artemis Whelping Box for Dogs and Puppies - Large Birthing Supplies - Plastic Panel for Puppy Safety-Washable Kit with Liner-Birth -Containment Birthing and Playpen Boxes (Plus 80 X 40\", White)","remarker":"[已采集详情]","sku":"B08YWPPGJ2-1","brand":"Artemis Whelping","standard_price":"390.00","quantity":"30","color":" White ","point1":"ENHANCED FEATURES: The Artemis Whelping Box kit includes large, high panels to ensure the safety of your pregnant dog and her pups. This product requires no tools and is easy to assemble using the plug panels and rods, giving you the freedom to extend the box if needed.","point2":"QUALITY HIGH-GRADE PLASTIC: Our whelping box is made with original, high-grade plastic that ensures durability and endurance. It is created with three different molding techniques, delivering a longer-lasting product that can be used time and again.","point3":"EASY TO CLEAN: Each element of the Artemis Whelping Box is designed to be easily removed and cleaned. Simply rinse with water, or wipe clean using a cloth, and your item will be ready to use again in no time.","point4":"WHELPING BOX FOR DOGS: This whelping box measures 80 x 40 inches – 22-inch height to offer protection for mother and puppies – removable pig rail – easy to clean panels and connectors.","description":"Size40x40\"80\"x40\"80\"x40\"59\"x59\"Height22\"22\"22\"26\"Hollow Yard ? Extendable ? ? ? ? Including Free Pee Pad ? ? ? ? No Tool set up ? ? ? ? ","unit_size":"in","code":"B08YWPPGJ2","purchase":[{"url":"https:\/\/www.amazon.com\/dp\/B08YWPPGJ2?th=1&psc=1"}],"product_image":[{"image_url":"https:\/\/m.media-amazon.com\/images\/I\/217AY74b5oL._AC_.jpg","order":"1"},{"image_url":"https:\/\/m.media-amazon.com\/images\/I\/2171TCR+tuL._AC_.jpg","order":"2"},{"image_url":"https:\/\/m.media-amazon.com\/images\/I\/315TD85w12L._AC_.jpg","order":"3"},{"image_url":"https:\/\/m.media-amazon.com\/images\/I\/21ZnfbzqsPL._AC_.jpg","order":"4"},{"image_url":"https:\/\/m.media-amazon.com\/images\/I\/41XegBwm-IL._AC_.jpg","order":"5"},{"image_url":"https:\/\/m.media-amazon.com\/images\/I\/21305U4NsML._AC_.jpg","order":"6"},{"image_url":"https:\/\/m.media-amazon.com\/images\/I\/41jFaeY2pcL._AC_.jpg","order":"7"},{"image_url":"https:\/\/m.media-amazon.com\/images\/I\/21ueWQTFeiL._AC_.jpg","order":"8"}],"currency":"美元","nodeid":["3024198011"],"code_type":"ASIN","weight":"","lenght":"78.74","width":"39.37","height":"21.65"}]}

 

 

服务器需返回数据说明

服务器只需要返回JSON {“error”: 0} 即可,其中0代表成功 如果返回其他数字,软件会认为此次上传失败,并且会将错误代码输出到【上传状态】里,可随时查看方便调试。请确保服务器不要返回空数据。

 

如何自定义JSON格式?

本软件暂未提供自定义字段的功能,如果需要修改格式,请自己在服务器开发数据转换的功能。

 

如何增加字段?

目前只会提交常规的数据,如果有您需要的字段,请点击【意见反馈】反馈给我们。

 

为什么接收不到数据?

  1. 检查服务器接口是否可用,可以先测试
  2. 检查是否防火墙拦截、网络异常、VPN有问题等情况