How to show a meta field in the admin?

lostinspace
Excursionist
13 0 5

I have a product with some meta fields. For example product with ID '4996444258435' has an item_num shown below.

Now I simply want to show this meta value within the Shopify admin when viewing the Product as shown in the image.
Shopify does not seem to automatically show meta fields which could not be more stupid. I mean why have meta data if its always hidden and unavailable.

Eg. how do I show see this "test123" value in the admin (not the front end)?
{
"metafields": [
{
"id": 12954494140547,
"namespace": "item_num",
"key": "item",
"value": "test123",
"value_type": "string",
...}
]
}screenshot_001.jpg.

0 Likes
danielpretorius
Shopify Partner
97 0 10

Add "/metafields.xml" to the end of the product url

Nice, and also to extend the assistance given by @danielpretorius :

  • You can substitute the .xml file extension with .json if you'd prefer. 
  • Also, if you're drilling down into variants, the format is /products/YOURPRODUCTID/variants/YOURVARIANTID/metafields.json 

More info @ https://shopify.dev/docs/admin-api/rest/reference/metafield

Also, for all browser based JSON work, I'd recommend installing the JSONView Chrome extension for syntax formatting.

0 Likes