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
Shopify Staff
2731 299 769

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