简要描述
请求url
https://www.商城域名.com/index.php?s=/api/goods/basic
请求方式
是否需授权登录
请求header
参数名 |
类型 |
是否必须 |
示例值 |
说明 |
storeId |
int |
必填 |
10001 |
商城ID |
platform |
string |
必填 |
H5 |
当前请求的客户端(APP、小程序、H5等) |
Access-Token |
string |
选填 |
- |
当前登录用户的 Token |
请求参数
参数名 |
类型 |
是否必须 |
示例值 |
说明 |
goodsId |
int |
必填 |
10001 |
商品ID |
返回示例
{
"status": 200,
"message": "success",
"data": {
"detail": {
"goods_id": 10020,
"goods_name": "耐克 男子 NIKE AIR FORCE 1'07 运动鞋",
"goods_no": "",
"video_id": 0,
"video_cover_id": 0,
"selling_point": "",
"spec_type": 20,
"goods_price_min": "599.00",
"goods_price_max": "599.00",
"line_price_min": "999.00",
"line_price_max": "999.00",
"stock_total": 6969,
"content": "<p><img src=\"https://img30.360buyimg.com/popWaterMark/jfs/t21079/308/1123537364/204877/c72aad08/5b2091e8N5871b64d.jpg.dpg\"/></p>",
"delivery_id": 10001,
"is_points_gift": 1,
"is_points_discount": 1,
"is_alone_points_discount": 0,
"points_discount_config": "",
"is_enable_grade": 1,
"is_alone_grade": 0,
"alone_grade_equity": [],
"status": 10,
"is_ind_dealer": 0,
"dealer_money_type": 10,
"first_money": "0.00",
"second_money": "0.00",
"third_money": "0.00",
"goods_images": [
{
"file_id": 10378,
"file_type": 10,
"preview_url": "b72822760ccc4bb892cc658b33af939e.jpg",
"external_url": "b72822760ccc4bb892cc658b33af939e.jpg"
},
{
"file_id": 10381,
"file_type": 10,
"preview_url": "e8f48e56ccd8dc60c883fc8fe06d6149.png",
"external_url": "e8f48e56ccd8dc60c883fc8fe06d6149.png"
},
{
"file_id": 10377,
"file_type": 10,
"preview_url": "b3393458e9a9bd2459303e501958f0a3.jpg",
"external_url": "b3393458e9a9bd2459303e501958f0a3.jpg"
}
],
"goods_image": "b72822760ccc4bb892cc658b33af939e.jpg",
"goods_sales": 40,
"is_user_grade": false
}
}
}
返回参数
参数名 |
类型 |
示例值 |
说明 |
status |
int |
200 |
请求状态(200:请求成功;500:请求错误/失败) |
message |
string |
success |
请求结果的信息,默认为 success |
data |
object |
- |
返回的业务数据 |
data 参数
参数名 |
类型 |
示例值 |
说明 |
detail |
object |
- |
商品详情 |
data.detail 参数
参数名 |
类型 |
示例值 |
说明 |
goods_id |
int |
10020 |
商品ID |
goods_name |
string |
耐克 男子 NIKE AIR FORCE 1'07 运动鞋 |
商品标题/名称 |
goods_no |
string |
- |
商品编号 |
video_id |
int |
- |
主图视频ID |
video_cover_id |
int |
- |
主图视频封面ID |
selling_point |
string |
- |
商品卖点 |
spec_type |
int |
20 |
商品规格 (10单规格 20多规格) |
goods_price_min |
string |
599.00 |
商品价格 (最低) |
goods_price_max |
string |
599.00 |
商品价格 (最高) |
line_price_min |
string |
999.00 |
划线价格 (最低) |
line_price_max |
string |
999.00 |
划线价格 (最高) |
stock_total |
int |
6969 |
库存总量 (包含所有sku) |
content |
string |
- |
详情页内容 |
delivery_id |
int |
10001 |
配送模板ID |
is_points_gift |
int |
1 |
是否开启积分赠送 (1开启 0关闭) |
is_points_discount |
int |
1 |
是否允许使用积分抵扣 (1允许 0不允许) |
is_enable_grade |
int |
1 |
是否开启会员折扣 (1开启 0关闭) |
is_alone_grade |
int |
- |
会员折扣设置 (0默认等级折扣 1单独设置折扣) |
alone_grade_equity |
array |
- |
单独设置折扣的配置 |
status |
int |
10 |
商品状态 (10上架 20下架) |
is_ind_dealer |
int |
- |
是否开启单独分销 (0关闭 1开启) |
dealer_money_type |
int |
10 |
分销佣金类型 (10百分比 20固定金额) |
first_money |
string |
0.00 |
分销佣金 (一级) |
second_money |
string |
0.00 |
分销佣金 (二级) |
third_money |
string |
0.00 |
分销佣金 (三级) |
goods_images |
array |
- |
商品轮播图 |
goods_image |
string |
b72822760ccc4bb892cc658b33af939e.jpg |
商品主图URL |
goods_sales |
int |
40 |
显示销量 (初始销量 + 实际销量) |
is_user_grade |
boolean |
false |
是否使用会员等级折扣价(判断登录用户的会员等级) |
data.detail.goods_images 参数
参数名 |
类型 |
示例值 |
说明 |
file_id |
int |
10378 |
图片文件ID |
file_type |
int |
10 |
文件类型 (10图片) |
preview_url |
string |
b72822760ccc4bb892cc658b33af939e.jpg |
图片预览地址 |