POST 创建商品接口
POST /api/v3/product/create
Body 请求参数
{"sign": "0AC99353A62A7FF9A1F6DC19CA43B8C6","public_key": "817C573329FCC180","nonce_str": "12345678","second_timestamp": "1714370093","name": "测试商品","category": "时尚女装","brand": "","min_qty": 1,"length": 10,"width": 10,"height": 10,"weight": 10,"unit":"KG","tags": "","barcode": "","refundable": 1,"photos": "","thumbnail_img": "","unit_price": "","current_stock": "","description": "","is_strict_selection": 1,"color": "Aqua,Aquamarine","choice":[{"type": "size","value": "XL"},{"type":"Fabric","value":"Aaaa"}],"stock":[{"qty_Aqua-XL": 10},{"qty_Aqua-M": 6},{"qty_Aquamarine-XL": 5},{"qty_Aquamarine-M": 15}]}
请求参数
| 名称 | 位置 | 类型 | 必选 | 说明 |
|---|---|---|---|---|
| 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
{"code": 0,"result": true,"message": "Save Success","data": []}
返回结果
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 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 |
