Metafield definitions

Discover available custom-data fields, their types, access rules, and value limits.

Discover the custom-data definitions available to your token before reading or writing values. Choose an owner_type and use its resource read scope. Values are addressed by namespace and key on the owning resource. Your token's scopes and each definition's access rules determine which entries are returned. App tokens can read their own definitions, merchant definitions within their granted resource scopes, and definitions shared by other apps. Apps can write values only for their own definitions.

The Store API never creates, changes or deletes definitions: app-owned definitions come from the app's metafield declaration, and merchants manage their own in Store Admin, the mobile app, or a connected AI tool (hosted Store MCP create_metafield_definition, update_metafield_definition, delete_metafield_definition). Use the returned type, validation rules, max_value_length, and max_list_items when preparing values. Numeric strings preserve precision across clients. Datetime values accept RFC 3339 offsets; values without an offset use the store timezone. A datetime value is stored in UTC and returned as RFC 3339 in the store's time zone with its offset, such as 2026-10-01T00:45:00-04:00, by the Store API, MCP tools and webhooks alike; a date value stays a date (2026-10-01). Record timestamps such as created_at and updated_at are RFC 3339 in the store's time zone with its offset. Assigning a nonempty file_reference or list.file_reference additionally requires read_files.

Follow returned cursors unchanged, and restart pagination when the owner or token changes. App-owned definitions are declared through the app's metafield configuration; see App metafields in the apps documentation.

Select definitions (single_select, list.single_select) store choice keys and show each choice's label to shoppers. When the definition is translatable, translate each label once per locale with the choice translation endpoints on Metafield definition translations; that translation covers every resource storing the choice. These endpoints also require the translations scope and the definition owner's read scope.

A definition's name is the label shoppers see next to its value, for example in the platform metafield block. Translate names per locale with the definition name endpoints on Metafield definition translations, one definition at a time or up to 100 per call. Names of definitions the merchant can edit (merchant_access read_write, which includes every merchant-owned definition) are translatable; app tokens translate only their own. Translation CSV (metafield_definition) and Store Admin translate the same names. Name and choice label translations send no webhooks.

Endpoints#

List metafield definitions

GET The read scope required by owner_type

List the metafield definitions visible to this token (paginated).

Read-only discovery uses the same access rules as metafield value reads. tpat_ and tast_ tokens see merchant-owned definitions, all definitions owned by their app, and definitions owned by another app only when app_access is shared (a definition hidden from merchants is always private to its app). A tsat_ token sees merchant-owned definitions and app-owned definitions unless merchant_access is hidden. owner_type selects the owner surface and its matching read scope. The Store API does not create, change or delete definitions: app-owned definitions come only from the app's reviewed declaration, and merchants create, edit and delete their own definitions in Store Admin, the Tringify mobile app, or a connected AI tool (the hosted Store MCP tools create_metafield_definition, update_metafield_definition and delete_metafield_definition). Definition names and select choice labels are translatable here. When a definition sets max_value_length or max_list_items, those caps are enforced on every value write; tightening them in Store Admin is blocked while stored values still exceed the new limit.

Value rules by type

Values are checked against their definition's type on every write. null or an empty string removes the stored value.

