Stock Management
Track inventory levels and stock alerts.
Updated
On this page
Overview
Stock is tracked at the size level. Each product size has its own inventory count. When a customer purchases an item, stock is automatically decremented.
Reading Stock
import dash from "@/lib/dash"
const { product } = await dash.products.get("blue-dream")
product.attributes.forEach(attr => {
attr.options.forEach(option => {
option.sizes.forEach(size => {
console.log(`${option.value} ${size.label}: ${size.stock} in stock (${size.in_stock})`)
})
})
})
Stock on Product Cards
The in_stock flag on the product list and main_size gives a quick availability check:
const { products } = await dash.products.list()
products.forEach(p => {
if (!p.in_stock) {
// Show "Out of Stock" badge
}
})
Low Stock Webhooks
Subscribe to inventory.low webhook events to get notified when stock falls below your threshold.
Managing Inventory
Stock is managed through the dashboard:
- Go to Products
- Click on a product
- Edit stock per size/variation
- Save changes
For programmatic updates, use the admin API with a secret key. See Dashboard API.
Next Steps
- Brands — Brand management
- Bulk Import — Importing products in bulk
- Product Variations & Sizes — Size structure
For what this looks like as a product rather than as endpoints, see inventory management.