Skip to main content

setTotalStock

Sets the physical stock of a product (or of one of its batches) across all locations to an absolute quantity. The physical stock includes the stock in boxes and goods receipts, which is never booked out: a quantity below it is rejected. Increases are booked into the default warehouse of the default location, onto the default bin location of the product or onto the unknown location when it has none. Decreases are booked from the default location first, then from the other locations in the order of their creation; within a location from its default warehouse first, then from its other warehouses in the order of their creation; within a warehouse from the bin locations in ascending order of their codes, then from the unknown location. Each change is booked as stock movements against the stock-correction special location. Returns the product.

Required scopes​

The token needs the stocks:write access scope.

setTotalStock(
input: SetTotalStockInput!
): Product!

Arguments​

setTotalStock.input ● SetTotalStockInput! non-null input​

Type​

Product object​

A purchasable article tracked in the catalog.