Conversations about creating, managing, and using metafields to store and retrieve custom data for apps and themes.
Hi,
I have created a customer metafield which I can view using Postman and the /metafield/7066612072755.json endpoint however, it does not display when I list the metafields with /metafields.json - this only displays the default 2 metafields from the demo data.
What am I doing wrong?
Many thanks
Jim
Solved! Go to the solution
This is an accepted solution.
Hey Jim,
By default you'll only see metafields from the 'shop' owner resource. To see customer metafields. you'll need to pass through the owner_id and owner_resource ('customer'). Here's an example: https://shopify.dev/docs/api/admin-rest/2023-04/resources/metafield#get-metafields?metafield[owner-i... (screenshot).
Scott | Developer Advocate @ Shopify
This is an accepted solution.
Hey Jim,
By default you'll only see metafields from the 'shop' owner resource. To see customer metafields. you'll need to pass through the owner_id and owner_resource ('customer'). Here's an example: https://shopify.dev/docs/api/admin-rest/2023-04/resources/metafield#get-metafields?metafield[owner-i... (screenshot).
Scott | Developer Advocate @ Shopify
Thanks very much.