Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

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

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

infosync2sell
Shopify Partner
4 0 3

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 7 (7)

infosync2sell
Shopify Partner
4 0 3

Any suggestion is thankful!

ShopifyDevSup
Shopify Staff
1453 238 518

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 3

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
1453 238 518

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 3

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?

Sukhiba
Shopify Partner
33 0 1

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

Aakash7
Shopify Partner
1 0 0

This is really insane. We still do not have any solution for this. Is there any way to get categories for products as of now?