Product Category on Rest Admin API

Hi Community,

I’d like to ask if there’s any API to retrieve a list of product categories and when creating a product via API, how can we populate the product category field?

Looking forward for your response. Thanks.

Kind Regards,

Spaceship Tech

3 Likes

Any update on this inquiry?

Hi @spaceshiptech ,

Thanks for your post. As shown in the docs for the GraphQL Admin API [productCreate] and [productUpdate] mutations, the field for the product category is ProductInput.productCategory, and the input for that takes a productTaxonomyNodeId which corresponds to the preset taxonomy categories.

There’s a link to a list of all the preset taxonomy categories and their ID’s and English names at the top of the [productTaxonomyNode doc page]. More info about product categories and taxonomy can be found [on this general doc page about Product Types].

There’s no equivalent way to do this in the REST Admin API.

Hope you have a great day

1 Like