Products

Products are the core of Picqer. You can only sell and buy items that exists as a product in your catalog. To start managing stock of a product, add the product first and then update it's stock.

See also documentation for compositions and product parts.

Attributes

Name Type Required Description
idproduct integer generated Unique Picqer reference
idvatgroup integer required Linked to resource Vatgroups
name string required Name of product
price float required Price excluding VAT
fixedstockprice float optional Fixed stock price of product excluding VAT
idsupplier integer optional Linked to resource Suppliers
productcode string required Product code of product, needs to be unique
productcode_supplier string optional Product code of this product at supplier, used for purchase orders
deliverytime integer optional Delivery time from supplier in days
description string optional Longer description of product
barcode string optional Barcode (usually GS1, EAN13 or UPC code)
type string optional Only options: normal (default), unlimited_stock, virtual_composition, composition_with_stock
unlimitedstock boolean optional Deprecated in favor of 'type'. When unlimited stock is true, no stock will be monitored for this product
weight integer optional Weight of this product in grams
minimum_purchase_quantity integer optional The minimum amount you need to purchase from your supplier
purchase_in_quantities_of integer optional If you need to purchase this products in batches of x pieces
hs_code string optional HS Code for customs
country_of_origin string optional Country of origin of this product for customs (needs to be ISO 3166 2-char code)
active boolean optional Default true

Get all products

GET https://example.picqer.com/api/v1/products
HTTP/1.1 200 OK [ { "idproduct": 626, "idvatgroup": 18, "idsupplier": null, "productcode": "6531", "name": "HyperKewl Ultra Sport Cooling Vest", "price": 54.46, "fixedstockprice": 32.11, "productcode_supplier": "", "deliverytime": null, "description": null, "barcode": null, "unlimitedstock": false, "assembled": false, "type": "normal", "weight": 1500, "minimum_purchase_quantity": 0, "purchase_in_quantities_of": 0, "hs_code": null, "country_of_origin": null, "active": true, "productfields": [ { "idproductfield": 11, "title": "Eenheid", "value": "liter" } ], "images": [ "https:\/\/link-to-image.com/image2867\/original", "https:\/\/link-to-image.com/image2867\/original", "https:\/\/link-to-image.com/image2867\/original", "https:\/\/link-to-image.com/image2867\/original" ], "stock": [ { "idwarehouse": 18, "stock": 0, "reserved": 6, "reservedbackorders": 6, "reservedpicklists": 0, "reservedallocations": 0, "freestock": -6 } ], "tags": { "TopWebshop": { "idtag": 1075, "title": "TopWebshop", "color": "#5993be", "inherit": true, "textColor": "#000000" }, "SummerProducts": { "idtag": 1156, "title": "SummerProducts", "color": "#c7b4f6", "inherit": true, "textColor": "#000000" } } }, { "idproduct": 633, "idvatgroup": 18, "idsupplier": null, "productcode": "6531-RB-7-9", "name": "Hyperkewl Evaporative Cooling Vest Ultra Blue 7-9yr", "price": 54.46, "fixedstockprice": 0, "productcode_supplier": "", "deliverytime": null, "description": null, "barcode": "857825001442", "unlimitedstock": false, "assembled": false, "type": "normal", "weight": null, "minimum_purchase_quantity": 0, "purchase_in_quantities_of": 0, "hs_code": null, "country_of_origin": null, "active": true, "tags": {}, "productfields": [ { "idproductfield": 11, "title": "Eenheid", "value": "liter" } ], "images": [ "https:\/\/link-to-image.com/image2867\/original", "https:\/\/link-to-image.com/image2867\/original", "https:\/\/link-to-image.com/image2867\/original", "https:\/\/link-to-image.com/image2867\/original" ], "stock": [ { "idwarehouse": 18, "stock": 112, "reserved": 0, "reservedbackorders": 0, "reservedpicklists": 0, "reservedallocations": 0, "freestock": 112 } ] } ]

Filters

You can filter the products with the following parameters. Add these filters as querystring parameters to the URL.

Attribute Description Example
inactive If provided, you only get the inactive products. Otherwise the active products. true
tag Get the products that has the given tag name associated with them. summer
productcode Get the product with the provided productcode. EJK89272
search Search through the fields name, product code, supplier product code and barcode.

Get single product

