---
title: "Get inventory levels"
method: GET
path: "/public/v1/inventory"
tags: ["Inventory"]
---

# Get inventory levels

`GET /public/v1/inventory`

Get on-hand inventory levels rolled up by a caller-chosen set of attributes. Each returned row is one group, and the `groupings` you request decides both how quantities are aggregated and which id fields (`product_id`, `location_id`, `batch_number`) appear on each row. Only active, positive-quantity, sellable stock is counted — inventory that has been consumed, voided, transferred out, or fully sold is excluded, as is any stock whose product has been deactivated. Results are always scoped to the company that owns the API key.

Results can be narrowed to specific products (`product_ids`), locations (`location_ids`), and batches (`batch_ids`), or by attributes of the underlying product — category, subcategory, group, strain, brand, vendor, tag, and SKU. All filters are AND-ed together; within a single multi-valued filter the values are OR-ed.

Groups with 0 active and 0 available quantity are omitted from the response. Groups are sorted ascending by the ids of the attributes they are grouped by, in the order those attributes appear in `groupings`.

Grouping by `BATCH_NUMBER` behaves specially: 
• Products that track inventory at the product level (not by batch) are excluded entirely — they only surface when you do not group by `BATCH_NUMBER`. 
• `reserved` cannot be determined at the batch/package granularity, so it is always returned as `"0"` and `available` equals `active` for every row.

This is a read-only endpoint. It returns eventually consistent data: a change to inventory (a sale, a receipt, an adjustment) can take up to roughly 1 second to be reflected here, so a value read immediately after a write may still be stale.

Required permission: `products_permissions_view`.

## Query parameters

- `groupings` string[], required
- `page` number
- `product_ids` string[]
- `location_ids` string[]
- `batch_ids` string[]
- `product_category_ids` string[]
- `product_subcategory_ids` string[]
- `product_group_ids` string[]
- `product_strain_ids` string[]
- `product_brand_ids` string[]
- `product_vendor_ids` string[]
- `product_tag_ids` string[]
- `product_skus` string[]

## Response `200`

A list of active and available quantity for each group

## Other responses

- `400` — Invalid parameters
- `401` — Missing or invalid API token
- `403` — The API token lacks the required permission

---

[API](https://skmtc.dev/distru/apis/distru-api.md) · [All operations](https://skmtc.dev/distru/apis/distru-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/distru/distru-api/revisions/f8930b2c2924/schema)
