Stock
A per-location stock line — the most granular stock entity. One line per (product, location) tuple, where the location is either a physical bin / warehouse or a special slot (order, return order, goods receipt, …). Use locationTypeTechnicalName / specialStockLocationTechnicalName to disambiguate.
type Stock implements Node {
id: ID!
quantity: Int!
productId: ID!
locationTypeTechnicalName: ID!
warehouseId: ID
binLocationId: ID
specialStockLocationTechnicalName: ID
createdAt: DateTime!
updatedAt: DateTime
product: Product
warehouse: Warehouse
binLocation: BinLocation
order: Order
goodsReceipt: GoodsReceipt
}
Fields
Stock.id ● ID! non-null scalar
Global identifier for this entity.
Stock.quantity ● Int! non-null scalar
Number of units present at this location. Signed: negative quantities represent allocations (e.g. units booked on an open order).
Stock.productId ● ID! non-null scalar
ID of the product.
Stock.locationTypeTechnicalName ● ID! non-null scalar
Technical name of the location type (warehouse, bin_location, order, return_order, goods_receipt, stock_container, special_stock_location). Use this to filter "physical" lines (warehouse + bin) and exclude allocation / special slots.
Stock.warehouseId ● ID scalar
ID of the warehouse this line belongs to.
Stock.binLocationId ● ID scalar
ID of the bin location.
Stock.specialStockLocationTechnicalName ● ID scalar
For lines whose locationTypeTechnicalName is special_stock_location, the technical name of the special location (e.g. stock_correction, import, initialization, unknown).
Stock.createdAt ● DateTime! non-null scalar
Timestamp the stock line was first persisted.
Stock.updatedAt ● DateTime scalar
Timestamp of the last quantity change.
Stock.product ● Product object
Stock.warehouse ● Warehouse object
Stock.binLocation ● BinLocation object
Stock.order ● Order object
Stock.goodsReceipt ● GoodsReceipt object
Interfaces
Node interface
Any entity that can be loaded by its global id through the node(id: ID!) query.
Returned By
adjustStockAtBinLocation mutation ● setStockAtBinLocation mutation ● stock query ● transferStock mutation
Member Of
StockEdge object