Skip to main content

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

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:

  • physicalStock is the physical stock known for the product.
  • availableStock is the stock available for sale.
  • reservedStock is stock reserved by orders or workflows.
  • stockNotAvailableForSale is 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.