Type Accepted value
string Any text up to the platform string limit. The definition may add min_length and an RE2 pattern (at most 500 characters).
multi_line_text Text with line breaks, up to 10,000 characters. Line breaks are stored as \n; tabs are allowed, other control characters are not.
rich_text HTML as the page and blog editor writes it: headings, paragraphs, bold, italic, links (http, https, mailto), lists, quotes, images and tables. Scripts, event handlers, frames and other link schemes are removed when it is stored. Its readable text is at most 10,000 characters, and the markup counts toward the platform value size limit. A value with no readable text removes the stored value.
color # and six hex digits (#1a2b3c), stored lowercase.
integer A whole number in the signed 64-bit range, up to the platform integer digit limit, within the definition's min and max.
decimal A finite decimal number up to the platform decimal length limit (counted written out in full, so an exponent cannot exceed it), within the definition's min and max.
boolean true or false.
date YYYY-MM-DD.
datetime YYYY-MM-DDTHH:mm, YYYY-MM-DDTHH:mm:ss, or an RFC 3339 timestamp.
json Valid JSON up to the platform JSON size limit. Links inside it must use http, https, mailto or tel.
url An absolute http or https URL with a host, up to the platform URL limit.
single_select One of the definition's choice keys.
file_reference The UUID of an uploaded file in this store.
product_reference, variant_reference The positive integer ID of a product or variant in this store.
page_reference, blog_post_reference, collection_reference The UUID of a page, blog post or collection in this store. Deleting the page, post or collection removes it from every value that references it.
list.string A JSON array of non-blank strings, each up to the platform string limit. It may be empty. The definition may add min_length and an RE2 pattern (at most 500 characters), checked against every item; max_value_length caps each item.
list.url A non-empty JSON array of url values, up to the platform list.url item limit, which is higher than the other lists' limit.
list.single_select A non-empty JSON array of choice keys.
list.file_reference A non-empty JSON array of file_reference values.
list.color A non-empty JSON array of color values.
list.product_reference, list.variant_reference A non-empty JSON array of positive integer IDs in this store.
list.page_reference, list.blog_post_reference, list.collection_reference A non-empty JSON array of page, blog post or collection UUIDs in this store.
metaobject_reference The UUID of a custom content entry of the type the definition's validation_rules.metaobject_definition_id names. Deleting the entry removes it from every value that references it.
list.metaobject_reference A non-empty JSON array of at most 50 entry UUIDs of that type.

Lists other than list.url hold at most the platform list item limit, and every value stays within the platform value size limit for its type. Duplicate list items are stored once. A definition's max_value_length and max_list_items can only lower these limits.

cart_line and wishlist_line values are written only by the storefront and App Bridge; the Store API has no endpoint that sets them. Staff-created merchant tokens listing store definitions additionally require settings.metafield_definitions:read.

Query parameters

Name Type Description
owner_type required string

Owner surface. Supported values are product, variant, customer, order, order_item, cart_line, wishlist_line, collection, category, page, blog_post, blog_category, vendor, brand, and store. Each requires the matching resource read scope.

cursor string

Opaque cursor from a previous response. Omit for the first page; use next_cursor or previous_cursor to move forward or backward. Reset the cursor whenever owner_type or the token changes.

limit integer

Page size; capped by the definition list limit.

Headers

Name Type Description
Authorization required string

Bearer Store API token.

Errors

  • 401 UNAUTHORIZED

    The Authorization header is missing.

  • 401 INVALID_TOKEN

    The Authorization header is not Bearer followed by a token, or the token is not in the form Tringify issues.

  • 401 TOKEN_NOT_ACCEPTED

    The token is unknown, expired, revoked or replaced, or its app was uninstalled.

  • 402 SUBSCRIPTION_REQUIRED

    The store does not have an active or trialing subscription.

  • 403 API_VERSION_UNSUPPORTED

    The credential is pinned to an API version that cannot be served.

  • 403 STORE_SUSPENDED

    Tringify has suspended the store. Every request is refused until it is reinstated.

  • 403 STORE_TERMINATED

    Tringify has terminated the store permanently. Every request is refused.

  • 400 METAFIELD_DEFINITION_INVALID_OWNER_TYPE

    Owner_type must be product, variant, customer, order, order_item, cart_line, wishlist_line, collection, category, page, blog_post, blog_category, vendor, brand, or store.

  • 403 STORE_ADMIN_TOKEN_RUNTIME_FORBIDDEN

    The token lacks the read scope matching owner_type.

  • 400 STORE_API_QUERY_PARAMETER_UNKNOWN

    The query string has a parameter this request does not accept. The message and error.details.allowed_parameters list the ones it does.

  • 429 RATE_LIMITED

    The request allowance is exhausted. Wait for Retry-After before retrying.

Webhook events#

Metafield definition created

EVENT metafield_definitions/create Staff permission: settings.metafield_definitions:write

Fired when a metafield definition is created, including by a theme install. Store webhook endpoints receive every definition; an app receives only the definitions it owns.

Payload fields

