Solved

json_string value type metafield doesn't return value in Metafield API (Bug?)

tb_pushlogic
Shopify Partner
4 1 3

Hi guys,

I'm wondering if somebody can shed any light on this please, as despite looking like a bug Shopify Support are unwilling to help. I'm using the Classic PHP library to access the rest API and everything up until now has been fine. However there seems to be an issue whereby when I try to access a json_string value type Metafield it's just an empty json string. See an example below. There is definitely a value stored against this product but nothing is in the response. These metafields are being added using the Accentuate Digital Custom Fields App. I have contacted their support re. this too but they just ignore the support request. This has made me hit a roadblock in this project for our client so any insight into this would be greatly appreciated.

 

{
"id": 11114576314452,
"namespace": "acc.meta.pro.60b06f",
"key": "latitude",
"value": "{\"namespace\":\"Trail_Coordinates\",\"value\":\"\",\"textlines\":\"1\",\"allowMultiple\":\"false\",\"hidden\":\"false\",\"repeatable\":\"false\",\"autoTag\":\"false\",\"appliesTo\":\"\",\"instructions\":\"\",\"sequence\":18,\"type\":\"text\",\"scope\":\"product\",\"label\":\"Latitude\"}",
"value_type": "json_string",
"description": "Latitude",
"owner_id": 27697021012,
"created_at": "2019-10-22T11:00:46Z",
"updated_at": "2020-02-27T10:54:19Z",
"owner_resource": "shop",
"admin_graphql_api_id": "gid://shopify/Metafield/11114576314452"
},

 

Kind regards,

Tony

Accepted Solution (1)

tb_pushlogic
Shopify Partner
4 1 3

This is an accepted solution.

Please disregard this. Now solved. I have no option to remove this post or mark it as solved.

View solution in original post

Replies 2 (2)

tb_pushlogic
Shopify Partner
4 1 3

This is an accepted solution.

Please disregard this. Now solved. I have no option to remove this post or mark it as solved.

entcheva
Visitor
1 0 0

Hi @tb_pushlogic Do you mind sharing how you solved your problem?

By circling back and sharing how you fixed your issue, you're helping build a robust dev community around the Shopify ecosystem, as well as helping other folks who may be running into the same thing (like me! :D)