Product stock
Use the stock API when a merchant integration needs to read current product stock, apply stock corrections, or move stock between bin locations.
Available operations
- Read stock rows with stocks.
- Read warehouse totals with warehouseStocks.
- Read product-level stock fields with products.
- Set absolute stock at a bin location with setStockAtBinLocation.
- Set absolute stock for a warehouse with setStockAtWarehouse.
- Apply relative stock changes with adjustStockAtBinLocation or adjustStockAtWarehouse.
- Move stock between bin locations with transferStock.
- Create batch records with createBatch before writing batch-specific stock.
Example: read stock for a product
query StockByProduct($productId: ID!) {
stocks(filter: { productId: { equals: $productId } }) {
edges {
node {
id
quantity
warehouse {
code
name
}
binLocation {
code
}
}
}
pageInfo {
hasNextPage
endCursor
}
}
}
Stock concepts
Product-level stock fields expose different views on availability:
physicalStockis the physical stock known for the product.availableStockis the stock available for sale.reservedStockis stock reserved by orders or workflows.stockNotAvailableForSaleis stock that exists but should not be sold online.
Bin-location stock and warehouse stock are separate API objects because some integrations need exact storage-location data while others only need warehouse totals.
Notes
Use batchId on stock mutations for batch-specific stock. The current 2026-06-unstable list fields expose filters and pagination; domain-specific sort options for stock lists should be added to the schema if a merchant workflow depends on a stable API-provided order.