What's your biggest current challenge? Have your say in Community Polls along the right column.
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.

Re: Is there any any API available to get all the product types that exists in my store?

Is there any any API available to get all the product types that exists in my store?

maviswa
New Member
6 0 0

Hi,

 

Products in my Shopify store will have its product type set right. I want to know the consolidated lists of product type available in my Shopify store?? Do we have this product type retrieving support in Admin Rest API/ Graph QL??

 

Thanks in Advance.

Reply 1 (1)

Liam
Community Manager
3108 344 895

Hi Maviswa,

 

You should be able to query the `products` resource and specify the `productType` field, like:

 

query {
  products(first: 100) {
    edges {
      node {
        productType
      }
    }
  }
}

 Depending on how many products/ types you may need to set up pagination, and depending on how you want to present the product types you may need to parse or filter the results.

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me 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