Unable to get Product Category field from API return data when trying to use REST Admin API

infosync2sell
Shopify Partner
4 0 1

YKZE}[S{0HU%~(W`MQQ1@OI.png

This is the data returned by the API I tested, and I found that there is no Product Category.
How to get this field? Thank you very much

Replies 6 (6)
infosync2sell
Shopify Partner
4 0 1

Any suggestion is thankful!

ShopifyDevSup
Shopify Staff
Shopify Staff
1202 190 419

Hi @infosync2sell👋

 

You can use the `Product.product_type` property that contains the categorization for the product used for filtering and searching products.

 

Hope that helps!

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

infosync2sell
Shopify Partner
4 0 1

I set Product Category = 'Pet Agility Equipment' and Product Type = 'test' on this item. The API can return 'test' of the Product Type field but can not return the value of Product Category field. Which API can return the value of Product Category? 

186.png

ShopifyDevSup
Shopify Staff
Shopify Staff
1202 190 419

At this time, product taxonomies are only available through Admin GraphQL API with the `ProductCategory.productTaxonomyNode` object.

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

infosync2sell
Shopify Partner
4 0 1

I am using this Retrieve a single product API . This API can turn all fields of one product. But it does not return category id of this product. Why? How can I get the category id of this product?

SrikalyanBurra1
Shopify Partner
1 0 0

Any update on this? Its very bad that shopify is not sending this basic info in webhooks or apis. Just for this info, making a separate api call for each product is insane