Stock levels
stock_levelsRetrieve current stock for ingredients, packaging, merchandise, and finished products, with optional filters for location, expiry, batch, or product name.
Instructions
Current stock. Two sources: (1) stock items (ingredients, packaging, chemicals, guest beer, merchandise) currently in stock, per stock item and location, from GET /stock-received/ with is_empty=False (quantities in kg, litres or units depending on the item's tracking type); (2) finished products, from GET /products/ with include_fields=quantity_in_stock_in_format, a conditionally included field that Breww's API guide names but its spec does not define, so the value is passed through exactly as returned. The API has no location filter on stock received, so location_id is applied here after fetching.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| what | No | Which stock to report | all |
| expiring_by | No | Only lots with an expiry date on or before this date (API parameter `expiry_date__lte`) | |
| location_id | No | Only this location (filtered here; the API has no location parameter on stock received) | |
| max_results | No | Most lots and most products to read | |
| include_lots | No | Also list the individual lots (batch code, expiry, quantity) | |
| stock_item_id | No | Only this stock item (API parameter `stock_item`) | |
| batch_code_contains | No | Part of the stock lot's batch code (API parameter `batch_code__contains`) | |
| product_name_contains | No | Part of the product name, for product stock (API parameter `name__contains`) |