Include additionalInfoSections in createProduct()

I’m attempting to add products to my store via code. The following code works (mostly) and my product successfully appears in the store and in the collection (which I can view from the collections manager).

But, the additionalInfoSections is not being put into the store product database and doesn’t appear in the store listing.

I note that the API doc for createProduct() doesn’t actually mention the additionalInfoSections property. But I figured this was just a documentation oversight (like the fact that the doc says that the “productType” is optional but if I leave it out it rejects with a message ‘productType is not optional’).

Also, the additionalInfoSections property is mentioned in the documentation in the return value section. So I figure if it’s there, you must be able to set it somehow, right?

Maybe I’ve just got a syntax error in the additionalInfoSections part of my NewProduct declaration (see below)? But, the product does get created, just with a an empty additionalInfoSections property.

Here’s the Wix doc:
(https://www.wix.com/velo/reference/wix-stores-backend/createproduct)

Any ideas?

NewProduct = {
    "name": "myName",
    "description": "Produce Description goes here"",                                                         
    "price": 1.00,
    "sku":toStringX(Now.getTime()),
    "productType" : "physical", //doc says optional but fails if missing
    "additionalInfoSections" : [{"title" : "THIS IS SECTION TITLE", "description" : "This is the product description"}, {"title" : "THIS IS A DIFFERENT SECTION", "description" : "This is the description in a different section"}]
}

createProduct(NewProduct)
     .then((CreateProductBEResult)=>{
1 Like

Hi there,

The promise returns the product object, it has nothing to do with the fact that the createProduct() function does not support all fields, at the moment, and as you can see from on the API reference, you cannot pass the product info section.

So, just to confirm, are you saying, there is currently no way to populate the additionalInfoSections of a product via code?

@psav_wix exactly.

@ahmadnasriya :disappointed_relieved:. Thanks for confirming. I’ll add it as a feature request. Cheers.

@psav_wix You’re welcome