---
updatedAt: 2026-08-27T02:33:19.000Z
---

# 批次库存分页查询

与OMP管理端批次库存列表一致。

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "【领星WMS】服务商内部系统对接文档（基于管理后台信息）",
    "version": "2.10.0",
    "description": "【领星WMS】服务商内部系统对接文档（基于管理后台信息）\n\nv2.3.0 更新：分页/详情 schema 与 OpenApi* VO 完全对齐，修正 quotationNo 字段名、补全费用/报价/产品/充值附件字段，补充 warehouseRentType/moduleType 等必填入参。\n\nv2.4.0 更新：新增全局订单/全局库存/仓租成本/充值统计/币种资产共31个查询接口（入参出参与OMP管理端页面口径一致）；v2.5.0 更新：新增全局工单6个查询接口（工单分页/详情/消息/附件/费用/增值服务）。\n\n【序列化说明】平台对null值有统一序列化行为：字符串/日期字段为null时返回空字符串\"\"，数值字段为null时可能返回空字符串\"\"或0，集合字段为null时返回空数组[]。对接时请做空值兼容处理。\n\nv2.6.0 更新：新增备货中转出库（分页/按箱详情/按产品详情/统计/OMS异常分页/成本费用调整详情）、直邮单（分页/详情/状态统计）、装箱单（分页/状态统计）、入库认领（分页/详情）、全局库存（产品库存分页，含主仓库存对比）、仓租明细（OMP链路）共15个查询接口，入参出参与OMP管理端页面口径一致。\n\nv2.7.0 更新：新增物流渠道4个查询接口（渠道分页/详情/绑定仓库/仓库绑定地址，tag=物流渠道）及业务费用2个调整接口（手动调整费用或成本/手动调整仓租费用或成本）。调整接口的明细列表须提交调整后的完整集合，详见接口说明。\n\nv2.8.0 更新：仓库列表查询（warehouse/page）出参新增16个字段：仓库名称（英文）、国家中文名称、国家英文名称、配对主仓名称、仓库状态、公司名称、州/省名称、城市名称、地址1、地址2、邮编、街道号、联系人、联系电话、邮箱、时区。\n\nv2.9.0 更新：新增批量创建产品接口（product/create）。租户级接口，一次调用可为多个客户创建产品（productList 内每条自带 customerCode），单次最多 200 条，同步返回逐 SKU 结果且支持部分成功。\n\nv2.10.0 更新：全局库存新增3个箱库存查询接口（箱库存总计 boxStock/boxTypeTotal、箱库存分页 boxStock/page、箱库存流水分页 boxStockCellBook/page），与OMP管理端箱库存页面口径一致，租户级接口。"
  },
  "servers": [
    {
      "url": "https://api.xlwms.com",
      "description": "生产环境"
    }
  ],
  "components": {
    "schemas": {
      "BaseRequest": {
        "type": "object",
        "required": [
          "sign",
          "appKey",
          "timestamp"
        ],
        "properties": {
          "sign": {
            "type": "string",
            "description": "签名参数，根据签名算法生成",
            "minLength": 64,
            "maxLength": 64
          },
          "appKey": {
            "type": "string",
            "description": "租户身份标识（在管理后台-个人中心-API信息-自研系统获取）",
            "minLength": 32,
            "maxLength": 32
          },
          "timestamp": {
            "type": "string",
            "description": "请求时间，单位秒",
            "pattern": "^\\d{10}$"
          }
        }
      },
      "BaseResponse": {
        "type": "object",
        "required": [
          "code",
          "success",
          "msg"
        ],
        "properties": {
          "code": {
            "type": "integer",
            "description": "错误码"
          },
          "success": {
            "type": "boolean",
            "description": "是否成功"
          },
          "msg": {
            "type": "string",
            "description": "成功/异常信息"
          }
        }
      },
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "enum": [
              "200",
              "11002",
              "11003",
              "11004",
              "11005",
              "11006",
              "11007",
              "11008",
              "11010",
              "31001"
            ],
            "description": "错误码：\n200-请求成功\n11002-时间超时\n11003-时间戳不能为空\n11004-appKey不能为空\n11005-appKey有误\n11006-验签不通过\n11007-传入参数不能为空\n11008-无接口权限\n11010-sign不能为空\n31001-调用鉴权服务异常"
          },
          "msg": {
            "type": "string",
            "description": "错误信息"
          }
        }
      },
      "OpenApiStockBatchPageVO": {
        "type": "object",
        "properties": {
          "customerCode": {
            "type": "string",
            "description": "客户编码"
          },
          "customerName": {
            "type": "string",
            "description": "客户名称"
          },
          "whCode": {
            "type": "string",
            "description": "仓库编号"
          },
          "whName": {
            "type": "string",
            "description": "仓库名称"
          },
          "productSku": {
            "type": "string",
            "description": "商品SKU"
          },
          "productName": {
            "type": "string",
            "description": "商品名称"
          },
          "productQuality": {
            "type": "integer",
            "description": "商品品质"
          },
          "productQualityName": {
            "type": "string",
            "description": "商品品质名称"
          },
          "innerBatchNo": {
            "type": "string",
            "description": "内部批次号"
          },
          "outBatchNo": {
            "type": "string",
            "description": "外部批次号"
          },
          "originQty": {
            "type": "number",
            "description": "到货数量"
          },
          "stkQty": {
            "type": "number",
            "description": "在库数量"
          },
          "freezeQty": {
            "type": "number",
            "description": "冻结数量"
          },
          "useStkQty": {
            "type": "number",
            "description": "可用库存"
          },
          "cellNo": {
            "type": "string",
            "description": "库位编号"
          },
          "creator": {
            "type": "string",
            "description": "记账人"
          },
          "barcode": {
            "type": "string",
            "description": "产品条码（主条码）"
          },
          "relateOrderNo": {
            "type": "string",
            "description": "关联入库单号"
          },
          "putawayDate": {
            "type": "string",
            "description": "上架日期"
          },
          "batchNo": {
            "type": "string",
            "description": "上架批次号"
          },
          "productionTime": {
            "type": "string",
            "description": "生产日期"
          },
          "expiryTime": {
            "type": "string",
            "description": "到期日期"
          },
          "sysBatchNo": {
            "type": "string",
            "description": "系统批次号"
          },
          "stockAge": {
            "type": "integer",
            "description": "库龄天数"
          },
          "stockAgeStatus": {
            "type": "integer",
            "description": "库龄状态 0-库龄正常 1-滞销"
          }
        }
      }
    }
  },
  "security": [],
  "paths": {
    "/openapi/v2/stock/batch/page": {
      "post": {
        "tags": [
          "全局库存"
        ],
        "summary": "批次库存分页查询",
        "description": "与OMP管理端批次库存列表一致。",
        "security": [
          {
            "ApiKeyAuth": [],
            "SignatureAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/BaseRequest"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "data": {
                        "type": "object",
                        "properties": {
                          "current": {
                            "type": "integer",
                            "description": "页码，默认1"
                          },
                          "size": {
                            "type": "integer",
                            "description": "每页条数，默认10，最大1000"
                          },
                          "whCodeList": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "仓库编号列表"
                          },
                          "viewType": {
                            "type": "string",
                            "description": "视图类型:1-入库单号视图;2-产品视图;3-失效日期视图"
                          },
                          "timeType": {
                            "type": "string",
                            "description": "时间类型: 1.上架时间、2.生产日期、3.失效日期"
                          },
                          "startTime": {
                            "type": "string",
                            "description": "记录时间开始"
                          },
                          "endTime": {
                            "type": "string",
                            "description": "记录时间结束"
                          },
                          "cellNo": {
                            "type": "string",
                            "description": "库位编号"
                          },
                          "barcode": {
                            "type": "string",
                            "description": "Barcode--模糊搜索"
                          },
                          "barcodeAccurateList": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "Barcode--精确搜索"
                          },
                          "productName": {
                            "type": "string",
                            "description": "产品名称--模糊搜索"
                          },
                          "productNameAccurateList": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "产品名称--精确搜索"
                          },
                          "relateOrderNo": {
                            "type": "string",
                            "description": "关联入库单号"
                          },
                          "batchNo": {
                            "type": "string",
                            "description": "上架批次号（按照20001212-000001格式 后端解析）"
                          },
                          "stockValueType": {
                            "type": "integer",
                            "description": "数量类型：1.到货数量、2.在库数量"
                          },
                          "startValue": {
                            "type": "integer",
                            "description": "开始值"
                          },
                          "endValue": {
                            "type": "integer",
                            "description": "结束值"
                          },
                          "relateOrderNoAccurateList": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "关联入库单号-列表"
                          }
                        }
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功响应",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/BaseResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "object",
                          "properties": {
                            "records": {
                              "type": "array",
                              "description": "数据列表",
                              "items": {
                                "$ref": "#/components/schemas/OpenApiStockBatchPageVO"
                              }
                            },
                            "total": {
                              "type": "integer",
                              "description": "总记录数"
                            },
                            "size": {
                              "type": "integer",
                              "description": "每页条数"
                            },
                            "current": {
                              "type": "integer",
                              "description": "当前页码"
                            },
                            "pages": {
                              "type": "integer",
                              "description": "总页数"
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "请求错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "未认证",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "未授权",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "服务器错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    }
  }
}
```