~~~[api]
post:/api/goods/update
*string:key#系統頒發的appkey,系統級參數
*string:timestamp#當前時間戳,系統級參數
*string:sign#簽名,系統級參數
*string:caption#商品名稱
*string:miscode#商品在MIS系統中的店內碼
*json_array:barcode_list#商品條碼,例如[1234567,1234567,1234567,.......]
*float:price#商品售價
string:spec#商品規格
string:unit#商品單位
string:status#商品狀態,0-上架,1-下架
string:photo#商品圖片,只能傳url地址,例如http://www.baidu.com
json_array:price_list#價格方案
<<<
success
{"code":"0","msg":"操作成功","data":"59f041ef97872017c800464b"}
code:錯誤碼,0成功,其他失敗
msg:錯誤消息
data:返回值,成功時返回商品在平臺中的唯一標識
<<<
error
{"code":"1000","msg":"缺少XXXX參數","data":""}
~~~
價格方案中對象屬性如下:
*string:begin#開始時間,yyyy-MM-dd hh:mm:ss格式例如2017- 10-10 01:01:01
*string:end#結束時間,yyyy-MM-dd hh:mm:ss格式例如2017- 10-10 01:01:01
*float:price#零售價
int:priority#優先級,數字越大優先級越高
價格方案的價格獲取規則:
1、開始時間 < 當前時間 <= 結束時間
2、優先級最大
備注:平臺會依據miscode進行重復檢查,若miscode已存在則執行更新,否則新增;
**要求所有參數進行url編碼(僅限提交到平臺接口時編碼,簽名時參數無需編碼)**