Metafield helper

Sketch namespaces, keys, and Shopify metafield types, then copy JSON-shaped examples. This does not call Shopify — it is a reference for developers and advanced merchants.

Field

Definition describes the field (type, namespace, key) in Admin. Values are stored per product, collection, etc. You usually create a definition once, then set many values.

Definition sketch (JSON)
{
  "name": "My field",
  "namespace": "custom",
  "key": "my_field",
  "type": "single_line_text_field",
  "ownerType": "PRODUCT",
  "description": "Created with SS&T metafield helper — adjust in Admin or GraphQL."
}
metafieldsSet-style example (GraphQL)
{
  "note": "GraphQL metafieldsSet-style input — replace ownerId with a real GID from Admin API.",
  "metafields": [
    {
      "ownerId": "gid://shopify/Product/REPLACE",
      "namespace": "custom",
      "key": "my_field",
      "type": "single_line_text_field",
      "value": "Hello"
    }
  ]
}
REST-style metafield object
{
  "note": "REST-style metafield object (resource-specific paths differ).",
  "metafield": {
    "namespace": "custom",
    "key": "my_field",
    "type": "single_line_text_field",
    "value": "Hello"
  }
}