---
title: "Warehouse - Stats"
method: GET
path: "/warehouse/stats"
tags: ["warehouse"]
---

# Warehouse - Stats

`GET /warehouse/stats`

Retrieve warehouse statistics including item counts and inventory totals.

## Query parameters

- `warehouse_id` string — Warehouse ID to filter stats for a single warehouse
- `with_locations` boolean — Group stats by location instead of warehouse

## Response `200`

Array of warehouse (or location) statistics from aggregation

- object[]
  - `_id` string, required — Warehouse ID (or location ID when with_locations is true)
  - `on_hand` number, required — Total on-hand quantity across all SKUs
  - `sku_count` number, required — Total number of distinct SKUs
  - `skus_available` number, required — Number of SKUs with on_hand greater than zero
  - `pct_available` number, required — Percentage of SKUs in stock (0-100)
  - `summary` string, required — Human-readable summary, e.g. "1.2k skus, 85% in stock"

## Other responses

- `400` — Bad request
- `401` — Unauthorized
- `403` — Forbidden. Insufficient permissions.
- `429` — Too many requests. Rate limit exceeded.
- `500` — Internal server error.

---

[API](https://skmtc.net/skulabs/apis/skulabs-api.md) · [All operations](https://skmtc.net/skulabs/apis/skulabs-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/skulabs/skulabs-api/revisions/4b5ec0ed78a6/schema)
