Issue: A customer metafield is visible via the single-metafield endpoint (/metafields/{id}.json) but does not appear in the general list (/metafields.json), which only shows two default demo metafields.
Cause: The /metafields.json endpoint, by default, returns metafields for the ‘shop’ owner resource only.
Solution: Specify the resource context when listing customer metafields by adding query parameters:
owner_resource=customer
owner_id={customer_id}
This filters the list to the customer’s metafields. An example link and a screenshot were provided to illustrate the request format.
Outcome: The original poster acknowledged the fix and thanked the responder.
Status: Resolved; no further questions.
Notes:
Key terms: owner_resource (the resource type, e.g., customer), owner_id (the specific resource’s ID).
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.