katana_public_api_client.helpers.inventory¶
katana_public_api_client.helpers.inventory
¶
Inventory and stock management operations.
Classes¶
Inventory(client)
¶
Bases: Base
Inventory and stock operations.
Provides methods for checking stock levels, movements, adjustments, and transfers. For product catalog CRUD, use client.products instead.
Example
async with KatanaClient() as client: ... # Check stock levels (MCP tool support) ... stock = await client.inventory.check_stock("WIDGET-001") ... low_stock = await client.inventory.list_low_stock(threshold=10) ... ... # Stock movements and adjustments ... movements = await client.inventory.get_movements() ... await client.inventory.create_adjustment( ... {"product_id": 123, "quantity": 10} ... )
Source code in katana_public_api_client/helpers/base.py
Functions¶
check_stock(sku)
async
¶
Check stock levels for a specific SKU.
Used by: MCP tool check_inventory
Parameters:
-
sku(str) –The SKU to check stock for.
Returns:
-
Product | None–Product model with stock information, or None if SKU not found.
Example
product = await client.inventory.check_stock("WIDGET-001") if product: ... stock = product.stock_information ... print(f"Available: {stock.available}, In Stock: {stock.in_stock}")
Source code in katana_public_api_client/helpers/inventory.py
get_inventory_points(**filters)
async
¶
Get inventory points for all products.
This will use the inventory API to get current stock levels, reorder points, and safety stock levels.
Parameters:
-
**filters(Any, default:{}) –Filtering parameters.
Returns:
Note
To be implemented using katana_public_api_client.api.inventory
Source code in katana_public_api_client/helpers/inventory.py
get_negative_stock()
async
¶
Get products with negative stock.
Returns:
Note
To be implemented using katana_public_api_client.api.inventory
Source code in katana_public_api_client/helpers/inventory.py
list_low_stock(threshold=None)
async
¶
Find products below their reorder point.
Used by: MCP tool list_low_stock_items
Parameters:
-
threshold(int | None, default:None) –Optional stock threshold. Products with stock below this will be returned. If None, uses each product's reorder point.
Returns:
Example
low_stock = await client.inventory.list_low_stock(threshold=10) for product in low_stock: ... stock = product.stock_information ... print(f"{product.sku}: {stock.in_stock} units")
Source code in katana_public_api_client/helpers/inventory.py
set_reorder_point(product_id, quantity)
async
¶
Set reorder point for a product.
Parameters:
Note
To be implemented using katana_public_api_client.api.inventory
Source code in katana_public_api_client/helpers/inventory.py
set_safety_stock(product_id, quantity)
async
¶
Set safety stock level for a product.
Parameters:
Note
To be implemented using katana_public_api_client.api.inventory