Skip to main content
Log inSign up

Shopify uses cookies to provide necessary site functionality and improve your experience. By using our website, you agree to our privacy policy and our cookie policy.

query

Requires API client to have access to the resource type associated with the metafield definition.

Returns a metafield definition by identifier.

The identifier of the MetafieldDefinition to return.

IDDeprecated

The ID of the MetafieldDefinition to return. This field will be removed in a future version. Use the identifier input instead.


Was this section helpful?

Metafield definitions enable you to define additional validation constraints for metafields, and enable the merchant to edit metafield values in context.

access
non-null

The access settings associated with the metafield definition.

capabilities
non-null

The capabilities of the metafield definition.

constraints

The constraints that determine what subtypes of resources a metafield definition applies to.

createdAt
non-null

The date and time when the metafield definition was created.

description

The description of the metafield definition.

id
non-null

A globally-unique ID.

key
non-null

The unique identifier for the metafield definition within its namespace.

metafields
non-null

The metafields that belong to the metafield definition.

metafieldsCount
non-null

The count of the metafields that belong to the metafield definition.

name
non-null

The human-readable name of the metafield definition.

namespace
non-null

The container for a group of metafields that the metafield definition is associated with.

ownerType
non-null

The resource type that the metafield definition is attached to.

pinnedPosition

The position of the metafield definition in the pinned list.

standardTemplate

The standard metafield definition template associated with the metafield definition.

type
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.

updatedAt
non-null

The date and time when the metafield definition was updated.

useAsCollectionCondition
non-null

Whether the metafield definition can be used as a collection condition.

validations
non-null

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.

validationStatus
non-null

The validation status for the metafields that belong to the metafield definition.


Was this section helpful?