metafield.unset

Remove a metafield value.

Payload

fieldtyperequirednotes
ownerType"product" | "variant" | "collection" | "store"yes
ownerIdstring (≤64 chars)yes
namespacestring (/^(custom|app\.[a-z0-9-]{2,32})$/)yes
keystring (/^[a-z0-9_]{1,64}$/)yes

JSON Schema

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "ownerType": {
      "type": "string",
      "enum": [
        "product",
        "variant",
        "collection",
        "store"
      ]
    },
    "ownerId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64
    },
    "namespace": {
      "type": "string",
      "pattern": "^(custom|app\\.[a-z0-9-]{2,32})$"
    },
    "key": {
      "type": "string",
      "pattern": "^[a-z0-9_]{1,64}$"
    }
  },
  "required": [
    "ownerType",
    "ownerId",
    "namespace",
    "key"
  ],
  "additionalProperties": false
}
Generated from the live platform registries at build time — reference pages cannot go stale. Markdown variant: /reference/commands/metafield.unset.md