API for Metafield: shopify.color-pattern [list.metaobject_reference]

API for Metafield: shopify.color-pattern [list.metaobject_reference]

UX1
Shopify Partner
3 0 0

Hi Experts,

I want to call Metafield: shopify.color-pattern [list.metaobject_reference] value from API but cannot locate it in API doc. Can anyone suggest me how to get this value from the store via API?
Matrixify app does get this value in its export so I assume it's somewhere in API.
Your input is greatly appreciated.

BR,

Reply 1 (1)

Renars
Shopify Partner
319 32 208

Hi @UX1 

In Shopify Admin API, to extract Metafield values, you would use the `metafields` connection for the Product API - https://shopify.dev/docs/api/admin-graphql/latest/objects/Product#field-metafields

 

If you need it for the front end, then you would likely use Storefront API, which also does seem to have Metafields attribute for the Product - https://shopify.dev/docs/api/storefront/latest/objects/Product

Matrixify | Bulk Import Export Update | https://apps.shopify.com/excel-export-import | https://matrixify.app