I need to get a list of all BOM/parts list products on a given product through the API.
Can anyone please point me in the right direction?
Developer forum
E-mail notifications
BOM/Parts list through API

Martin Moen





Posted on 20/02/2023 11:21:22
Replies

Umar Farooq









Posted on 20/02/2023 15:27:30
This post has been marked as an answer
I dont know the full context, but May be this helps
var bomProducts = new ProductCollection();
var mainProduct = Dynamicweb.Ecommerce.Services.Products.GetProductById("PROD136", "", true);
foreach (Dynamicweb.Ecommerce.Products.ProductItem item in mainProduct.Items)
{
bomProducts.Add(item.Products.FirstOrDefault())
}
Votes for this answer: 1

Martin Moen





Posted on 21/02/2023 13:51:26
Thanks! "Items" was the thing I was looking for. A well hidden poorly named gem in the API :P
You must be logged in to post in the forum