set Metafield Values for products (Shopify)

Sets one metafield value on the product with Shopify metafieldsSet. The definition must already exist. Send namespace, key and value.

value is JSON text, and its shape comes from the metafield type. A text value is a JSON string, for example "Be careful with the glass lid". metaobject_reference is one GID as a JSON string: "gid://shopify/Metaobject/655852437673". list.metaobject_reference and list.disclosure_reference are a JSON array of GIDs. The array stays an array when it has one entry: ["gid://shopify/Metaobject/718862254401"].

Send ownership as merchant for a merchant namespace such as custom or shopify. Otherwise EcartAPI prefixes the namespace with $app:.

See Shopify metafields and metaobjects.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

The unique identifier of the product

Body Params

Metafield value for the product. namespace, key and value are required. value is JSON text.

metafield
object
required

Value to write on this owner. The metafield definition must already exist.

Response

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json