Products in Picqer have stock: the amount of a product that is physically in the warehouse.
Stock is registered per warehouse, and (optionally) per location.
Locations and non-location stock
A location is a specific bin or shelf in the warehouse. Stock for a product can be registered at a specific location, or on "no specific location" in a warehouse. If you see the stock for a warehouse, this is always the total stock for all locations in that warehouse and the stock on no specific location.
Changing and moving stock
You can change the stock by adding, removing or setting the stock level. You can do this for a specific location or for the stock without a specific location. When lowering the stock, keep in mind that stock cannot be negative or lower then is reserved for picklists.
You can move stock between locations in the same warehouse. This will not result in a change of stock for the warehouse in total, and thus not generate stock pushes to external systems and webshops. Moving stock cannot result in negative stock on a location, but you can move reserved stock. Reservations on picklists will move to the new location as well.
Get stock for single product
Requesting the stock for a product gives you the total stock for the warehouse.
Get stock in single warehouse
When you request the stock for a product in a specific warehouse, you get all the linked locations and the stock per location.
With this endpoint you can change the stock for a product. Either the stock on a specific location, or on "no specific location".
You can either 'change' the stock to add or remove stock, or set the stock to a specific 'amount'.
Heads up: Property "idlocation" is optional for backwards compatibility, but we advice to always provide the "idlocation" property to be explicit of your intent.
Give the id of the location you want to change the stock of, or give `null` if you want to change the stock on "no specific location". If you omit the idlocation property, Picqer will try to find a matching location or use "no specific location" if it cannot find a good location candidate.
|idlocation||integer||optional, but recommended||Linked to resource Locations, or `null` for no specific location|
|change||integer||required if `amount` not provided||Positive number to add stock, negative number to remove stock|
|amount||integer||required if `change` not provided||Amount of stock to set, overrides current stock level|
|reason||string||required||Reason of the change|
Add stock to a location
No specific location
Another example to lower the stock on no specific location:
You can only change stock of active products of type 'normal' or 'composition_with_stock'.
Move stock between locations
You can move stock between locations in the same warehouse, and between "no specific location" and a specific location.
|from_idlocation||integer/null||required||Linked to resource Locations, or `null` for no specific location|
|to_idlocation||integer/null||required||Linked to resource Locations, or `null` for no specific location|
|amount||integer||required||Amount of stock to move|
Move between locations
Move directly between 2 specific locations by mentioning those idlocations. You can only move between locations of the same warehouse.
Move from "no specific location" to a location
Always provide `from_idlocation` and `to_idlocation` properties. Use value `null` if you want to move from or to "no specific location".