Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Shopify Python API GET Metafields for a Product

Tags:

python

shopify

Is there a way to GET the metafields for a particular product if I have the product ID? Couldn't find it in the docs.

like image 574
user2996806 Avatar asked Sep 02 '25 08:09

user2996806


1 Answers

The call you want is shopify.Metafield.find()

>>> shopify.Metafield.find()
[metafield(1), metafield(2), metafield(3)]

You can also pass in filters

>>> shopify.Metafield.find(namespace='myapp')
[metafield(1), metafield(2)]

The Python API has almost zero documentation which makes figuring these things out an exercise in frustration.

like image 64
Rebs Avatar answered Sep 04 '25 21:09

Rebs