Field Type Description
metafield_definition.id string Always present
metafield_definition.owner_type string Selectable in the Payload builder
metafield_definition.namespace string Selectable in the Payload builder
metafield_definition.key string Selectable in the Payload builder
metafield_definition.name string Selectable in the Payload builder
metafield_definition.description string | null Selectable in the Payload builder
metafield_definition.type string Selectable in the Payload builder
metafield_definition.validation_rules string | null Selectable in the Payload builder
metafield_definition.is_translatable boolean Selectable in the Payload builder
metafield_definition.is_storefront_visible boolean Selectable in the Payload builder
metafield_definition.is_searchable boolean Selectable in the Payload builder
metafield_definition.is_filterable boolean Selectable in the Payload builder
metafield_definition.max_value_length integer | null Selectable in the Payload builder
metafield_definition.max_list_items integer | null Selectable in the Payload builder
metafield_definition.sort_order integer Selectable in the Payload builder
metafield_definition.app_id string | null Selectable in the Payload builder
metafield_definition.app_access string Selectable in the Payload builder
metafield_definition.merchant_access string Selectable in the Payload builder
metafield_definition.buyer_access string Selectable in the Payload builder
metafield_definition.created_at string Selectable in the Payload builder
metafield_definition.updated_at string Selectable in the Payload builder

Metafield definition deleted

EVENT metafield_definitions/delete Staff permission: settings.metafield_definitions:write

Fired when a metafield definition is deleted, including when its app is uninstalled. Store webhook endpoints receive every definition; an app receives only the definitions it owns.

Payload fields

Field Type Description
metafield_definition.id string Always present
metafield_definition.owner_type string Selectable in the Payload builder
metafield_definition.namespace string Selectable in the Payload builder
metafield_definition.key string Selectable in the Payload builder
metafield_definition.name string Selectable in the Payload builder
metafield_definition.description string | null Selectable in the Payload builder
metafield_definition.type string Selectable in the Payload builder
metafield_definition.validation_rules string | null Selectable in the Payload builder
metafield_definition.is_translatable boolean Selectable in the Payload builder
metafield_definition.is_storefront_visible boolean Selectable in the Payload builder
metafield_definition.is_searchable boolean Selectable in the Payload builder
metafield_definition.is_filterable boolean Selectable in the Payload builder
metafield_definition.max_value_length integer | null Selectable in the Payload builder
metafield_definition.max_list_items integer | null Selectable in the Payload builder
metafield_definition.sort_order integer Selectable in the Payload builder
metafield_definition.app_id string | null Selectable in the Payload builder
metafield_definition.app_access string Selectable in the Payload builder
metafield_definition.merchant_access string Selectable in the Payload builder
metafield_definition.buyer_access string Selectable in the Payload builder
metafield_definition.created_at string Selectable in the Payload builder
metafield_definition.updated_at string Selectable in the Payload builder

Metafield definition updated

EVENT metafield_definitions/update Staff permission: settings.metafield_definitions:write

Fired when a metafield definition changes. changed_fields names what changed. When turning off translation deletes the definition's translations, translations_deleted is how many were deleted; no per-translation events are sent. Store webhook endpoints receive every definition; an app receives only the definitions it owns.

Payload fields

Field Type Description
metafield_definition.id string Always present
metafield_definition.owner_type string Selectable in the Payload builder
metafield_definition.namespace string Selectable in the Payload builder
metafield_definition.key string Selectable in the Payload builder
metafield_definition.name string Selectable in the Payload builder
metafield_definition.description string | null Selectable in the Payload builder
metafield_definition.type string Selectable in the Payload builder
metafield_definition.validation_rules string | null Selectable in the Payload builder
metafield_definition.is_translatable boolean Selectable in the Payload builder
metafield_definition.is_storefront_visible boolean Selectable in the Payload builder
metafield_definition.is_searchable boolean Selectable in the Payload builder
metafield_definition.is_filterable boolean Selectable in the Payload builder
metafield_definition.max_value_length integer | null Selectable in the Payload builder
metafield_definition.max_list_items integer | null Selectable in the Payload builder
metafield_definition.sort_order integer Selectable in the Payload builder
metafield_definition.app_id string | null Selectable in the Payload builder
metafield_definition.app_access string Selectable in the Payload builder
metafield_definition.merchant_access string Selectable in the Payload builder
metafield_definition.buyer_access string Selectable in the Payload builder
metafield_definition.created_at string Selectable in the Payload builder
metafield_definition.updated_at string Selectable in the Payload builder
changed_fields array Always present
translations_deleted integer Selectable in the Payload builder