Update a stock item
Updates the stock item's editable fields — such as its minimum and maximum stock levels and shelf location — and returns the stored row. Quantities move through documents, not through this endpoint. Requires `Permissions.StockItems.View`.
BearerAuthorizationBearer <token>OAuth 2.0 client credentials. Obtain a client id/secret from Winshop support ([email protected]), then POST to the token URL.
stockItemId*integerint32application/json- body
batchId?|Batch these goods belong to. Read-only.
int32cashRegisterPriceChangeMinAmount?|Lowest selling price a till operator may discount this item to.
decimalcolorId?|Colour of this holding's variant; 0 when the product has no colour breakdown. Read-only.
int32createdAt?|When the stock item was created. Read-only.
date-timedimensionId?|Dimension of this holding's variant; 0 when the product has no dimension breakdown. Read-only.
int32dontCalculateDuringStockMovement?|True when stock movements skip recalculating this item's stock price. Read-only.
guid?|Stable identifier of the stock item. Read-only.
guidid?|Row id of the stock item. Read-only; the server assigns it.
int32initialDate?|Date the opening balance was taken. Read-only.
date-timeinitialQuantity?|Quantity at the opening balance. Read-only.
decimalinitialStockPrice?|Stock price at the opening balance. Read-only.
decimalisCommissionItem?|True when the goods are held on commission and not yet owned. Read-only.
isInactive?|True to hide the stock item from pickers without deleting it.
lastPurchasePrice?|Purchase price of the most recent intake. Read-only.
decimallastmodifyDate?|When the stock item was last changed. Read-only.
date-timelengthId?|Length of this holding's variant; 0 when the product has no length breakdown. Read-only.
int32maxQuantity?|Stock level above which the item counts as overstocked.
decimalminQuantity?|Stock level below which the item should be reordered.
decimalnote?|Free-text note on the stock item.
optQuantity?|Stock level the item should be replenished back to.
decimaloptTurnover?|Target turnover in days, used when proposing reorder quantities.
int32positionId?|Shelf position holding these goods, from the positions item list. Read-only.
int32positionText?|Shelf position as free text, for positions not held as rows.
length <= 100productId?|Product this holding is of. Read-only.
int32quantity?|Quantity physically on stock, including what other documents have blocked. Read-only; documents move it.
decimalquantityAvailable?|Quantity free to sell: what is on stock less what other documents have already blocked. Read-only.
decimalquantityChangeReason?|Reason recorded for the last manual change of the quantity. Read-only.
length <= 50referenceQuantity?|Quantity a stock taking compares the counted amount against.
decimalsizeId?|Size of this holding's variant; 0 when the product has no size breakdown. Read-only.
int32stockPrice?|Current stock (cost) price per unit. Read-only; documents move it.
decimaluserId?|User who last changed the stock item. Read-only.
int32variantId?|Variant these goods belong to. Read-only.
int32warehouseId?|Warehouse this holding belongs to. Read-only.
int32application/json- response
batchId?|Batch these goods belong to. Read-only.
int32cashRegisterPriceChangeMinAmount?|Lowest selling price a till operator may discount this item to.
decimalcolorId?|Colour of this holding's variant; 0 when the product has no colour breakdown. Read-only.
int32createdAt?|When the stock item was created. Read-only.
date-timedimensionId?|Dimension of this holding's variant; 0 when the product has no dimension breakdown. Read-only.
int32dontCalculateDuringStockMovement?|True when stock movements skip recalculating this item's stock price. Read-only.
guid?|Stable identifier of the stock item. Read-only.
guidid?|Row id of the stock item. Read-only; the server assigns it.
int32initialDate?|Date the opening balance was taken. Read-only.
date-timeinitialQuantity?|Quantity at the opening balance. Read-only.
decimalinitialStockPrice?|Stock price at the opening balance. Read-only.
decimalisCommissionItem?|True when the goods are held on commission and not yet owned. Read-only.
isInactive?|True to hide the stock item from pickers without deleting it.
lastPurchasePrice?|Purchase price of the most recent intake. Read-only.
decimallastmodifyDate?|When the stock item was last changed. Read-only.
date-timelengthId?|Length of this holding's variant; 0 when the product has no length breakdown. Read-only.
int32maxQuantity?|Stock level above which the item counts as overstocked.
decimalminQuantity?|Stock level below which the item should be reordered.
decimalnote?|Free-text note on the stock item.
optQuantity?|Stock level the item should be replenished back to.
decimaloptTurnover?|Target turnover in days, used when proposing reorder quantities.
int32positionId?|Shelf position holding these goods, from the positions item list. Read-only.
int32positionText?|Shelf position as free text, for positions not held as rows.
length <= 100productId?|Product this holding is of. Read-only.
int32quantity?|Quantity physically on stock, including what other documents have blocked. Read-only; documents move it.
decimalquantityAvailable?|Quantity free to sell: what is on stock less what other documents have already blocked. Read-only.
decimalquantityChangeReason?|Reason recorded for the last manual change of the quantity. Read-only.
length <= 50referenceQuantity?|Quantity a stock taking compares the counted amount against.
decimalsizeId?|Size of this holding's variant; 0 when the product has no size breakdown. Read-only.
int32stockPrice?|Current stock (cost) price per unit. Read-only; documents move it.
decimaluserId?|User who last changed the stock item. Read-only.
int32variantId?|Variant these goods belong to. Read-only.
int32warehouseId?|Warehouse this holding belongs to. Read-only.
int32curl -X PUT 'https://<your-instance>/api/stock-items/0' \ -H 'Authorization: Bearer <access-token>' \ -H 'Content-Type: application/json' \ -d '{ "cashRegisterPriceChangeMinAmount": 15.5, "isInactive": true, "maxQuantity": 750, "minQuantity": 50, "note": "Updated Max/Min quantities and repositioned.", "optTurnover": 6, "positionText": "Zone A, Shelf 3, Bin B", "referenceQuantity": 100}'{ "batchId": 0, "cashRegisterPriceChangeMinAmount": 0, "colorId": 0, "createdAt": "2019-08-24T14:15:22Z", "dimensionId": 0, "dontCalculateDuringStockMovement": true, "guid": "string", "id": 0, "initialDate": "2019-08-24T14:15:22Z", "initialQuantity": 0, "initialStockPrice": 0, "isCommissionItem": true, "isInactive": true, "lastPurchasePrice": 0, "lastmodifyDate": "2019-08-24T14:15:22Z", "lengthId": 0, "maxQuantity": 0, "minQuantity": 0, "note": "string", "optQuantity": 0, "optTurnover": 0, "positionId": 0, "positionText": "string", "productId": 0, "quantity": 0, "quantityAvailable": 0, "quantityChangeReason": "string", "referenceQuantity": 0, "sizeId": 0, "stockPrice": 0, "userId": 0, "variantId": 0, "warehouseId": 0}Get a stock item GET
Returns one stock item by `stockItemId`, with its quantities for the product/warehouse pair. Requires `Permissions.StockItems.View`.
List blocking documents GET
Returns the unprocessed documents holding part of this stock item. Blocked goods are quantities that physically sit in the warehouse but are already promised elsewhere, so they are not available to sell. Requires `Permissions.StockItems.View`.