Developer forum

Forum » Development » BOM/Parts list through API

BOM/Parts list through API

Martin Moen
Reply

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?


Replies

 
Umar Farooq
Reply
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
Reply

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