聚星API对接
聚星OS-盘古开放平台API
必读:各开发人员注意,对接聚星OS,我方提供的淘宝文档是让你来看他的报文结构的,并不是让你传淘宝,实际整理后传入还是传入我们提供的接收地址的。只是我们公司之前和淘宝对接过,你只要整理的报文和淘宝的文档结构相同,你传我司接收地址我司自然会返回成功 。
公共参数为我方提供。
- 货主ID,我司提供
- 仓库ID,我司提供
- 请求地址请不要使用淘宝的请求地址,请求地址如下
customerId此字段和货主ID内容相同要拼在请求地址中
其它的什么MD5,APPkey不管你想传什么都可以,可以不动
METHOD这个要注意这个是方法名一定要传对,请根据下面的淘宝参考文档中的方法名拼进去不要拼错。
- 商品接口文档如下
(1)(用不上的可以不传,正常能用的到的是货品编码,产品名字,规格 名字
(2)文档链接https://open.taobao.com/api.htm?docId=25998&docType=2
以上为别的公司传过来的报文供参考 。
必要字段
actionType 更新方式默认add
warehouseCode 仓库ID(我司提供)
ownerCode 货主ID(我司提供)
itemCode 货品编码 ,你传你货品ID也行,不同货品不同ID,唯一性
itemName 商品名称(秋冬大衣)也可以是规格名称(黑色XL)
barCode 有就传没有可不传产品自带的条形码
itemType 默认正品ZC
以上为必录字段,其它不用传。
参考示例:
<?xml version="1.0" encoding="utf-8"?>
<request>
<actionType>add</actionType>
<warehouseCode>1038</warehouseCode>
<ownerCode>404781084</ownerCode>
<item>
<itemCode>2.100102.00381</itemCode>
<itemId />
<itemName>DEM-F325 加湿器</itemName>
<barCode>2.100102.00381</barCode>
<length>0.00</length>
<width>0.00</width>
<height>0.00</height>
<volume>0.000</volume>
<grossWeight>0.000</grossWeight>
<categoryId>100102</categoryId>
<categoryName>加湿器</categoryName>
<itemType>ZC</itemType>
<tagPrice>0.00</tagPrice>
<retailPrice>0.00</retailPrice>
<purchasePrice>0.00</purchasePrice>
<isSNMgmt>N</isSNMgmt>
<isShelfLifeMgmt>N</isShelfLifeMgmt>
<isAreaSale>N</isAreaSale>
</item>
</request>
返回结果示例
正常示例:
<response>
<flag>success</flag>
<code>0</code>
<message>invalid appkey</message>
<itemId>CH123</itemId>
</response>
异常示例:
<error_response>
<code>50</code>
<msg>Remote service error</msg>
<sub_code>isv.invalid-parameter</sub_code>
<sub_msg>非法参数</sub_msg>
</error_response>
- 订单摧送接口文档地址
http://www.jxwms.net/api/v1/openapi/wms/wmsnotify/9?app_key=21363512&method=deliveryorder.create&v=2.0&format=xml&sign_method=md5&customerId=82073683308314625&sign=935F3ED8AF103570E868DD262E4BD36C×tamp=2020-09-29+13%3A38%3A26
- 以下为摧送过来的报文参考
必要字段
deliveryOrderCode 传你的订单号
orderType 默认JYCK
warehouseCode 仓库ID(我司提供)
sourcePlatformCode 默认API(订单来源)
createTime 传你当前时间值
placeOrderTime 传订单付款时间
operateTime 传你当前时间值
shopNick 随便录(不重要,但要有)固定也行
logisticsCode 物流公司按文档录入(ZTO中通)
ownerCode 货主ID(我司提供)
itemCode 货品编码 ,你传你货品ID也行,不同货品不同ID,唯一性
itemName 商品名称(秋冬大衣)也可以是规格名称(黑色XL)
发件人信息自行安排
收件人自行安排(省市 区地址 要规范,省市区三个要限制长度,不要搞个500字符以上,电话不能为空,姓名也是)
商品级
Quantity 数量(必录)
ownerCode 货主ID,我司提供
itemCode 商品编码(可传商品ID但不同商品不可从复)
参考报文:
<?xml version="1.0" encoding="utf-8"?>
<request>
<deliveryOrder>
<deliveryOrderCode>ps2009260130</deliveryOrderCode>
<preDeliveryOrderCode />
<preDeliveryOrderId />
<orderType>JYCK</orderType>
<warehouseCode>15</warehouseCode>
<orderFlag />
<sourcePlatformCode>TB</sourcePlatformCode>
<sourcePlatformName>淘宝</sourcePlatformName>
<buyerMessage />
<sellerMessage />
<createTime>2020-09-26 13:53:08</createTime>
<placeOrderTime>2020-09-26 13:40:58</placeOrderTime>
<payTime>2020-09-26 13:41:02</payTime>
<payNo>2020092622001116881459717308</payNo>
<shopNick>四海母婴专营店</shopNick>
<sellerNick>四海</sellerNick>
<buyerNick>阿飞88111</buyerNick>
<operatorName>四海</operatorName>
<totalAmount>39.9</totalAmount>
<arAmount>0</arAmount>
<itemAmount>39.9</itemAmount>
<discountAmount>0</discountAmount>
<freight>0</freight>
<logisticsCode>YTO</logisticsCode>
<logisticsName>圆通</logisticsName>
<expressCode />
<operateTime>2020-09-26 13:53:08</operateTime>
<isUrgency>N</isUrgency>
<invoiceFlag>N</invoiceFlag>
<senderInfo>
<company />
<name>四海</name>
<zipCode />
<tel>010-56133684</tel>
<mobile>010-56133684</mobile>
<countryCode />
<province>北京</province>
<city>北京市</city>
<area>朝阳区</area>
<town>朝阳区</town>
<detailAddress>北京市</detailAddress>
</senderInfo>
<receiverInfo>
<name>金祖飞</name>
<zipCode>000000</zipCode>
<tel>15068648811</tel>
<mobile>15068648811</mobile>
<countryCode>CN</countryCode>
<province>浙江省</province>
<city>台州市</city>
<area>玉环市</area>
<town>楚门镇</town>
<detailAddress>浙江省 台州市 玉环市 楚门镇彭宅村蔡家良志阀门隔壁纸板厂收</detailAddress>
<idType>1</idType>
</receiverInfo>
<remark />
</deliveryOrder>
<orderLines>
<orderLine>
<orderLineNo>1</orderLineNo>
<ownerCode>50</ownerCode>
<itemCode>8001436-0</itemCode>
<itemId>8001436-0</itemId>
<itemName>强生婴儿牛奶沐浴露1000克 BMR EC6907376506393</itemName>
<planQty>1</planQty>
<sourceOrderCode>1269638281512926257</sourceOrderCode>
<subSourceOrderCode>1269638281512926257</subSourceOrderCode>
<actualPrice>59.9</actualPrice>
<batchCode />
</orderLine>
</orderLines>
</request>
- 物流返回同步接口,
- 你们要提供一下URL接收地址,我把我们返回的格式发在下面,你们收到直接解析即可
以下为我们返回时的报文格式。(以下信息收到后只解析自己要的就可以)
<request><deliveryOrder><deliveryOrderCode>JY2009260440</deliveryOrderCode><deliveryOrderId>JY202009260122419</deliveryOrderId><warehouseCode>15</warehouseCode><orderType>JYCK</orderType><status>DELIVERED</status><outBizCode>1601100137</outBizCode><confirmType>0</confirmType><orderConfirmTime></orderConfirmTime><operatorCode></operatorCode><operatorName></operatorName><operateTime></operateTime><storageFee></storageFee><invoices><invoice><header></header><amount></amount><content></content><detail><items><item><itemName></itemName><unit></unit><price></price><quantity></quantity><amount></amount></item></items></detail><code></code><number></number></invoice></invoices></deliveryOrder><packages><package><logisticsCode>YTO</logisticsCode><logisticsName>菜鸟-圆通</logisticsName><expressCode>YT4815765342047</expressCode><packageCode></packageCode><length></length><width></width><height></height><theoreticalWeight></theoreticalWeight><weight></weight><volume></volume><invoiceNo></invoiceNo><packageMaterialList><packageMaterial><type></type><quantity></quantity></packageMaterial></packageMaterialList><items><item><itemCode>S190013</itemCode><itemId>75378204784721921</itemId><quantity>2</quantity></item><item><itemCode>6971278390527</itemCode><itemId>75384303520841729</itemId><quantity>1</quantity></item><item><itemCode>6971278390565</itemCode><itemId>75384306070978561</itemId><quantity>1</quantity></item><item><itemCode>6971278390947</itemCode><itemId>75384321992556545</itemId><quantity>1</quantity></item><item><itemCode>6971278390923</itemCode><itemId>75384325968756737</itemId><quantity>1</quantity></item><item><itemCode>6971278391166</itemCode><itemId>75384343249289217</itemId><quantity>1</quantity></item><item><itemCode>6924010070348</itemCode><itemId>75849290336960513</itemId><quantity>1</quantity></item></items></package></packages><orderLines><orderLine><orderLineNo></orderLineNo><orderSourceCode></orderSourceCode><subSourceCode></subSourceCode><ownerCode>75245869527465985</ownerCode><itemCode>S190013</itemCode><itemId>75378204784721921</itemId><snList><sn></sn></snList><inventoryType>ZP</inventoryType><itemName></itemName><extCode></extCode><planQty>2</planQty><actualQty>2</actualQty><retailPrice>0</retailPrice><actualPrice>0</actualPrice><discountAmount>0</discountAmount><batchCode></batchCode><productDate></productDate><expireDate></expireDate><produceCode></produceCode><qrCode></qrCode></orderLine><orderLine><orderLineNo></orderLineNo><orderSourceCode></orderSourceCode><subSourceCode></subSourceCode><ownerCode>75245869527465985</ownerCode><itemCode>6971278390527</itemCode><itemId>75384303520841729</itemId><snList><sn></sn></snList><inventoryType>ZP</inventoryType><itemName></itemName><extCode></extCode><planQty>1</planQty><actualQty>1</actualQty><retailPrice>0</retailPrice><actualPrice>0</actualPrice><discountAmount>0</discountAmount><batchCode></batchCode><productDate></productDate><expireDate></expireDate><produceCode></produceCode><qrCode></qrCode></orderLine><orderLine><orderLineNo></orderLineNo><orderSourceCode></orderSourceCode><subSourceCode></subSourceCode><ownerCode>75245869527465985</ownerCode><itemCode>6971278390565</itemCode><itemId>75384306070978561</itemId><snList><sn></sn></snList><inventoryType>ZP</inventoryType><itemName></itemName><extCode></extCode><planQty>1</planQty><actualQty>1</actualQty><retailPrice>0</retailPrice><actualPrice>0</actualPrice><discountAmount>0</discountAmount><batchCode></batchCode><productDate></productDate><expireDate></expireDate><produceCode></produceCode><qrCode></qrCode></orderLine><orderLine><orderLineNo></orderLineNo><orderSourceCode></orderSourceCode><subSourceCode></subSourceCode><ownerCode>75245869527465985</ownerCode><itemCode>6971278390947</itemCode><itemId>75384321992556545</itemId><snList><sn></sn></snList><inventoryType>ZP</inventoryType><itemName></itemName><extCode></extCode><planQty>1</planQty><actualQty>1</actualQty><retailPrice>0</retailPrice><actualPrice>0</actualPrice><discountAmount>0</discountAmount><batchCode></batchCode><productDate></productDate><expireDate></expireDate><produceCode></produceCode><qrCode></qrCode></orderLine><orderLine><orderLineNo></orderLineNo><orderSourceCode></orderSourceCode><subSourceCode></subSourceCode><ownerCode>75245869527465985</ownerCode><itemCode>6971278390923</itemCode><itemId>75384325968756737</itemId><snList><sn></sn></snList><inventoryType>ZP</inventoryType><itemName></itemName><extCode></extCode><planQty>1</planQty><actualQty>1</actualQty><retailPrice>0</retailPrice><actualPrice>0</actualPrice><discountAmount>0</discountAmount><batchCode></batchCode><productDate></productDate><expireDate></expireDate><produceCode></produceCode><qrCode></qrCode></orderLine><orderLine><orderLineNo></orderLineNo><orderSourceCode></orderSourceCode><subSourceCode></subSourceCode><ownerCode>75245869527465985</ownerCode><itemCode>6971278391166</itemCode><itemId>75384343249289217</itemId><snList><sn></sn></snList><inventoryType>ZP</inventoryType><itemName></itemName><extCode></extCode><planQty>1</planQty><actualQty>1</actualQty><retailPrice>0</retailPrice><actualPrice>0</actualPrice><discountAmount>0</discountAmount><batchCode></batchCode><productDate></productDate><expireDate></expireDate><produceCode></produceCode><qrCode></qrCode></orderLine><orderLine><orderLineNo></orderLineNo><orderSourceCode></orderSourceCode><subSourceCode></subSourceCode><ownerCode>75245869527465985</ownerCode><itemCode>6924010070348</itemCode><itemId>75849290336960513</itemId><snList><sn></sn></snList><inventoryType>ZP</inventoryType><itemName></itemName><extCode></extCode><planQty>1</planQty><actualQty>1</actualQty><retailPrice>0</retailPrice><actualPrice>0</actualPrice><discountAmount>0</discountAmount><batchCode></batchCode><productDate></productDate><expireDate></expireDate><produceCode></produceCode><qrCode></qrCode></orderLine></orderLines></request>
响应示例
XML
<response>
<flag>success</flag>
<code>0</code>
<message>invalid appkey</message>
</response>
异常示例
XML
<error_response>
<code>50</code>
<msg>Remote service error</msg>
<sub_code>isv.invalid-parameter</sub_code>
<sub_msg>非法参数</sub_msg>
</error_response>
- 单据取消接口如下
taobao.qimen.order.cancel( 单据取消接口 )
文档链接:https://open.taobao.com/api.htm?docId=26000&docType=2
说明:为小程序第三方网站因退款主动发起取消订单 消息给仓库 系统,仓库接收后反馈是否成功。相关必录项参考淘宝文档。
- 库存查询接口
taobao.qimen.inventory.query( 库存查询接口(多商品) )
文档链接:https://open.taobao.com/api.htm?docId=25999&docType=2
说明:小程序网站和第三方网站通过此接口调取到系统库存使用情况,同步线上商城的库存值 ,不超卖。不可实实调取,次数太多会被 拒绝,正常为一天调取一次即可。