Stock history

This is the endpoint that gives you every stock change that ever happened in your account.

Get full stock history

GET https://example.picqer.com/api/v1/stockhistory
HTTP/1.1 200 OK [ { "idproduct_stock_history": 7328372, "idproduct": 1107613, "idwarehouse": 1124, "iduser": 424, "old_stock": 21, "stock_change": 3, "new_stock": 24, "reason": "No reason given", "change_type": "manual", "changed_at": "2016-08-01 10:43:43" }, { "idproduct_stock_history": 7328371, "idproduct": 1106133, "idwarehouse": 13, "iduser": null, "old_stock": 0, "stock_change": 21, "new_stock": 21, "reason": "External", "change_type": "api", "changed_at": "2016-07-27 14:33:59" } ]

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

Get single history item

GET https://example.picqer.com/api/v1/stockhistory/{idproduct_stock_history}
HTTP/1.1 200 OK { "idproduct_stock_history": 7328372, "idproduct": 1107613, "idwarehouse": 1124, "iduser": 424, "old_stock": 21, "stock_change": 3, "new_stock": 24, "reason": "No reason given", "change_type": "manual", "changed_at": "2016-08-01 10:43:43" }

Changing history

Of course it is not possible to change history. Therefor you cannot POST, PUT or DELETE history items.

But you can change the stock. See the products endpoint for information about changing current stock levels.

Read more VAT Groups