Stock exports allow fetching a one shot picture of stock at the current point in time. Stock images are highly customizable, making it possible to recover stock in accordance to your operational rules.
Dereferenced stock
It’s possible to recover an image with a quantity of 0 for lines of stock which were referenced in the last export but not anymore.
A referenced stock line is one for which the item and the stock location are included in the stock request.
A dereferenced item/point of stock is one which is no longer returned by the items/point of stock query (aggregates.item_filter.request_name
/ aggregates.endpoint_filter.request_name
).
Stock lines no longer present in OneStock as a result of a scoped import will not be returned in a dereferenced stock export scenario.
Configuration
To be able to recovered dereferenced lines, the following configuration must be added
stock: unreferenced_stock: true
Recovering dereferenced lines
Check out API documentation for GET /stock_exports.