Get a stock item
Returns one stock item by `stockItemId`, with its quantities for the product/warehouse pair. 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*integerint320application/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 GET 'https://<your-instance>/api/stock-items/0' \ -H 'Authorization: Bearer <access-token>'{ "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}Search stock items POST
Returns one page of stock items matching the filter. A stock item is one product's holding in one warehouse. Body is a `PaginationRequest` — see the *Filtering & pagination* concept in the developer docs. Sortable and limitable fields depend on the instance's data-grid view. Requires `Permissions.StockItems.View`.
Update a stock item PUT
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`.