获取-商品详情-库存
GET
/goods/stock/{id}
小兔鲜电商/商品相关
请求参数
Path 参数
id
string
skuID
示例值:
300248016
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request GET '/goods/stock/300248016'
返回响应
🟢200成功
application/json
Body
code
string
业务状态码
msg
string
响应消息
result
object
响应结果
nowPrice
integer
商品最新价格
oldPrice
null
商品原始价格
stock
integer
商品库存数
discount
null
商品折扣
isEffective
boolean
商品是否有效
示例
{
"code": "1",
"msg": "操作成功",
"result": {
"nowPrice": 199,
"oldPrice": null,
"stock": 4912,
"discount": null,
"isEffective": true
}
}