Version: 202607
Get metafield definition
GET/openapi/2026-07/metafield_definition
Retrieve a metafield definition by its unique identifier.
Request
Query Parameters
id uint64
The unique identifier for the metafield definition
Responses
- 200
OK
- application/json
- Schema
- Example
Schema
shop: Shopproduct: Productproduct_image: Product imageproduct_variant: Product variantorder: Orderpage: Custom pagecustomer: Customercollection: Collectionblog: Blogarticle: Articleapp: Appdate: Datedate_time: Date and timeweight: Weightvolume: Volumedimension: Dimensioninteger: Integernumber_decimal: Decimalfile_reference: File referencesingle_line_text_field: Single-line textmulti_line_text_field: Multi-line textjson: JSONcolor: Colorrating: Ratingurl: URLboolean: Boolean (true or false)string: String
codestring
error code
messagestring
error message
data object
metafield_definition object
The metafield definition
idstring
The unique identifier for the metafield definition
keystring
The key of the metafield (unique within the namespace). For example, "color"
namestring
Name of the metafield definition (displayed in the admin panel)
namespacestring
A container for a group of metafields. Grouping metafields within a namespace prevents your metafields from conflicting with other metafields with the same key name. For example, "global"
owner_resourcestring
Resource type the metafield definition is attached to:
typestring
Field type of the metafield:
descriptionstring
A brief description of the metafield definition
create_atstring
Creation timestamp, in ISO-8601 format
updated_atstring
Last update timestamp, in ISO-8601 format
{
"code": "string",
"message": "string",
"data": {
"metafield_definition": {
"id": "string",
"key": "string",
"name": "string",
"namespace": "string",
"owner_resource": "string",
"type": "string",
"description": "string",
"create_at": "string",
"updated_at": "string"
}
}
}