开放平台

扒书 ERP Open API

仓库数据统计

按仓库汇总出入库、库容等数据,做仓库报表时用。

请求方式GET/POST
接口路径/api/warehouse/stats/list
Content-Typeapplication/json
鉴权X-Nideshop-Token

请求体字段

字段类型必填说明
warehouseIdsArray<Integer>否仓库 ID 列表,空则表示当前用户下的全部仓库
dateTypeString否时间粒度: today / yesterday / last7days / month / custom
startTimeLocalDateTime否自定义时间范围,在 dateType = custom 时生效
endTimeLocalDateTime否-
curPageInteger否分页
pageSizeInteger否-

curl 调用

curl -s 'https://www.8shu8.com/api/warehouse/stats/list' \
  -H 'X-Nideshop-Token: YOUR_LOGIN_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "warehouseIds": [
    1
  ],
  "dateType": "string",
  "startTime": "string",
  "endTime": "string",
  "curPage": 1,
  "pageSize": 1
}'

响应示例

data 为分页对象,业务数据在 records。

{
  "code": 200,
  "message": "操作成功",
  "success": true,
  "data": {
    "records": [
      "..."
    ],
    "total": 0,
    "size": 10,
    "current": 1,
    "pages": 0
  }
}

返回字段(data)

字段类型说明
page分页对象分页数据
totalShippedAmountBigDecimal当前结果集的合计
totalShippedOrderCountLong-
totalShippedBookCountLong-
totalPendingAmountBigDecimal-