Skip to main content

setStockAtBinLocation

Sets the absolute stock quantity for a (product, bin location[, batch]) tuple. Computes the delta against the current stock and writes one stock movement against the stock-correction special location. Returns the stock row of the bin location, or null when the bin location holds no stock afterwards and is not the default bin location of the product.

Required scopes​

The token needs the stocks:write access scope.

setStockAtBinLocation(
input: SetStockAtBinLocationInput!
): Stock

Arguments​

setStockAtBinLocation.input ● SetStockAtBinLocationInput! non-null input​

Type​

Stock object​

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.