Skip to main content
Log inSign up
Anchor to MetafieldDefinitionInput

MetafieldDefinitionInput

input_object

The input fields required to create a metafield definition.

•

The access settings that apply to each of the metafields that belong to the metafield definition.

•

The description for the metafield definition.

•
String!non-null

The unique identifier for the metafield definition within its namespace.

Must be 2-64 characters long and only contain alphanumeric, hyphen, and underscore characters.

•
String!non-null

The human-readable name for the metafield definition.

•

The container for a group of metafields that the metafield definition will be associated with. If omitted, the app-reserved namespace will be used.

Must be 3-255 characters long and only contain alphanumeric, hyphen, and underscore characters.

•

The resource type that the metafield definition is attached to.

•
BooleanDefault:false

Whether to pin the metafield definition.

•
String!non-null

The type of data that each of the metafields that belong to the metafield definition will store. Refer to the list of supported types.

•

A list of validation options for the metafields that belong to the metafield definition. For example, for a metafield definition with the type date, you can set a minimum date validation so that each of the metafields that belong to it can only store dates after the specified minimum.

Show
deprecated fields Deprecated
Anchor to useAsCollectionConditionuseAsCollectionCondition
•
BooleanDeprecatedDefault:false

Whether the metafield definition can be used as a collection condition. Deprecated in API version 2024-10. Use smartCollectionCondition capability instead.

Anchor to visibleToStorefrontApivisibleToStorefrontApi
•
BooleanDeprecated

Whether metafields for the metafield definition are visible using the Storefront API. Use access.storefront instead.


Was this section helpful?