GET https://example.picqer.com/api/v1/products/{idproduct}
HTTP/1.1 200 OK { "idproduct": 633, "idvatgroup": 18, "idsupplier":null, "name": "Hyperkewl Evaporative Cooling Vest Ultra Blue 7-9yr", "price": 54.46, "fixedstockprice": 0, "productcode": "6531-RB-7-9", "productcode_supplier": "", "deliverytime": null, "description": "", "barcode": "857825001442", "unlimitedstock": false, "weight": 200, "active": true, "productfields": [ { "idproductfield": 11, "title": "Eenheid", "value": "liter" } ], "images": [ "https:\/\/link-to-image.com/image2867\/original", "https:\/\/link-to-image.com/image2867\/original", "https:\/\/link-to-image.com/image2867\/original", "https:\/\/link-to-image.com/image2867\/original" ], "stock": [ { "idwarehouse": 18, "stock": 112, "reserved": 0, "reservedbackorders": 0, "reservedpicklists": 0, "reservedallocations": 0, "freestock": 112 } ], "tags": { "SummerProducts": { "idtag": 1156, "title": "SummerProducts", "color": "#c7b4f6", "inherit": true, "textColor": "#000000" } } }

Create new product

POST https://example.picqer.com/api/v1/products
{ "idvatgroup": 18, "productcode": "883629-22", "name": "Hyperkewl Evaporative Cooling Vest Ultra Blue 7-9yr", "price": 54.46 }
HTTP/1.1 201 Created { "idproduct": 119692, "idvatgroup": 18, "idsupplier": null, "productcode": "883629-22", "name": "Hyperkewl Evaporative Cooling Vest Ultra Blue 7-9yr", "price": 54.46, "fixedstockprice": 0, "productcode_supplier": "", "deliverytime": null, "description": null, "barcode": null, "unlimitedstock": false, "weight": null, "stock": [] }

Update product

You can update all fields of a product. Two fields are special: active and type.

To make a product inactive: it cannot have stock, cannot be used in compositions and cannot be on open picklists or purcahse orders.

To change the type of a product: it cannot have stock, have parts or be on open picklists or purcahse orders.

PUT https://example.picqer.com/api/v1/products/{idproduct}
{ "name": "Hyperkewl Evaporative Cooling Vest Ultra Red", "price": 51.99, "productfields": [ { "idproductfield": 11, "value": "liter" } ] }
HTTP/1.1 200 OK { "idproduct": 119692, "idvatgroup": 18, "idsupplier": null, "productcode": "883629-22", "name": "Hyperkewl Evaporative Cooling Vest Ultra Red", "price": 51.99, "fixedstockprice": 0, "productcode_supplier": "", "deliverytime": null, "description": null, "barcode": null, "unlimitedstock": false, "assembled": false, "type": "normal", "weight": null, "minimum_purchase_quantity": 0, "purchase_in_quantities_of": 0, "hs_code": null, "country_of_origin": null, "active": true, "productfields": [ { "idproductfield": 11, title: "Eenheid", "value": "liter" } ], "stock": [] }

Get stock info of product

GET https://example.picqer.com/api/v1/products/{idproduct}/stock
HTTP/1.1 200 OK [ { "idwarehouse": 18, "stock": 112, "reserved": 0, "reservedbackorders": 0, "reservedpicklists": 0, "reservedallocations": 0, "freestock": 112 }, { "idwarehouse": 40, "stock": 12, "reserved": 0, "reservedbackorders": 0, "reservedpicklists": 0, "reservedallocations": 0, "freestock": 0 } ]

Get stock info of product from 1 warehouse

GET https://example.picqer.com/api/v1/products/{idproduct}/stock/{idwarehouse}
HTTP/1.1 200 OK { "idwarehouse": 18, "stock": 112, "reserved": 0, "reservedbackorders": 0, "reservedpicklists": 0, "reservedallocations": 0, "freestock": 112 }

Update stock info of product

With this call, you can update the stock of a product in a specific warehouse. You can either 'set' the stock (overwrite the current value), or 'change' the stock (add or detract from current stock level).

When you want to 'set' the stock level, post the values 'amount' for the new amount of stock, and 'reason' for the reason from this stock change.

If you want to 'change' the stock level, provide the values 'change' (can be positive and negative) for the amount of the stock change, and the 'reason' of the stock change.

The stock 'change' is shown in the example below.

POST https://example.picqer.com/api/v1/products/{idproduct}/stock/{idwarehouse}
{ "change": -5, "reason": "Products damaged in warehouse processing" }
HTTP/1.1 200 OK { "idwarehouse": 40, "stock": 7, "reserved": 0, "reservedbackorders": 0, "reservedpicklists": 0, "reservedallocations": 0, "freestock": 0 }

