Search stock items
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`.
BearerAuthorizationBearer <token>OAuth 2.0 client credentials. Obtain a client id/secret from Winshop support ([email protected]), then POST to the token URL.
application/json- body
filter?Endpoint-specific filter. Every field is optional; the ones you set are combined with AND.
limitFields?array<string>|Names of the fields to return; omit it for all of them. Which fields exist depends on the instance's data-grid view.
orderBy?array<string>|Sort order, one entry per level, each written as Field or Field desc. Which fields can be sorted on depends on the instance's data-grid view.
pageNumber?integer1-based page to return. 0 and 1 both mean the first page.
int32pageSize?integerRows per page. Defaults to every matching row, and -1 asks for every row explicitly.
int32application/json- response
currentPage?integer1-based number of the page in this response.
int32data?array<>The rows of this page, shaped by the request's limitFields.
hasNextPage?booleanTrue when a page follows this one.
hasPreviousPage?booleanTrue when a page precedes this one.
pageSize?integerRows per page actually applied, which is 10 when the request asked for a non-positive size.
int32totalCount?integerNumber of rows matching the filter across every page.
int32totalPages?integerNumber of pages the whole result set spans at this page size.
int32curl -X POST 'https://<your-instance>/api/stock-items/filter-paginated' \ -H 'Authorization: Bearer <access-token>' \ -H 'Content-Type: application/json' \ -d '{}'{ "currentPage": 0, "data": [ { "barcode": "string", "batch": true, "brand": "string", "calculateDuringIntake": true, "colorId": 0, "colorName": "string", "commodity": "string", "createdAt": "2019-08-24T14:15:22Z", "dimensionId": 0, "dimensionName": "string", "doNotOrderItem": true, "dontCalculateDuringStockMovement": true, "environmentalTax": 0, "eshopSeasonId": 0, "groupCode": "string", "groupId": 0, "id": 0, "initialDate": "2019-08-24T14:15:22Z", "initialQuantity": 0, "initialStockPrice": 0, "isAvailableOnlyToOrder": true, "isBazaar": true, "isCalculated": true, "isColorAndSize": true, "isCommissionItem": true, "isEviscerating": true, "isExpirationRequired": true, "isExportedToEshop": true, "isInPromo": true, "isInactive": true, "isInactiveInWarehouse": true, "isLimitedSeries": true, "isNew": true, "isOnSaleOut": true, "isService": true, "isVariantExportedToEshop": true, "isVoucher": true, "lastModify": "2019-08-24T14:15:22Z", "lastRepricingDate": "2019-08-24T14:15:22Z", "lengthId": 0, "lengthName": "string", "locationText": "string", "manufacturersBrandId": 0, "margin": 0, "maxQuantity": 0, "minQuantity": 0, "modelId": 0, "nearestDeliveryDate": "2019-08-24T14:15:22Z", "note": "string", "optQuantity": 0, "price": 0, "priceListNote": "string", "priceWoVat": 0, "productCode": "string", "productId": 0, "productName": "string", "prohibitionOfDiscounts": true, "prohibitionOfSale": true, "quantityAvailable": 0, "quantityBlocked": 0, "quantityInStock": 0, "quantityOrdered": 0, "quantityOrderedAllWarehouses": 0, "recommendedItem": true, "referencePrice": 0, "referenceQuantity": 0, "requiredItem": true, "royalty": 0, "seasonId": 0, "seasonName": "string", "sizeId": 0, "sizeName": "string", "stockPrice": 0, "subGroupCode": "string", "subGroupId": 0, "supplierId": 0, "supplierName": "string", "supplierNumber": "string", "supplierProductCode": "string", "themeCode": "string", "themeID": 0, "totalQuantity": 0, "trackedItem": true, "unitOfMeasure": "string", "usesLocation": true, "variantId": 0, "variantName": "string", "vatRate": 0, "warehouseId": 0, "warehouseName": "string", "warehouseNumber": "string" } ], "hasNextPage": true, "hasPreviousPage": true, "pageSize": 0, "totalCount": 0, "totalPages": 0}Create stock items POST
Creates the stock items for every combination of `warehouseId` and `productId` that does not have one yet, and returns the rows it created (201, `Location` header set). Returns 200 with no body when every combination already existed. Requires `Permissions.StockItems.View`.
Get a stock item GET
Returns one stock item by `stockItemId`, with its quantities for the product/warehouse pair. Requires `Permissions.StockItems.View`.