StockMovement
A single booking in the stock movement ledger: quantity units of a product moved from a source location to a destination location. Each location is described by its …LocationTypeTechnicalName and the one matching …Id / …SpecialStockLocationTechnicalName field; the others are null. The matching …Id is null as well once the referenced location has been deleted. Stock movements are not edited after they are booked, but deleting a product deletes its stock movements.
type StockMovement implements Node {
id: ID!
createdAt: DateTime!
destinationBinLocationId: ID
destinationGoodsReceiptId: ID
destinationLocationTypeTechnicalName: String!
destinationOrderId: ID
destinationReturnOrderId: ID
destinationSpecialStockLocationTechnicalName: String
destinationStockContainerId: ID
destinationWarehouseId: ID
processTypeTechnicalName: String
productId: ID!
quantity: Int!
sourceBinLocationId: ID
sourceGoodsReceiptId: ID
sourceLocationTypeTechnicalName: String!
sourceOrderId: ID
sourceReturnOrderId: ID
sourceSpecialStockLocationTechnicalName: String
sourceStockContainerId: ID
sourceWarehouseId: ID
destinationBinLocation: BinLocation
destinationGoodsReceipt: GoodsReceipt
destinationOrder: Order
destinationWarehouse: Warehouse
product: Product
sourceBinLocation: BinLocation
sourceGoodsReceipt: GoodsReceipt
sourceOrder: Order
sourceWarehouse: Warehouse
}
Fields
StockMovement.id ● ID! non-null scalar
Global identifier for this entity.
StockMovement.createdAt ● DateTime! non-null scalar
Timestamp the stock movement was booked.
StockMovement.destinationBinLocationId ● ID scalar
ID of the destination bin location, if the destination location type is bin_location and the bin location still exists.
StockMovement.destinationGoodsReceiptId ● ID scalar
ID of the destination goods receipt, if the destination location type is goods_receipt and the goods receipt still exists.
StockMovement.destinationLocationTypeTechnicalName ● String! non-null scalar
Technical name of the destination location type (warehouse, bin_location, order, return_order, goods_receipt, stock_container, special_stock_location).
StockMovement.destinationOrderId ● ID scalar
ID of the destination order, if the destination location type is order and the order still exists.
StockMovement.destinationReturnOrderId ● ID scalar
ID of the destination return order, if the destination location type is return_order and the return order still exists.
StockMovement.destinationSpecialStockLocationTechnicalName ● String scalar
Technical name of the destination special stock location (e.g. stock_correction, import, initialization, unknown), if the destination location type is special_stock_location.
StockMovement.destinationStockContainerId ● ID scalar
ID of the destination stock container, if the destination location type is stock_container and the stock container still exists.
StockMovement.destinationWarehouseId ● ID scalar
ID of the destination warehouse, if the destination location type is warehouse and the warehouse still exists.
StockMovement.processTypeTechnicalName ● String scalar
Technical name of the process that booked the stock movement, i.e. the reason for it. Known values include supplier_order, free_goods_receipt, return_order, shipping, shipped_automatically, cancelled_fulfillment, relocation, incoming, outgoing, stocktaking, csv_import_incoming, csv_import_outgoing, api, api_incoming, api_outgoing, api_relocation and api_shipping. Other plugins register their own values, so treat the list as open.
null for stock movements booked without a process, which includes all stock movements booked before processes were introduced in March 2025.
StockMovement.productId ● ID! non-null scalar
ID of the moved product.
StockMovement.quantity ● Int! non-null scalar
Number of units moved. Always positive; the direction follows from the source and destination location.
StockMovement.sourceBinLocationId ● ID scalar
ID of the source bin location, if the source location type is bin_location and the bin location still exists.
StockMovement.sourceGoodsReceiptId ● ID scalar
ID of the source goods receipt, if the source location type is goods_receipt and the goods receipt still exists.
StockMovement.sourceLocationTypeTechnicalName ● String! non-null scalar
Technical name of the source location type (warehouse, bin_location, order, return_order, goods_receipt, stock_container, special_stock_location).
StockMovement.sourceOrderId ● ID scalar
ID of the source order, if the source location type is order and the order still exists.
StockMovement.sourceReturnOrderId ● ID scalar
ID of the source return order, if the source location type is return_order and the return order still exists.
StockMovement.sourceSpecialStockLocationTechnicalName ● String scalar
Technical name of the source special stock location (e.g. stock_correction, import, initialization, unknown), if the source location type is special_stock_location.
StockMovement.sourceStockContainerId ● ID scalar
ID of the source stock container, if the source location type is stock_container and the stock container still exists.
StockMovement.sourceWarehouseId ● ID scalar
ID of the source warehouse, if the source location type is warehouse and the warehouse still exists.
StockMovement.destinationBinLocation ● BinLocation object
StockMovement.destinationGoodsReceipt ● GoodsReceipt object
StockMovement.destinationOrder ● Order object
StockMovement.destinationWarehouse ● Warehouse object
StockMovement.product ● Product object
StockMovement.sourceBinLocation ● BinLocation object
StockMovement.sourceGoodsReceipt ● GoodsReceipt object
StockMovement.sourceOrder ● Order object
StockMovement.sourceWarehouse ● Warehouse object
Interfaces
Node interface
Any entity that can be loaded by its global id through the node(id: ID!) query.
Returned By
stockMovement query
Member Of
StockMovementEdge object