How to create product category using API

When we create a new product using API there is a default field called category, Can we create new category and map it to the product using API
Thanks

Hi Vishnu,

No, we only allow categories to be created via the UI, but you can assign existing categories through API.

1 Like

Running into this today, as I can’t find a way to even update a product to a category as the category in the api endpoint v2 is a Number. Yet, I can’t find how to find the ID/Numbers for the categories. Any idea?

Yes, you can create a new category and map it to a product using the API—if the platform supports it.