通过id获取中台的商品详情
POST /app/product/cloud/findProduct注意:
- 只能查询当前应用绑定供应商自己的商品
- 返回数据在
data.reproduct中(不是 list 列表) - 推送商品后通过本接口获取每个规格的中台id(
skus[].id),下单、发货、更新sku都使用这个id
请求体为 JSON
| 字段 | 名称 | 类型 | 是否必须 |
| id | 中台商品id | int | 是 |
金额单位都是分
reproduct(常用字段):
| 字段 | 名称 | 类型 |
| id | 中台商品id | int |
| title | 商品名称 | string |
| image_url | 商品主图 | string |
| price | 供货价 | int |
| cost_price | 成本价 | int |
| origin_price | 市场价 | int |
| guide_price | 指导价 | int |
| activity_price | 营销价 | int |
| maxPrice / minPrice | 规格最高 / 最低供货价 | int |
| stock | 总库存 | int |
| sales | 销量 | int |
| sn | 商品编号 | string |
| code | 自定义编码 | string |
| is_display | 上下架 0下1上 | int |
| single_option | 0多规格1单规格 | int |
| unit | 商品单位 | string |
| barcode | 商品条码 | string |
| freight | 统一运费 | int |
| freight_type | 运费类型 0统一,1模板 | int |
| freight_template_id | 运费模板id | int |
| category1_id / category2_id / category3_id | 一 / 二 / 三级分类id | int |
| supplier_id | 供应商id | int |
| source | 商品来源,云仓推送的商品为98 | int |
| gallery | 商品组图 | array |
| detail_images | 商品详情 | string |
| attrs | 商品属性 | array |
| skus | 商品规格 | array |
gallery:
| type | 1图片 目前只有1 |
| src | 路径 |
attrs:
| name | 属性名称 |
| value | 属性值 |
skus:
| id | 中台规格id,下单、发货、更新sku使用这个id |
| product_id | 商品id |
| title | 规格属性名称 |
| price | 供货价 |
| cost_price | 成本价格 |
| origin_price | 市场价 |
| guide_price | 指导价 |
| activity_price | 营销价格 |
| stock | 库存 |
| weight | 重量 |
| sn | 条码 |
| code | 自定义编码 |
| image_url | 规格图片 |
| options | 规格详情 |
options:
| spec_name | 规格名称 |
| spec_item_name | 规格项名称 |
{ "code": 0, "data": { "reproduct": { "id": 1028620, "created_at": 1634629818, "updated_at": 1634629818, "title": "【包邮】斯雅琪时尚复古水桶包宽带女包", "origin_price": 20200, "guide_price": 20200, "price": 20200, "cost_price": 4370, "activity_price": 0, "stock": 1981, "sales": 0, "sn": "", "code": "", "is_display": 1, "single_option": 0, "desc": "", "image_url": "https://example.com/main.jpg", "unit": "件", "barcode": "", "freight": 0, "freight_type": 1, "maxPrice": 20200, "minPrice": 20200, "gallery": [ { "type": 1, "src": "https://example.com/1.jpg" } ], "detail_images": "", "attrs": [ { "name": "属性名称", "value": "属性值" } ], "skus": [ { "id": 20183, "created_at": 1634629818, "updated_at": 1634629818, "title": "黑色", "price": 20200, "cost_price": 4370, "origin_price": 20200, "guide_price": 20402, "activity_price": 0, "stock": 990, "weight": 0, "is_display": 1, "product_id": 1028620, "supplier_id": 33, "sn": "", "code": "BAG-BLACK", "image_url": "", "options": [ { "spec_name": "颜色", "spec_item_name": "黑色" } ] }, { "id": 20184, "created_at": 1634629818, "updated_at": 1634629818, "title": "卡其色", "price": 20200, "cost_price": 4370, "origin_price": 20200, "guide_price": 20402, "activity_price": 0, "stock": 991, "weight": 0, "is_display": 1, "product_id": 1028620, "supplier_id": 33, "sn": "", "code": "BAG-KHAKI", "image_url": "", "options": [ { "spec_name": "颜色", "spec_item_name": "卡其色" } ] } ], "supplier_id": 33, "gather_supply_id": 0, "category1_id": 1, "category2_id": 8, "category3_id": 62, "freight_template_id": 21, "source": 98 } }, "msg": "操作成功"}以上示例只列出常用字段,实际返回字段更多,未列出的字段无需关注。