Product stock

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 https://example.picqer.com/api/v1/products/{idproduct}/stock
HTTP/1.1 200 OK [ { "idwarehouse": 1, "stock": 22, "reserved": 1, "reservedbackorders": 0, "reservedpicklists": 1, "reservedallocations": 0, "freestock": 21 }, { "idwarehouse": 3835, "stock": 2, "reserved": 0, "reservedbackorders": 0, "reservedpicklists": 0, "reservedallocations": 0, "freestock": 2 } ]

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.

GET https://example.picqer.com/api/v1/products/{idproduct}/stock/{idwarehouse}
HTTP/1.1 200 OK { "idwarehouse": 1, "stock": 22, "reserved": 1, "reservedbackorders": 0, "reservedpicklists": 1, "reservedallocations": 0, "freestock": 21, "locations": [ { "idlocation": 8, "idwarehouse": 1, "name": "A.1.1.5", "stock": 0, "reserved_picklists": 0, "free_stock": 0, "is_bulk_location": true }, { "idlocation": 5, "idwarehouse": 1, "name": "A.1.1.2", "stock": 0, "reserved_picklists": 0, "free_stock": 0, "is_bulk_location": false }, { "idlocation": 3, "idwarehouse": 1, "name": "A.1.1", "stock": 16, "reserved_picklists": 1, "free_stock": 15, "is_bulk_location": false } ] }

Change stock

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.

Attributes

Name Type Required Description
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

POST https://example.picqer.com/api/v1/products/{idproduct}/stock/{idwarehouse}
{ "idlocation": 5, "change": 6, "reason": "Purchased inventory" }
HTTP/1.1 200 OK { "idwarehouse": 1, "stock": 28, "reserved": 1, "reservedbackorders": 0, "reservedpicklists": 1, "reservedallocations": 0, "freestock": 27, "locations": [ { "idlocation": 8, ... }, { "idlocation": 5, "idwarehouse": 1, "name": "A.1.1.2", "stock": 6, "reserved_picklists": 0, "free_stock": 6, "is_bulk_location": false }, { "idlocation": 3, ... } ] }

No specific location

Another example to lower the stock on no specific location:

POST https://example.picqer.com/api/v1/products/{idproduct}/stock/{idwarehouse}
{ "idlocation": null, "change": -2, "reason": "Stock count corrections" }
HTTP/1.1 200 OK { "idwarehouse": 1, "stock": 26, "reserved": 1, "reservedbackorders": 0, "reservedpicklists": 1, "reservedallocations": 0, "freestock": 25, "locations": [ { "idlocation": 8, "idwarehouse": 1, "name": "A.1.1.5", "stock": 0, ... }, { "idlocation": 5, "idwarehouse": 1, "name": "A.1.1.2", "stock": 6, ... }, { "idlocation": 3, "idwarehouse": 1, "name": "A.1.1", "stock": 16, ... } ] }

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.

Attributes

Name Type Required Description
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.

POST https://example.picqer.com/api/v1/products/{idproduct}/stock/{idwarehouse}/move
{ "from_idlocation": 8, "to_idlocation": 5, "amount": 1 }
HTTP/1.1 200 OK { "idwarehouse": 1, "stock": 26, "reserved": 1, "reservedbackorders": 0, "reservedpicklists": 1, "reservedallocations": 0, "freestock": 25, "locations": [ { "idlocation": 8, "idwarehouse": 1, "name": "A.1.1.5", "stock": 1, "reserved_picklists": 0, "free_stock": 1, "is_bulk_location": true }, { "idlocation": 5, "idwarehouse": 1, "name": "A.1.1.2", "stock": 7, "reserved_picklists": 0, "free_stock": 7, "is_bulk_location": false } ] }

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

POST https://example.picqer.com/api/v1/products/{idproduct}/stock/{idwarehouse}/move
{ "from_idlocation": null, "to_idlocation": 8, "amount": 2 }
HTTP/1.1 200 OK { "idwarehouse": 1, "stock": 26, "reserved": 1, "reservedbackorders": 0, "reservedpicklists": 1, "reservedallocations": 0, "freestock": 25, "locations": [ { "idlocation": 8, "idwarehouse": 1, "name": "A.1.1.5", "stock": 2, "reserved_picklists": 0, "free_stock": 2, "is_bulk_location": true }, { "idlocation": 5, "idwarehouse": 1, "name": "A.1.1.2", "stock": 6, "reserved_picklists": 0, "free_stock": 6, "is_bulk_location": false } ] }