Createproduct() API does not insert all the fields as passed in the argument

I am trying to use the wix stores backend → createProduct() API, but when I call this API with the arg. of type ProductInfo, it does not fill some of the fields in the Product DB Table. I send trackInventory as true, and with it I send the quantityInStock value. But after the API is called and the entry is created in the Product table, it does not have quantity field filled and also trackInventory is set to false in the return value Promise. Similarly, I am sending the additionalInfoSections also, but this field also remains empty after API executes. I have verified the syntax for ProductInfo argument to be supplied to this API from this documentation: https://www.wix.com/corvid/reference/wix-stores-backend.html#createProduct .
Please help me regarding this issue.


The Input argument format:


The output returned after the API executes:


Hi,
As it might be the issue with the API itself. I’d recommend contacting Wix Customer Care here .
Include the site and the page where you have implemented the solution, clear description of the issue, and screenshot or a screencast if possible.

Hi

I’m having the exact same issue. Did any of you contact support?

The input argument to the createProduct() function is an object of type ProductInfo. The ProductInfo object does not have fields like, quantityInStock, additionalInfoSection etc.

For updating quantityInStock follow these steps:

  1. Set manageVariants to True in createProduct () argument.

  2. Set some productOptions values as per syntax in the createProduct () argument.

  3. With this ProductInfo object created call the createProduct() API.

  4. Now, use the updateInventoryVariantFieldsByExternalId() backend function and update the inventory options for tracking the quantity.

Follow these links for exact syntax to update these fields.
https://www.wix.com/corvid/reference/wix-stores-backend.html#updateInventoryVariantFieldsByExternalId
https://www.wix.com/corvid/reference/wix-stores-backend.html#createProduct

P.S. : I am still unable to figure out how to update additionalInfoSections field using the backend APIs. Any support will be helpful.

Thanks

Thank you!
However, it seems like I need to create variants for my product even if there aren’t any… is that the case?!

@anders yes, we need to unecessarily create variants, if we are using the API to create a product. I had asked customer care about it, but they did not provide proper Support.