Stock history
There are 2 different endpoints about stock history:
- Stock history (this page): only contains changes of the stock levels of a product. This gives you every product coming in or going out of your warehouse. Mentioned stock levels are on a product-warehouse basis.
- Location stock history: gives stock changes on a per location basis. Which means that it also tracks stock movements inside the same warehouse. Mentioned stock levels are on a product-location basis.
Get full stock history
Filters
You can filter the history with the following parameters. Add these filters as querystring parameters to the URL.
| Attribute | Description | Example |
|---|---|---|
| sincedate | Get the history that is added after this date and time. | 2016-01-01 12:00:00 |
| untildate | Get the history that is added before this date and time. | 2024-01-01 00:00:00 |
| idproduct | Get the history for this product. | 1106133 |
| idwarehouse | Get the history in this warehouse. | 13 |
| iduser | Get the history made by this user. | 424 |
| sinceid | Get the history with a higher idproduct_stock_history than given. Sorts the history by idproduct_stock_history, highest first. See paging through large lists. | 0 |
| beforeid | Get the history with a lower idproduct_stock_history than given. Sorts the history by idproduct_stock_history, highest first. See paging through large lists. | 599693129 |
Get single history item
Change types
Every change in the stock level of a product is categorized by a change_type. These are the possible change types:
- api
- import
- initialimport
- manual
- moved
- picking
- pickingrollback
- production
- purchaseorder
- quickscan
- receipt
- returned
- stockcount
- webshopimport
Changing history
It is not possible to change history. Therefor you cannot POST, PUT or DELETE history items.
See the products endpoint for information about changing current stock levels.
