POST 创建商品接口

POST /api/v3/product/create

Body 请求参数

  1. {
  2. "sign": "0AC99353A62A7FF9A1F6DC19CA43B8C6",
  3. "public_key": "817C573329FCC180",
  4. "nonce_str": "12345678",
  5. "second_timestamp": "1714370093",
  6. "name": "测试商品",
  7. "category": "时尚女装",
  8. "brand": "",
  9. "min_qty": 1,
  10. "length": 10,
  11. "width": 10,
  12. "height": 10,
  13. "weight": 10,
  14. "unit":"KG",
  15. "tags": "",
  16. "barcode": "",
  17. "refundable": 1,
  18. "photos": "",
  19. "thumbnail_img": "",
  20. "unit_price": "",
  21. "current_stock": "",
  22. "description": "",
  23. "is_strict_selection": 1,
  24. "color": "Aqua,Aquamarine",
  25. "choice":[{"type": "size","value": "XL"},{"type":"Fabric","value":"Aaaa"}],
  26. "stock":[{"qty_Aqua-XL": 10},{"qty_Aqua-M": 6},{"qty_Aquamarine-XL": 5},{"qty_Aquamarine-M": 15}]
  27. }

请求参数

名称 位置 类型 必选 说明
body body object none
» name body string 商品名称
» category body string 类别
» brand body string 品牌
» min_qty body integer 最低采购数量
» length body string 长度
» width body string 宽度
» height body string 高度
» weight body string 重量
» unit body string 单位
» tags body string 标签
» barcode body string 条码
» refundable body string 是否可退款,1:是,0:否
» photos body string 画廊图片
» thumbnail_img body string 缩略图像
» unit_price body string 单价
» current_stock body integer 库存数量
» description body string 描述
» color body string 颜色
» choice body array 属性
» stock body array 库存

返回示例

200 Response

  1. {
  2. "code": 0,
  3. "result": true,
  4. "message": "Save Success",
  5. "data": []
  6. }

返回结果

状态码 状态码含义 说明 数据模型
0 OK 成功 Inline

4.返回数据结构

状态码 0

名称 类型 必选 约束 中文名 说明
» code integer true none none
» result boolean true none none
» message string true none none
» data string true none none