MetafieldDefinitions
Returns metafield definitions.
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 globally-unique ID. | |
| Namespace | String | False |
The container for a group of metafields that the metafield definition is associated with. | |
| Key | String | False |
The unique identifier for the metafield definition within its namespace. | |
| Name | String | False |
The human-readable name of the metafield definition. | |
| PinnedPosition | Int | True |
The position of the metafield definition in the pinned list. | |
| Description | String | False |
The description of the metafield definition. | |
| OwnerType | String | False |
The resource type that the 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 |
Whether the metafield definition can be used as a collection condition. | |
| ValidationStatus | String | True |
The validation status for the metafields that belong to the metafield definition. | |
| Validations | String | False |
A list of 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. | |
| AccessAdmin | String | False |
The default admin access setting used for the metafields under this definition. | |
| AccessCustomerAccount | String | False |
The customer account access setting used for the metafields under this definition. | |
| AccessStorefront | String | False |
The storefront access setting used for the metafields under this definition. | |
| CapabilitiesAdminFilterableEligible | Bool | True |
Indicates if the definition is eligible to have the capability. | |
| CapabilitiesAdminFilterableEnabled | Bool | False |
Indicates if the capability is enabled. | |
| CapabilitiesAdminFilterableStatus | String | True |
Determines the metafield definition's filter status for use in admin filtering. | |
| CapabilitiesSmartCollectionConditionEligible | Bool | True |
Indicates if the definition is eligible to have the capability. | |
| CapabilitiesSmartCollectionConditionEnabled | Bool | False |
Indicates if the capability is enabled. | |
| ConstraintsKey | String | True |
The category of resource subtypes that the definition applies to. | |
| MetafieldsCount | Int | True |
The count of the metafields that belong to the metafield definition. | |
| StandardTemplateId | String | True |
A globally-unique ID. | |
| TypeName | String | True |
The name of the type for the metafield definition. | |
| PinnedStatus | String | True |
Filter the metafield definition by the pinned status. 使用できる値は次のとおりです。ANY, PINNED, UNPINNED | |
| ConstraintStatus | String | True |
Filter metafield definitions based on whether they are constrained. 使用できる値は次のとおりです。CONSTRAINED_AND_UNCONSTRAINED, CONSTRAINED_ONLY, UNCONSTRAINED_ONLY | |
| ConstraintSubtypeKey | String | True |
Filter metafield definitions based on whether they apply to a given resource subtype. The category of the resource subtype. | |
| ConstraintSubtypeValue | String | True |
Filter metafield definitions based on whether they apply to a given resource subtype. The specific subtype value within the identified subtype category. |
Pseudo-Columns
疑似カラムは、明示的にリストされているタイプのステートメントでのみ使用できるフィールドです。これらは標準的なカラムではなく、特定の操作のための追加機能を提供するものです。
| Name | Type | Description |
| Pin | Bool |
Whether to pin the metafield definition. |
| DeleteAllAssociatedMetafields | Bool |
Whether to delete all associated metafields. |