批量查询分类库存
更新时间: 2023-09-14 20:38:13 访问次数:2277
接口说明
此接口支持查询分类库存,包括良品、不良品;2B、2C;组织等分类,支持组合不同分类进行查询
使用场景
用户可以查询指定万邑通海外仓的分类库存状态,并更新已变化的库存
接口名称
winit.inventory.type.batch.query
请求说明
| 请求内容 | 说明 |
|---|---|
| URL | https://openapi.winit.com.cn/openapi/service |
| 接口测试 | https://sandboxopenapi.winit.com.cn/openapi/service |
| 验证方法 | Token,md5 |
| 格式 | json |
| 字符编码 | UTF-8 |
| http请求方式 | http |
| 请求数限制 | 默认每分钟1000,1000有需要可申请加大。 |
请求入参
| 名称 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
| warehouseCode | String(20) | Y | 仓库编码 开通仓群时,请传主仓 |
US0001 |
| merchandises | Array | Y | 商品,最少一个,最大500 | |
| –|merchandiseCode | String(100) | Y | 商品编码 | SKU001 |
| –|specification | String(40) | N | 规格,没有时为空,与商品编码组合代表一个商品 | |
| inventoryAttribute | Object | N | 库存属性 | |
| –|merchandiseGrade | String(30) | N | 商品等级(库存管理分类), 良品:GOOD 不良品:DEFECTIVE |
GOOD |
| –|skuCodeThird | String(30) | N | 库存条码值(库存管理分类) 第三方商品条码,如barcode |
AS001 |
| –|batchManagerType | String | N | 批次属性, 按批次查询时需要和批次日期和产品批次号一起查询,仅传一个无效 | PD |
| –|batchDate | String(20) | N | 批次日期(库存管理分类), 与批次属性一起使用,仅传一个无效 |
20230101 |
| –|packingBatchNo | String(50) | N | 产品批次号,与批次属性一起使用 实物批次号 |
LOT001 |
| aggregateInvManagerTypes | Array | N | 聚合的库存管理分类,当传入了聚合分类时,具体分类的值请不要输入 支持分类: 条码值管理:SKU_CODE_THIRD 批次: BATCH 商品等级:MERCHANDISE_GRADE |
请求示例
按库存管理分类条件查询
{"action": "winit.inventory.type.pageInv","app_key": "rebecca","data": {"warehouseCodes": "US0001","serviceType": "2C","merchandiseCode": "xxxxx","specification": null,"inventoryAttribute":{"skuCodeThird": "xxxxx","merchandiseGrade": "GOOD","organization": "xxxxx"}},"format": "json","language": "zh_CN","platform": "sw","sign": "00000000000000000000000000000000","sign_method": "md5","timestamp": "2021-10-25 09:58:35","version": "1.0"}
聚合库存管理分类查询
{"action": "winit.inventory.type.pageInv","app_key": "rebecca","data": {"warehouseCodes": "US0001","serviceType": "2C","merchandiseCode": "xxxxx","specification": null,"aggregateInvManagerTypes": ["MERCHANDISE_GRADE","SKU_CODE_THIRD"]},"format": "json","language": "zh_CN","platform": "sw","sign": "00000000000000000000000000000000","sign_method": "md5","timestamp": "2021-10-25 09:58:35","version": "1.0"}
返回出参
返回参数说明:正确的返回编码code:0及结果data,错误的返回错误码及错误信息msg。
| 名称 | 类型 | 必传 | 说明 | 示例 |
|---|---|---|---|---|
| version | String(25) | Y | 版本号,唯一,日期格式+唯一序列 yyyyMMddHHmmssSSS + 4位数字 |
|
| merchandiseSerno | String(30) | Y | 商品条码 | M码 |
| merchandiseCode | String(100) | Y | 商品编码 | |
| specification | String(100) | N | 商品规格 | |
| warehouseCode | String(20) | Y | 仓库编码 | |
| isActive | String(1) | Y | 是否有效 | |
| merchandiseGrade | String | N | 商品等级 | |
| organization | string | N | 组织 | |
| skuCodeThird | String(30) | N | 库存条码值 | |
| inStockQty | Integer | Y | 在库总库存 在库总库存=可用+待发+丢失确认中+冻结+待销毁+失效VAT冻结+禁止出库 |
|
| usableQty | Integer | Y | 可用库存 | |
| frozenQty | Integer | Y | 总冻结库存, 总冻结=待出库数量+待销毁数量+冻结库存+丢失确认中库存+VAT冻结数量 |
|
| onOrderQty | Integer | N | 在途待入库 | |
| isProhibitOutbound | String(1) | Y | 是否禁止出库, Y 为禁止,N为不禁止,PART为部分禁止 |
|
| prohibitUsableQty | Integer | Y | 禁止出库的可用库存数 | |
| unit | String(255) | Y | 库存单位 | |
| provideChannel | String(255) | Y | 供应渠道 | |
| salesChannel | String(255) | Y | 销售渠道 |
返回示例
{"code": "0","msg": "操作成功","data": {"pageParams": {"pageNo": 1,"pageSize": 1,"totalCount": 1},"list": [{"warehouseCode": "US0001","usableQty": "0","merchandiseSerno": "0","specification": null,"merchandiseCode": "","frozenQty": 22,"inStockQty": "0","isActive": "Y","skuCodeThird": "xxxxx","merchandiseGrade": "GOOD","organization": "xxxxx"}]}}
{"code": "0","msg": "操作成功","data": {"pageParams": {"pageNo": 1,"pageSize": 1,"totalCount": 1},"list": [{"warehouseCode": "US0001","usableQty": "0","merchandiseSerno": "0","specification": null,"merchandiseCode": "","frozenQty": 22,"inStockQty": "0","isActive": "Y","skuCodeThird": "xxxxx","organization": "xxxxx"}]}}
