API documentation
Method list
Test your request
Changelog


setInventoryStocktakeStatus
The method allows you to change the status of a stocktake. When completing a stocktake, verified quantities are applied to warehouse stock and corresponding documents are generated.


Input parameters
stocktake_idintStocktake identifier
statusintTarget stocktake status: 0 - draft, 1 - commissioned, 2 - in progress, 3 - completed, 4 - counted, 5 - rejected
completed_itemsarray(optional) List of verified items with counted quantities. Can be provided when changing status to in progress (2), counted (4), or completed (3).
| - item_idintItem identifier
| - completed_quantityintVerified (actually counted) quantity. Must not be negative.



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



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