简要描述:
- 商品详情
请求域名:
- http://xx.com
请求URL:
GET/&route=plugin.erp-api.api.goods.detail.index
参数:
| 参数名 | 是否必须 | 类型 | 说明 |
|---|---|---|---|
| goods_id | 是 | int | 商品id |
返回示例:
正确时返回:
{
"result":1,
"msg":"成功",
"data":{
"id":747,
"title":"1212报名,超声刀、自体脂肪填充二选一加观摩会门票",
"goods_sn":"",
"price":"300.00",
"status":1,
"weight":"0.00",
"real_sales":84,
"created_at":"2018-12-04 15:43:55",
"updated_at":"2019-05-10 09:43:31",
"stock":916,
"cost_price":"50.00",
"type":2,
"sku":"个",
"status_name":"上架",
"options":[
{
"id":7,
"goods_id":747,
"title":"白色",
"product_price":"100.00",
"thumb":"",
"weight":"0.00",
"stock":100,
"skuId":"",
"product_sn":"",
"created_at":null,
"updated_at":null
}
]
}
}
错误时返回:
{
"result": 0,
"msg": "错误信息",
}
返回参数说明:
| 参数名 | 类型 | 说明 |
|---|---|---|
| id | int | 商品id |
| uniacid | int | 店铺id(公众号id) |
| title | string | 商品标题 |
| goods_sn | string | 商品编码 (商品货号) |
| price | float | 价格 |
| status_name | string | 商品状态 |
| weight | float | 重量 |
| real_sales | int | 销量 |
| created_at | string | 创建时间 |
| updated_at | string | 修改时间 |
| stock | int | 库存 |
| cost_price | int | 库存 |
| sku | string | 单位 |
| options | object | 商品规格 |
| options参数名 | 类型 | 说明 |
|---|---|---|
| id | int | 商品规格id |
| goods_id | int | 所属商品id |
| title | string | 规格标题 |
| product_price | string | 规格价格 |
| thumb | string | 规格图片url |
| weight | float | 规格重量 |
| stock | int | 规格库存 |
| skuId | string | sku编码(sku货号) |
| product_sn | string | sku条形码 |
| created_at | int | 创建时间 |
| updated_at | int | 修改时间 |