WinShopAPI docs
ReferenceStock items

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`.

POST
/api/stock-items/filter-paginated

Authorization

Bearer
headerAuthorizationBearer <token>

OAuth 2.0 client credentials. Obtain a client id/secret from Winshop support ([email protected]), then POST to the token URL.

Request Body

application/json
  1. 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?integer

1-based page to return. 0 and 1 both mean the first page.

Formatint32
pageSize?integer

Rows per page. Defaults to every matching row, and -1 asks for every row explicitly.

Formatint32

Response Body

application/json
  1. response
currentPage?integer

1-based number of the page in this response.

Formatint32
data?array<>

The rows of this page, shaped by the request's limitFields.

hasNextPage?boolean

True when a page follows this one.

hasPreviousPage?boolean

True when a page precedes this one.

pageSize?integer

Rows per page actually applied, which is 10 when the request asked for a non-positive size.

Formatint32
totalCount?integer

Number of rows matching the filter across every page.

Formatint32
totalPages?integer

Number of pages the whole result set spans at this page size.

Formatint32
curl -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}