Shopify-api-node icon indicating copy to clipboard operation
Shopify-api-node copied to clipboard

Cannot Get Product Metafields

Open mcmurter opened this issue 9 years ago • 3 comments

shopify.metafield.list() only returns shop metafields. I would like to get product metafields. Is this possible? Am I missing some crucial piece of information?

mcmurter avatar Dec 13 '16 22:12 mcmurter

Did you take a look at product metafields or variants metafields?

-- Alexandre Saiz [email protected] Phone: +34 (659) 07 85 44 | alexandre.saiz

El 13 des 2016, a les 23:27, Aaron McMurter [email protected] va escriure:

shopify.metafield.list() only returns shop metafields. I would like to get product metafields. Is this possible? Am I missing some crucial piece of information?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

alexandresaiz avatar Dec 13 '16 22:12 alexandresaiz

@mcmurter

const promise = shopify.metafield.list({
  metafield: { owner_resource: 'product', owner_id: 632910392 }
});

lpinca avatar Dec 14 '16 07:12 lpinca

@lpinca Thank you, this is what I was looking for. Oversight on my part. It is a shame that it takes one api call per product, but that is just Shopify's dodgy api.

mcmurter avatar Dec 14 '16 14:12 mcmurter