跳转到内容

通过id获取中台的商品详情

POST /app/product/cloud/findProduct

注意:

  1. 只能查询当前应用绑定供应商自己的商品
  2. 返回数据在 data.reproduct 中(不是 list 列表)
  3. 推送商品后通过本接口获取每个规格的中台id(skus[].id),下单、发货、更新sku都使用这个id

请求体为 JSON

字段名称类型是否必须
id中台商品idint是

金额单位都是分

reproduct(常用字段):

字段名称类型
id中台商品idint
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_option0多规格1单规格int
unit商品单位string
barcode商品条码string
freight统一运费int
freight_type运费类型 0统一,1模板int
freight_template_id运费模板idint
category1_id / category2_id / category3_id一 / 二 / 三级分类idint
supplier_id供应商idint
source商品来源,云仓推送的商品为98int
gallery商品组图array
detail_images商品详情string
attrs商品属性array
skus商品规格array

gallery:

type1图片 目前只有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": "操作成功"
}

以上示例只列出常用字段,实际返回字段更多,未列出的字段无需关注。