Effective inventory management is crucial for maintaining optimal stock levels and preventing stockouts or overstock situations. This guide shows you how to fetch inventory data and make adjustments using the Trackstar API.Documentation Index
Fetch the complete documentation index at: https://docs.trackstarhq.com/llms.txt
Use this file to discover all available pages before exploring further.
Overview
The inventory management workflow typically involves:- Fetching current stock levels across warehouses
- Monitoring inventory changes and levels
- Map between products and associated inventory items
Getting Inventory Data
Use the Get Inventory endpoint to retrieve current stock levels across all locations.Fetching All Inventory
Sample Response
Understanding Inventory Levels
For detailed information about inventory breakdowns, see the Inventory Info page.Multi-Location Inventory
Trackstar tracks inventory across multiple warehouses and specific locations within each warehouse.Warehouse-Level Inventory
Each inventory item shows totals by warehouse:Location-Level Details
Specific storage locations within warehouses:Mapping Products to Inventory Items
Products and inventory items have a many-to-many relationship in Trackstar. A single product (identified by SKU) can map to multiple inventory items across different warehouses. To accurately get inventory levels for a product, you need to first fetch the product to get its associated inventory items.Fetching Product Information
Use the Get Product endpoint to retrieve a specific product and its inventory item mappings.Sample Product Response
Getting Inventory Levels for Products
Once you have theinventory_item_id values from the product response, use the Get Inventory endpoint to retrieve current stock levels. The inventory_item_id from the product endpoint maps directly to the id field in the inventory endpoint.
Sample Inventory Item Response
Complete Product-to-Inventory Workflow
- Fetch the product using the Get Product endpoint
- Extract inventory item IDs from the
inventory_itemsarray - Fetch inventory levels for each
inventory_item_idusing the Get Inventory Item endpoint