Get inventory levels
distru_get_inventoryGet on-hand inventory quantities aggregated by product, location, or batch number, with optional filters for products, locations, and SKUs. Use to check stock levels and support planning decisions.
Instructions
Get on-hand inventory rolled up by a chosen set of attributes (GET /public/v1/inventory). groupings is REQUIRED and must include PRODUCT. Each grouping adds its id field to every row: PRODUCT adds product_id, LOCATION adds location_id, BATCH_NUMBER adds batch_number; omitted groupings are absent from the rows entirely. Groups with zero quantity are omitted, and deactivated products are excluded. Grouping by BATCH_NUMBER drops product-tracked products and always reports reserved as "0". This data is eventually consistent: a write can take about a second to show up here.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | 1-indexed page number. Page size is not guaranteed stable; follow next_page instead. | |
| groupings | Yes | Attributes to roll up by. Must include PRODUCT. Order sets the sort order. | |
| product_ids | No | ||
| location_ids | No | ||
| product_skus | No |