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.

Conditional metafields APIs

As of 2024-07, we've added APIs for viewing and filtering conditional metafield definitions such as product attributes:

  • Use the constraints field on MetafieldDefinition to view the metafield definition's constraints.
  • Use the constraintSubtype argument on the metafieldDefinitions and standardMetafieldDefinitionTemplates queries to retrieve only metafield definitions that apply to the passed constraint subtype.
  • Use the constraintStatus argument on the metafieldDefinitions and standardMetafieldDefinitionTemplates queries to filter based on whether the metafield definitions are constrained.

Learn more about conditional metafields

Was this section helpful?