Get warehouse settings

Each product can have different settings per warehouse. You can get the current settings for all warehouses with this request.

GET https://example.picqer.com/api/v1/products/{idproduct}/warehouses
HTTP/1.1 200 OK [ { "idproduct":954712, "idwarehouse":18, "stock_level_order":3, "stock_level_desired":5, "stock_level_maximum":0, "stock_location":"AB.291" }, { "idproduct":954712, "idwarehouse":1389, "stock_level_order":2, "stock_level_desired":0, "stock_level_maximum":0, "stock_location":"EK.928" } ]

Update warehouse setting

You can update the product warehouses settings on a per warehouse basis with this request.

stock_location is deprecated

The stock_location field is deprecated but will remain available for backwards compatibility. It is replaced by dedicated locations and you can link products to existing locations. If you enter a location in stock_location that does not exist yet, we will create it for you. You can enter multiple locations by seperating them by a comma: "A.12, A.21".

PUT https://example.picqer.com/api/v1/products/{idproduct}/warehouses/{idwarehouse}
{ "stock_level_order":5, "stock_level_desired":10, "stock_level_maximum":0, "stock_location":"AB.221" }
HTTP/1.1 200 OK { "idproduct":954712, "idwarehouse":18, "stock_level_order":5, "stock_level_desired":10, "stock_level_maximum":0, "stock_location":"AB.221" }

Get all images of product

GET https://example.picqer.com/api/v1/products/{idproduct}/images
HTTP/1.1 200 OK [ { "idproduct_image": 12123, "idproduct": 1105343, "url": "https://cdn.example.com/3123/1e7af8e2/original.jpg", "contenttype": "image/jpeg", "size": 7210 }, { "idproduct_image": 12222, "idproduct": 1105343, "url": "https://cdn.example.com/3123/a1b483f2/original.jpg", "contenttype": "image/jpeg", "size": 67210 } ]

Add new image to product

Only JPEG and PNG images are allowed. Encode them as a base64 string to feed to the API.

POST https://example.picqer.com/api/v1/products/{idproduct}/images
{ "image": "--base64 encoded image--" }
HTTP/1.1 201 Created { "idproduct_image": 12124, "idproduct": 1105345, "url": "https://cdn.example.com/3123/1e7af8e2/original.jpg", "contenttype": "image/jpeg", "size": 7210 }

Delete a product image

DELETE https://example.picqer.com/api/v1/products/{idproduct}/images/{idproduct_image}
HTTP/1.1 204 No Content

Get locations from a product

A product can be located at none, one or more locations.

GET https://example.picqer.com/api/v1/products/{idproduct}/locations
HTTP/1.1 200 OK [ { "idlocation": 4, "idwarehouse": 13, "parent_idlocation": 3, "name": "A.1.1.A", "remarks": null, "unlink_on_empty": false, "location_type": { "idlocation_type": 2, "name": "Standaard", "default": true, "color": "#0000f0" } } ]

Link product to a location

POST https://example.picqer.com/api/v1/products/{idproduct}/locations
{ "idlocation": 5 }
HTTP/1.1 201 Created { "idlocation": 5, "idwarehouse": 13, "parent_idlocation": 3, "name": "A.1.1.B", "remarks": null, "unlink_on_empty": false, "location_type": { "idlocation_type": 2, "name": "Standaard", "default": true, "color": "#0000f0" } }

Unlink product from a location

DELETE https://example.picqer.com/api/v1/products/{idproduct}/locations/{idlocation}
HTTP/1.1 204 No Content

Get tags from a product

Products can have tags linked to them.

GET https://example.picqer.com/api/v1/products/{idproduct}/tags
HTTP/1.1 200 OK [ { "idtag":11, "title":"Winter", "color":"#03008a", "inherit":false, "textColor":"#FFFFFF" }, { "idtag":13, "title":"Hoeden", "color":"#03008a", "inherit":false, "textColor":"#FFFFFF" } ]

Add tag to product

POST https://example.picqer.com/api/v1/products/{idproduct}/tags
{ "idtag": 223 }
HTTP/1.1 201 Created { "idtag":223, "title":"Zomer", "color":"#03008a", "inherit":false, "textColor":"#FFFFFF" }

Remove tag from product

DELETE https://example.picqer.com/api/v1/products/{idproduct}/tags/{idtag}
HTTP/1.1 204 No Content
Read more Orders