How to access metaobjects via REST?

Rusticandmain
Visitor
2 0 8

Hey all, as you may know, we can access metafield data through a quick query like this:
https://{{yourStore}}.myshopify.com/admin/products/{{prodId}}/metafields/{{metafieldId}}.json

 

In the case where a metafield is a reference to a metaobject it will return the following JSON:

{"metafield":{"id":XXXXX,"namespace":"custom","key":"ring_info","value":"gid:\/\/shopify\/Metaobject\/2593325140","value_type":"string","description":null,"owner_id":xxxxxx,"created_at":"2023-04-24T11:48:30-04:00","updated_at":"2023-04-24T11:48:30-04:00","owner_resource":"product","type":"metaobject_reference","admin_graphql_api_id":"gid:\/\/shopify\/Metafield\/20172247859284"}}

However, I don't know what endpoint to use to get the values for the specific metaobject.

 

I've seen some stuff about this using graphql, which I'm willing to try, but it's not intuitive IMO.

This is for a custom javascript action in Zapier. Many thanks!

Reply 1 (1)
garyrgilbert
Shopify Partner
378 38 151

Apparently there is no metaobjects rest api endpoint (I've searched long and hard for it).

 

You are going to have to use graphql for this one.

 

Cheers,

 

Gary

- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution