接口 cabinet.product.stock.with.replenishment
接口说明
获取设备商品库存及补货信息(含个人库存和运营商平均价格)
业务参数
| 参数名称 |
类型 |
是否必须 |
说明 |
| cid |
string |
Y |
自取柜 ID |
| accountId |
string |
Y |
补货员账号 ID,用于查询个人库存 |
| page |
number |
N |
页码,默认 1 |
| pageSize |
number |
N |
每页数量,默认 10 |
请求示例
{
"cid": "6512e7feaf643c001041ed06",
"accountId": "660641dae4f5df001010f240",
"page": 2,
"pageSize": 2
}
返回示例
{
"error_code": 0,
"error_msg": "SUCCESS",
"sub_error_code": null,
"sub_error_msg": null,
"data": {
"total": 46,
"per_page": 2,
"current_page": 2,
"last_page": 23,
"from": 2,
"to": 4,
"data": [
{
"OID": "660641dae4f5df001010f240",
"CID": "6512e7feaf643c001041ed06",
"BarCode": "6921294392685",
"ProviderProductID": "6921294392685",
"Price": 100,
"OnShelvesTime": 1757575728,
"Stock": 0,
"SalesCount": 0,
"Capacity": 0,
"BrandPrice": 0,
"CreateAt": 1757575728,
"UpdatedAt": 1759041609,
"id": "68c27a301a5cde00145c71dd",
"ProductVO": {
"Name": "康师傅酸梅汤瓶装500ml",
"ImageUrl": "https://res.yopoint.com/product/20170717/0b4893146a463e74d243fd5310722330.png",
"ImageFixWidthUrl": "https://res.yopoint.com/product/20170717/22e46f27dc7316fbd7c18d1a65fbf76e.png",
"BarCode": "6921294392685",
"Price": 100
},
"OperatorPrice": 100,
"ReplenishStock": 0,
"AccountStock": 0,
"AvgPrice": 95,
"CargoList": [
{
"Row": 6,
"Col": 8,
"BarCode": "6921294392685",
"ProviderProductID": "6921294392685",
"ProductVO": {
"Name": "康师傅酸梅汤瓶装500ml",
"ImageUrl": "https://res.yopoint.com/product/20170717/0b4893146a463e74d243fd5310722330.png",
"ImageFixWidthUrl": "https://res.yopoint.com/product/20170717/22e46f27dc7316fbd7c18d1a65fbf76e.png",
"Price": 100
},
}
]
}
]
}
}
返回字段说明
| 字段名称 |
类型 |
说明 |
| total |
number |
总记录数 |
| per_page |
number |
每页数量 |
| current_page |
number |
当前页码 |
| last_page |
number |
最后一页页码 |
| from |
number |
起始位置 |
| to |
number |
结束位置 |
| data |
array |
商品列表 |
| data[].id |
string |
商品库存记录 ID |
| data[].CID |
string |
自取柜 ID |
| data[].OID |
string |
运营商 ID |
| data[].BarCode |
string |
商品条码 |
| data[].ProviderProductID |
string |
第三方供应商商品 ID |
| data[].Price |
number |
售价,单位:分(优先使用品牌价格) |
| data[].OperatorPrice |
number |
运营商价格,单位:分 |
| data[].BrandPrice |
number |
品牌价格,单位:分 |
| data[].OnShelvesTime |
number |
上架时间戳(秒) |
| data[].Stock |
number |
当前库存 |
| data[].ReplenishStock |
number |
补货时的库存 |
| data[].SalesCount |
number |
已售数量 |
| data[].Capacity |
number |
货道容量 |
| data[].AccountStock |
number |
补货员个人库存(需提供 accountId) |
| data[].AvgPrice |
number |
运营商平均进货价,单位:分 |
| data[].CreateAt |
number |
创建时间戳(秒) |
| data[].UpdatedAt |
number |
更新时间戳(秒) |
| data[].ProductVO |
object |
商品详细信息 |
| data[].ProductVO.Name |
string |
商品名称 |
| data[].ProductVO.ImageUrl |
string |
商品图片链接 |
| data[].ProductVO.ImageFixWidthUrl |
string |
商品固定宽度图片链接 |
| data[].ProductVO.BarCode |
string |
商品条码 |
| data[].ProductVO.Price |
number |
商品价格,单位:分 |
| data[].CargoList |
array |
货道列表 |
| data[].CargoList[].Row |
number |
货道行号 |
| data[].CargoList[].Col |
number |
货道列号 |
| data[].CargoList[].BarCode |
string |
货道商品条码 |
| data[].CargoList[].ProviderProductID |
string |
第三方供应商商品 ID |
| data[].CargoList[].ProductVO |
object |
货道商品信息(结构同 data[].ProductVO) |
错误代码
| error_msg |
描述 |
| 缺少参数cid |
缺少自取柜 ID |
| 缺少参数accountId |
缺少补货员账号 ID |
| ERR_CABINET_NOT_FOUND |
自取柜不存在 |