MetafieldDefinitions
Defines metadata field templates that describe allowed namespaces, keys, and data types for metafields.
Table-Specific Information
Select
The 本製品 uses the Shopify API to process WHERE clause conditions built with the following columns and operators. The 本製品 processes other filters client-side within the 本製品.
- Id supports the '=, IN' comparison operators.
- Namespace supports the '=' comparison operator.
- Key supports the '=' comparison operator.
- OwnerType supports the '=, IN' comparison operators.
- PinnedStatus supports the '=, IN' comparison operators.
- ConstraintStatus supports the '=, IN' comparison operators.
- ConstraintSubtypeKey supports the '=, IN' comparison operators.
- ConstraintSubtypeValue supports the '=, IN' comparison operators.
For example, the following queries are processed server-side:
SELECT * FROM MetafieldDefinitions WHERE Id = 'Val1'
SELECT * FROM MetafieldDefinitions WHERE Namespace = 'Val1'
SELECT * FROM MetafieldDefinitions WHERE Key = 'Val1'
SELECT * FROM MetafieldDefinitions WHERE OwnerType = 'API_PERMISSION'
SELECT * FROM MetafieldDefinitions WHERE PinnedStatus = 'ANY'
SELECT * FROM MetafieldDefinitions WHERE ConstraintStatus = 'CONSTRAINED_AND_UNCONSTRAINED'
SELECT * FROM MetafieldDefinitions WHERE ConstraintSubtypeKey = 'Val1'
SELECT * FROM MetafieldDefinitions WHERE ConstraintSubtypeValue = 'Val1'
Insert
The following columns can be used to create a new record:
Namespace, Key, Name, Description, OwnerType, Validations, AccessAdmin, AccessCustomerAccount, AccessStorefront, CapabilitiesAdminFilterableEnabled, CapabilitiesSmartCollectionConditionEnabled, TypeName
The following pseudo-column can be used to create a new record:
Pin
Update
The following columns can be updated:
Namespace, Key, Name, Description, OwnerType, Validations, AccessAdmin, AccessCustomerAccount, AccessStorefront, CapabilitiesAdminFilterableEnabled, CapabilitiesSmartCollectionConditionEnabled
The following pseudo-column can be used to update a record:
Pin
Delete
You can delete entries by specifying the following column:
Id
Columns
| Name | Type | ReadOnly | References | Description |
| Id [KEY] | String | True |
A unique identifier for the metafield definition record. | |
| Namespace | String | False |
The logical grouping or container that organizes related metafields within the store. | |
| Key | String | False |
The unique key that identifies this metafield definition within its namespace. | |
| Name | String | False |
The human-readable name of the metafield definition, used for display in the admin and APIs. | |
| PinnedPosition | Int | True |
The position of this metafield definition in the list of pinned metafields for easier visibility and access. | |
| Description | String | False |
A descriptive explanation of what data the metafield definition represents or how it is used. | |
| OwnerType | String | False |
The Shopify resource type, such as Product, Order, or Customer, that this metafield definition is attached to. 使用できる値は次のとおりです。API_PERMISSION, ARTICLE, BLOG, CARTTRANSFORM, COLLECTION, COMPANY, COMPANY_LOCATION, CUSTOMER, DELIVERY_CUSTOMIZATION, DISCOUNT, DRAFTORDER, FULFILLMENT_CONSTRAINT_RULE, GIFT_CARD_TRANSACTION, LOCATION, MARKET, ORDER, ORDER_ROUTING_LOCATION_RULE, PAGE, PAYMENT_CUSTOMIZATION, PRODUCT, PRODUCTVARIANT, SELLING_PLAN, SHOP, VALIDATION, MEDIA_IMAGE | |
| UseAsCollectionCondition | Bool | True |
Indicates whether this metafield definition can be used as a filtering condition for collections. | |
| ValidationStatus | String | True |
The current validation status for all metafields governed by this definition, showing whether they conform to the defined validation rules. | |
| Validations | String | False |
A list of validation rules applied to the metafields in this definition, such as minimum or maximum values or allowed date ranges. | |
| AccessAdmin | String | False |
Specifies the default access level for admins to view or modify metafields under this definition. | |
| AccessCustomerAccount | String | False |
Specifies the access level granted to customer accounts for viewing metafields associated with this definition. | |
| AccessStorefront | String | False |
Specifies whether and how metafields under this definition are exposed to the storefront or public APIs. | |
| CapabilitiesAdminFilterableEligible | Bool | True |
Indicates whether this metafield definition is eligible to be used as a filter within the Shopify admin. | |
| CapabilitiesAdminFilterableEnabled | Bool | False |
Indicates whether filtering by this metafield definition is currently enabled in the Shopify admin. | |
| CapabilitiesAdminFilterableStatus | String | True |
Specifies the current filter status of this metafield definition for use in admin-based search and filtering. | |
| CapabilitiesSmartCollectionConditionEligible | Bool | True |
Indicates whether this metafield definition is eligible to be used in smart collection conditions. | |
| CapabilitiesSmartCollectionConditionEnabled | Bool | False |
Indicates whether this metafield definition is currently enabled for use in smart collection conditions. | |
| ConstraintsKey | String | True |
The category or type of resource subtypes to which this metafield definition applies. | |
| MetafieldsCount | Int | True |
The total number of metafields currently associated with this definition. | |
| StandardTemplateId | String | True |
A unique identifier linking this metafield definition to a standard template, if applicable. | |
| TypeName | String | True |
The data type name defined for this metafield, such as 'string', 'integer', or 'date'. | |
| PinnedStatus | String | True |
Indicates whether the metafield definition is currently pinned for quick access. 使用できる値は次のとおりです。ANY, PINNED, UNPINNED | |
| ConstraintStatus | String | True |
Specifies whether the metafield definition is constrained to certain resource types or subtypes. 使用できる値は次のとおりです。CONSTRAINED_AND_UNCONSTRAINED, CONSTRAINED_ONLY, UNCONSTRAINED_ONLY | |
| ConstraintSubtypeKey | String | True |
The subtype category key that defines which specific resource subtypes the metafield definition applies to. | |
| ConstraintSubtypeValue | String | True |
The subtype value identifying the exact resource subtype within the defined subtype category to which the metafield definition applies. |
Pseudo-Columns
疑似カラムは、明示的にリストされているタイプのステートメントでのみ使用できるフィールドです。これらは標準的なカラムではなく、特定の操作のための追加機能を提供するものです。
| Name | Type | Description |
| Pin | Bool |
Determines whether the metafield definition should be pinned for prioritized display. |
| DeleteAllAssociatedMetafields | Bool |
Determines whether all metafields associated with this definition should be deleted along with it. |