Metafield types

Each metafield and metafield definition has a type, which defines the type of information that it can store. The metafield types have built-in validation and Liquid support.

For metafield definitions, the type is enforced across every instance of the resource that owns the metafield definition. For example, if you create a metafield definition called "Ingredients" with the type multi_line_text_field with an owner type of PRODUCT, then the metafield's type will be multi_line_text_field for every product resource.

When using the API to read and write metafields, the value is always entered and stored as a string, regardless of type.

If you need to update your metafields that use the deprecated value_type field, refer to Metafield value_type deprecation.