Product composition and parts
See also documentation for products.
Picqer has 4 types of products:
- normal
- unlimited stock
- virtual composition
- composition with own stock
The types with compositions can have parts and all products can be part of a composition. You can even have compositions as part of another composition for nested sets.
Example composition
A composition or 'set' of products is for example a tennis racket and a set of tennis balls. You will have 3 products:
- Tennis racket (normal product)
- Box of 3 tennis balls (normal product)
- Set of tennis racket and a box of 3 tennis balls (virtual composition, with the 2 above products as parts)
Get parts of a product
If a product is a composition, you can retrieve its parts.
Add parameter `nested=true` to get all parts that are nested below these parts, to get the full tree of parts. Full url: https://example.picqer.com/api/v1/products/{idproduct}/parts?nested=true For each "virtual_composition", it will give a "parts" key with an array of all parts below.
Get single product part
Add a part to a product
Update amount of parts
You can only update the amount of parts that is included in the composition.
Delete a product part
Register production
You can run production to keep stock levels up for composition products.