API documentation
Method list
Test your request
Changelog


getInventoryStocktakes
The method allows you to retrieve a paginated list of stocktakes from BaseLinker storage. It supports filtering by stocktake, warehouse, status, series, number, and creation date range.


Input parameters
filter_stocktake_idint(optional) Filter by a specific stocktake identifier
filter_warehouse_idint(optional) Filter by warehouse identifier
filter_stocktake_statusint(optional) Filter by stocktake status: 0 - draft, 1 - commissioned, 2 - in progress, 3 - completed, 4 - counted, 5 - rejected
filter_series_idint(optional) Filter by numbering series identifier
filter_stocktake_numbervarchar(50)(optional) Filter by stocktake number (partial match)
filter_date_fromint(optional) Minimum creation date (unix timestamp)
filter_date_toint(optional) Maximum creation date (unix timestamp)
pageint(optional) Results page number (100 stocktakes per page, numbered from 1)



Output data
The method returns the data in JSON format.
statusvarchar(30)SUCCESS - request executed correctly
ERROR - an error occurred during an API request. Error details will be described in 2 additional returned fields: error_message and error_code
stocktakesarrayList of stocktakes
| - stocktake_idintStocktake identifier
| - stocktake_numbervarchar(50)Full stocktake document number
| - namevarchar(80)Stocktake name
| - stocktake_statusintStocktake status: 0 - draft, 1 - commissioned, 2 - in progress, 3 - completed, 4 - counted, 5 - rejected
| - series_idintNumbering series identifier
| - warehouse_idintWarehouse identifier
| - priorityintPriority: 0 - low, 1 - medium, 2 - high, 3 - urgent
| - assigned_tointAssigned employee identifier. 0 if not assigned.
| - items_countintTotal number of items in the stocktake
| - verified_items_countintNumber of items that have been verified (counted)
| - total_quantityintTotal expected quantity of products
| - verified_total_quantityintTotal verified (actually counted) quantity
| - compliant_items_countintNumber of items where verified quantity matches expected quantity
| - not_compliant_items_countintNumber of items where verified quantity differs from expected quantity
| - missing_items_countintNumber of items with expected stock > 0 but verified quantity = 0
| - date_createdintStocktake creation date (unix timestamp)
| - date_completedintStocktake completion date (unix timestamp). 0 if not completed.
| - date_scheduledintExecution scheduled date (unix timestamp). 0 if not set.
| - date_dueintExecution due date (unix timestamp). 0 if not set.
| - notestextStocktake notes
| - items_preparation_statustextStocktake items preparation status: ready, pending, or error



Sample
Input data:
Output data:
A sample request in PHP: