I am trying to create bundle product from c#.net, but it is throwing error.
The value of attribute price_view must be set
try
{
learningProductProductRepositoryV1Service objSrvc = new learningProductProductRepositoryV1Service();
objSrvc.Credentials = new System.Net.NetworkCredential("democustomer", "kujpuds24jceio16du96a24rj2pilnw5cd3g");//ay9669xbavrxoed2jxpduno858cwrgxs5rej
LearningProductProductRepositoryV1Product_multiCreateRequest objP = new LearningProductProductRepositoryV1Product_multiCreateRequest();
objP.product = new CatalogDataProductInterface[1];
objP.product[0] = new CatalogDataProductInterface();
objP.product[0].name = "Computer Kit Components";
objP.product[0].price = 201.00f;
objP.product[0].priceSpecified = true;
objP.product[0].sku = "CKC";
objP.product[0].status = 1;
objP.product[0].statusSpecified = true;
objP.product[0].visibility = 4;
objP.product[0].visibilitySpecified = true;
objP.product[0].weight = 3.00f;
objP.product[0].weightSpecified = true;
objP.product[0].typeId = "bundle";
objP.product[0].attributeSetId = 4;
objP.product[0].attributeSetIdSpecified = true;
objP.product[0].extensionAttributes = new CatalogDataProductExtensionInterface();
objP.product[0].extensionAttributes.stockItem = new CatalogInventoryDataStockItemInterface();
objP.product[0].extensionAttributes.stockItem.qty = 125;
objP.product[0].extensionAttributes.stockItem.isInStock = true;
objP.product[0].extensionAttributes.stockItem.isQtyDecimal = false;
objP.product[0].extensionAttributes.stockItem.useConfigMinQty = true;
objP.product[0].extensionAttributes.stockItem.minQty = 1f;
objP.product[0].extensionAttributes.stockItem.useConfigMinSaleQty = 1;
objP.product[0].extensionAttributes.stockItem.minSaleQty = 1f;
objP.product[0].extensionAttributes.stockItem.useConfigMaxSaleQty = true;
objP.product[0].extensionAttributes.stockItem.maxSaleQty = 1000f;
objP.product[0].extensionAttributes.stockItem.useConfigBackorders = true;
objP.product[0].extensionAttributes.stockItem.backorders = 0;
objP.product[0].extensionAttributes.stockItem.useConfigNotifyStockQty = true;
objP.product[0].extensionAttributes.stockItem.notifyStockQty = 1;
objP.product[0].extensionAttributes.stockItem.useConfigEnableQtyInc = true;
objP.product[0].extensionAttributes.stockItem.enableQtyIncrements = true;
objP.product[0].extensionAttributes.stockItem.useConfigManageStock = true;
objP.product[0].extensionAttributes.stockItem.manageStock = true;
objP.product[0].extensionAttributes.stockItem.isDecimalDivided = false;
objP.product[0].extensionAttributes.bundleProductOptions = new BundleDataOptionInterface[1];
objP.product[0].extensionAttributes.bundleProductOptions[0] = new BundleDataOptionInterface();
objP.product[0].extensionAttributes.bundleProductOptions[0].required = true;
objP.product[0].extensionAttributes.bundleProductOptions[0].productLinks = new BundleDataLinkInterface[2];
objP.product[0].extensionAttributes.bundleProductOptions[0].productLinks[0] = new BundleDataLinkInterface();
objP.product[0].extensionAttributes.bundleProductOptions[0].productLinks[0].isDefault = true;
objP.product[0].extensionAttributes.bundleProductOptions[0].productLinks[0].optionId = 1;
objP.product[0].extensionAttributes.bundleProductOptions[0].productLinks[0].optionIdSpecified = true;
objP.product[0].extensionAttributes.bundleProductOptions[0].productLinks[0].position = 1;
objP.product[0].extensionAttributes.bundleProductOptions[0].productLinks[0].positionSpecified = true;
objP.product[0].extensionAttributes.bundleProductOptions[0].productLinks[0].qty = 1;
objP.product[0].extensionAttributes.bundleProductOptions[0].productLinks[0].qtySpecified = true;
objP.product[0].extensionAttributes.bundleProductOptions[0].productLinks[0].sku = "KB";
objP.product[0].extensionAttributes.bundleProductOptions[0].productLinks[0].canChangeQuantity = 0;
objP.product[0].extensionAttributes.bundleProductOptions[0].productLinks[0].canChangeQuantitySpecified = false;
objP.product[0].extensionAttributes.bundleProductOptions[0].productLinks[0].price = 3.0f;
objP.product[0].extensionAttributes.bundleProductOptions[0].productLinks[0].priceType = 1;
objP.product[0].extensionAttributes.bundleProductOptions[0].productLinks[1] = new BundleDataLinkInterface();
objP.product[0].extensionAttributes.bundleProductOptions[0].productLinks[1].isDefault = true;
objP.product[0].extensionAttributes.bundleProductOptions[0].productLinks[1].optionId = 1;
objP.product[0].extensionAttributes.bundleProductOptions[0].productLinks[1].optionIdSpecified = true;
objP.product[0].extensionAttributes.bundleProductOptions[0].productLinks[1].position = 1;
objP.product[0].extensionAttributes.bundleProductOptions[0].productLinks[1].positionSpecified = true;
objP.product[0].extensionAttributes.bundleProductOptions[0].productLinks[1].qty = 1;
objP.product[0].extensionAttributes.bundleProductOptions[0].productLinks[1].qtySpecified = true;
objP.product[0].extensionAttributes.bundleProductOptions[0].productLinks[1].sku = "HD";
objP.product[0].extensionAttributes.bundleProductOptions[0].productLinks[1].canChangeQuantity = 0;
objP.product[0].extensionAttributes.bundleProductOptions[0].productLinks[1].canChangeQuantitySpecified = false;
objP.product[0].extensionAttributes.bundleProductOptions[0].productLinks[1].price = 2.0f;
objP.product[0].extensionAttributes.bundleProductOptions[0].productLinks[1].priceType = 1;
var result = objSrvc.learningProductProductRepositoryV1Product_multiCreate(objP);
}
catch (Exception ex)
{
throw;
}
could you please help me on this.