Request All Product Types

Shopify Partner
10 0 0

Is there an API method call to get all Product Types in the system?

0 Likes
Shopify Expert
3932 14 323

Unlike the front-end Liquid whereby the Shop resource defines all the types in a shop, you'll have to just iterate through all the products and build out your own list. 

Custom Shopify Apps built just for you! hunkybill@gmail.com http://www.resistorsoftware.com
1 Like
Shopify Partner
10 0 0

I see, thank you. That seems really inefficient to iterate. Is it possible to limit product types to a pre-defined list? 

0 Likes
Shopify Partner
6 0 2

I requested the same, as their admin system must have some pre-built call to the unique product_types to show in the drop-down menu!!??

1 Like
Shopify Staff (Retired)
Shopify Staff (Retired)
130 0 18

This feature is currently in beta, send me an email if you would like more information. kevin.hughes@shopify.com

1 Like

I've been looking for an answer to this for a while, finally found a solution using the GraphQL API:-

query productTypes {
  shop {
    productTypes(first: 200) {
      edges {
        node
      }
    }
  }
}

So if you tuck is into a proxy app, say on a AWS lambda script via API gateway, you can get all the vendors.

Swapping productTypes for productVendors will give you all the types for a store.

Some Shopify/Ecommerce related articles - https://medium.com/@stephenkeable
0 Likes