仓库库存查询接口
一、说明
主要用于第三方系统调用此接口查询AI-WMS PLUS中的仓库库存数据,即大仓的库存数据。
版本:2025-12-25日的5.0版本(以上)
二、参数说明
1、请求方式
| 请求方式 | POST | |||||
| 接口地址 | http://服务器IP或机器名或域名/WMS/API/SYS/WarehouseInventoryQuery | |||||
| 格式 | JSON | |||||
| 编码类型 | UTF-8 | |||||
2、header参数
| KEY | VALUE | |||||
| Content-Type | application/json | |||||
| Authorization | token值 | 说明:授权接口所获取的值 | ||||
3、请求参数
|
字段 |
字段名 |
字段类型 |
长度 |
必填 |
说明 |
|
oth_task_id |
第三方任务单号 |
String |
100 |
是 |
任务唯一ID |
|
warehouse_code |
仓库代号 | String | 是 | 支持多个仓库同时查询,仓库代号之间用;隔开(不支持含下属) | |
|
owner_code |
货主编码 | String | 30 | 是 | 未启用多货主时,固定传入OWNER |
|
item_code |
货品代号 | String | 支持多个货品同时查询,货品代号之间用;隔开 | ||
|
category_code |
中类代号 | String | 支持多个中类同时查询,中类代号之间用;隔开(不支持含下属) | ||
| batch_code | 批号 | String | 支持多个批号同时查询,批号之间用;隔开 | ||
| limit | 每页查询记录数 | int | 为0时,则视为1000 | ||
| offset | 查询第几页 | int | 为0时,则视为第1页 |
4、返回参数
| 字段代号 | 字段名称 | 字段类型 | 长度 | 必填 | 说明 |
| code | 成功标记 | String | 10 | 是 | 返回0则表示成功,其他则为失败 |
| message | 返回信息 | String | 200 | ||
| oth_task_id | 第三方任务代号 | String | 100 | ||
| limit | 每页查询记录数 | int | |||
| offset | 查询第几页 | int | |||
| total | 总共记录数 | int | |||
| datas<库存明细记录> | |||||
| qty | 数量 | float | |||
| qty1 | 数量(副) | float | |||
| inbound_qty | 入库数量 | float | |||
| inbound_qty1 | 入库数量 (副) | float | |||
| outbound_qty | 出库数量 | float | |||
| outbound_qty1 | 出库数量 (副) | float | |||
| plan_outbound_qty | 计划出库量 | float | |||
| plan_outbound_qty1 | 计划出库量 (副) | float | |||
| picked_qty | 拣货量 | float | |||
| picked_qty1 | 拣货量 (副) | float | |||
| inventory_inspect_qty | 库存检验量 | float | |||
| inventory_inspect_qty1 | 库存检验量 (副) | float | |||
| inbound_notify_qty | 入库通知量 | float | |||
| inbound_notify_qty1 | 入库通知量 (副) | float | |||
| outbound_notify_qty | 出库通知量 | float | |||
| outbound_notify_qty1 | 出库通知量 (副) | float | |||
| checking_qty | 在检量 | float | |||
| checking_qty1 | 在检量 (副) | float | |||
| lock_id | 库存锁定标记 | String | |||
| field_zs | 自设字段 | String | |||
| latest_inspect_date | 最近检验日期 | Datatime | |||
| owner_code | 货主编码 | String | |||
| warehouse_code | 仓库代号 | String | |||
| warehouse_name | 仓库名称 | String | |||
| item_code | 货品代号 | String | |||
| item_name | 货品名称 | String | |||
| sku_property | 特征 | String | |||
| sku_name | 特征名称 | String | |||
| batch_code | 批号 | String | |||
| expiry_date | 有效日期 | Datatime | |||
| production_date | 生产日期 | Datatime | |||
| latest_outbound_date | 最近出库日期 | Datatime | |||
| latest_inbound_date | 最近入库日期 | Datatime | |||
| insert_date | 插入时间 | Datatime | |||
三、请求JSON范例
{
"oth_task_id": "{{$guid}}", //必填,第三方任务代号,必须唯一
"warehouse_code": "YTLK1", //必填,仓库代号,支持多个仓库同时查询,仓库代号之间用;隔开(不支持含下属)
"owner_code": "OWNER", //必填,货主编码,未启用多货主时,固定传入OWNER;
"item_code": "T1001;T3001", //货品代号,支持多个货品同时查询,货品代号之间用;隔开
"category_code": "", //中类代号,支持多个中类同时查询,中类代号之间用;隔开(不支持含下属)
"batch_code": "", //批号,支持多个批号同时查询,批号之间用;隔开
"limit":0, //每页查询记录数,为0时,则视为1000
"offset":0 //查询第几页,为0时,则视为第1页
}
四、返回JSON范例
{
"datas": [
{
"inbound_notify_qty": 0.0,
"inbound_notify_qty1": 0.0,
"outbound_notify_qty": 0.0,
"outbound_notify_qty1": 0.0,
"checking_qty": 0.0,
"checking_qty1": 0.0,
"lock_id": "",
"field_zs": "",
"latest_inspect_date": "",
"owner_code": "OWNER",
"warehouse_code": "YTLK1",
"warehouse_name": "宇彤原料仓LK1",
"item_code": "T1001",
"item_name": "托盘库批号货品T1001",
"sku_property": "",
"sku_name": "",
"batch_code": "251225005",
"qty": 40.0,
"qty1": 0.0,
"inbound_qty": 40.0,
"inbound_qty1": 0.0,
"outbound_qty": 0.0,
"outbound_qty1": 0.0,
"plan_outbound_qty": 0.0,
"plan_outbound_qty1": 0.0,
"picked_qty": 0.0,
"picked_qty1": 0.0,
"inventory_inspect_qty": 0.0,
"inventory_inspect_qty1": 0.0,
"expiry_date": "",
"production_date": "2025/12/25 0:00:00",
"latest_outbound_date": "",
"latest_inbound_date": "2025/12/25 0:00:00",
"insert_date": "2025/12/25 15:36:28"
},
{
"inbound_notify_qty": 0.0,
"inbound_notify_qty1": 0.0,
"outbound_notify_qty": 0.0,
"outbound_notify_qty1": 0.0,
"checking_qty": 0.0,
"checking_qty1": 0.0,
"lock_id": "",
"field_zs": "",
"latest_inspect_date": "",
"owner_code": "OWNER",
"warehouse_code": "YTLK1",
"warehouse_name": "宇彤原料仓LK1",
"item_code": "T3001",
"item_name": "托盘库批号特征货品T3001",
"sku_property": "AA",
"sku_name": "",
"batch_code": "251225002",
"qty": 28.0,
"qty1": 0.0,
"inbound_qty": 40.0,
"inbound_qty1": 0.0,
"outbound_qty": 12.0,
"outbound_qty1": 0.0,
"plan_outbound_qty": 0.0,
"plan_outbound_qty1": 0.0,
"picked_qty": 0.0,
"picked_qty1": 0.0,
"inventory_inspect_qty": 0.0,
"inventory_inspect_qty1": 0.0,
"expiry_date": "",
"production_date": "2025/12/25 0:00:00",
"latest_outbound_date": "2025/12/25 0:00:00",
"latest_inbound_date": "2025/12/25 0:00:00",
"insert_date": "2025/12/25 9:40:10"
}
],
"oth_task_id": "749524bd-18c3-4a15-b18e-fa73046f8706",
"code": "0",
"message": null,
"limit": 2,
"offset": 0,
"total": 4
}