The REST Admin API is a legacy API as of October 1, 2024. Starting April 1, 2025, all new public apps must be built exclusively with the GraphQL Admin API. For details and migration steps, visit our migration guide.
Metafield
Metafields are a flexible way to attach additional information to a Shopify resource (e.g. Product, Collection, etc.). Some examples of data stored using metafields include specifications, size charts, downloadable documents, release dates, images, or part numbers. Metafields are identified by an owner resource, a namespace, and a key and they store a value along with type information for that context.
Resources that can have metafields
Endpoints
- post/admin/api/latest/blogs/{blog_
id}/metafields. json Create a metafield - get/admin/api/latest/blogs/{blog_
id}/metafields. json Retrieve a list of metafields from the resource's endpoint - get/admin/api/latest/blogs/{blog_
id}/metafields/{metafield_ id}. json Retrieve a specific metafield - get/admin/api/latest/blogs/{blog_
id}/metafields/count. json Retrieve a count of a resource's metafields. - put/admin/api/latest/blogs/{blog_
id}/metafields/{metafield_ id}. json Updates a metafield - del/admin/api/latest/blogs/{blog_
id}/metafields/{metafield_ id}. json Deletes a metafield by its ID
The Metafield resource
Properties
The date and time (ISO 8601 format) when the metafield was created.
The description of the metafield.
The unique ID of the metafield.
Required when updating a metafield, but should not be included when creating as it's created automatically.
The unique identifier for a metafield within its namespace.
Must be 3-64 characters long and can contain alphanumeric, hyphen, and underscore characters.
The container for a group of metafields that the metafield is or will be associated with. Used in tandem with
key
to lookup a metafield on a resource, preventing conflicts with other metafields with the same key
.
Must be 3-255 characters long and can contain alphanumeric, hyphen, and underscore characters.
The unique ID of the resource that the metafield is attached to.
The type of resource that the metafield is attached to.
The date and time (ISO 8601 format) when the metafield was last updated.
The data stored in the metafield. Always stored as a string, regardless of the metafield's type.
The type of data that is stored in the metafield. Refer to the list of supported types.
The Metafield resource
Anchor to POST request, Create a metafieldpostCreate a metafield
You can create any number of metafields for a resource. To create metafields, use the corresponding resource's endpoint as listed on the examples.
Create a metafield for a blog
Create a metafield for a blog
Show metafield properties
The container for a group of metafields that the metafield is or will be associated with. Used in tandem with
key
to lookup a metafield on a resource, preventing conflicts with other metafields with the same key
.
Must be 3-255 characters long and can contain alphanumeric, hyphen, and underscore characters.
The unique identifier for a metafield within its namespace.
Must be 3-64 characters long and can contain alphanumeric, hyphen, and underscore characters.
The type of data that is stored in the metafield. Refer to the list of supported types.
The data stored in the metafield. Always stored as a string, regardless of the metafield's type.
Create a metafield for a collection
Create a metafield for a collection
Show metafield properties
The container for a group of metafields that the metafield is or will be associated with. Used in tandem with
key
to lookup a metafield on a resource, preventing conflicts with other metafields with the same key
.
Must be 3-255 characters long and can contain alphanumeric, hyphen, and underscore characters.
The unique identifier for a metafield within its namespace.
Must be 3-64 characters long and can contain alphanumeric, hyphen, and underscore characters.
The type of data that is stored in the metafield. Refer to the list of supported types.
The data stored in the metafield. Always stored as a string, regardless of the metafield's type.
Create a metafield for a customer
Create a metafield for a customer
Show metafield properties
The container for a group of metafields that the metafield is or will be associated with. Used in tandem with
key
to lookup a metafield on a resource, preventing conflicts with other metafields with the same key
.
Must be 3-255 characters long and can contain alphanumeric, hyphen, and underscore characters.
The unique identifier for a metafield within its namespace.
Must be 3-64 characters long and can contain alphanumeric, hyphen, and underscore characters.
The data stored in the metafield. Always stored as a string, regardless of the metafield's type.
The type of data that is stored in the metafield. Refer to the list of supported types.
Create a metafield for a draft order
Create a metafield for a draft order
Show metafield properties
The container for a group of metafields that the metafield is or will be associated with. Used in tandem with
key
to lookup a metafield on a resource, preventing conflicts with other metafields with the same key
.
Must be 3-255 characters long and can contain alphanumeric, hyphen, and underscore characters.
The unique identifier for a metafield within its namespace.
Must be 3-64 characters long and can contain alphanumeric, hyphen, and underscore characters.
The type of data that is stored in the metafield. Refer to the list of supported types.
The data stored in the metafield. Always stored as a string, regardless of the metafield's type.
Create a metafield for a page
Create a metafield for a page
Show metafield properties
The container for a group of metafields that the metafield is or will be associated with. Used in tandem with
key
to lookup a metafield on a resource, preventing conflicts with other metafields with the same key
.
Must be 3-255 characters long and can contain alphanumeric, hyphen, and underscore characters.
The unique identifier for a metafield within its namespace.
Must be 3-64 characters long and can contain alphanumeric, hyphen, and underscore characters.
The type of data that is stored in the metafield. Refer to the list of supported types.
The data stored in the metafield. Always stored as a string, regardless of the metafield's type.
Create a metafield for a product
Create a metafield for a product
Show metafield properties
The container for a group of metafields that the metafield is or will be associated with. Used in tandem with
key
to lookup a metafield on a resource, preventing conflicts with other metafields with the same key
.
Must be 3-255 characters long and can contain alphanumeric, hyphen, and underscore characters.
The unique identifier for a metafield within its namespace.
Must be 3-64 characters long and can contain alphanumeric, hyphen, and underscore characters.
The data stored in the metafield. Always stored as a string, regardless of the metafield's type.
The type of data that is stored in the metafield. Refer to the list of supported types.
Create a metafield for a product image
Create a metafield for a product image
Show metafield properties
The container for a group of metafields that the metafield is or will be associated with. Used in tandem with
key
to lookup a metafield on a resource, preventing conflicts with other metafields with the same key
.
Must be 3-255 characters long and can contain alphanumeric, hyphen, and underscore characters.
The unique identifier for a metafield within its namespace.
Must be 3-64 characters long and can contain alphanumeric, hyphen, and underscore characters.
The type of data that is stored in the metafield. Refer to the list of supported types.
The data stored in the metafield. Always stored as a string, regardless of the metafield's type.
Create a metafield for a product variant
Create a metafield for a product variant
Show metafield properties
The container for a group of metafields that the metafield is or will be associated with. Used in tandem with
key
to lookup a metafield on a resource, preventing conflicts with other metafields with the same key
.
Must be 3-255 characters long and can contain alphanumeric, hyphen, and underscore characters.
The unique identifier for a metafield within its namespace.
Must be 3-64 characters long and can contain alphanumeric, hyphen, and underscore characters.
The type of data that is stored in the metafield. Refer to the list of supported types.
The data stored in the metafield. Always stored as a string, regardless of the metafield's type.
Create a metafield for an article
Create a metafield for an article
Show metafield properties
The container for a group of metafields that the metafield is or will be associated with. Used in tandem with
key
to lookup a metafield on a resource, preventing conflicts with other metafields with the same key
.
Must be 3-255 characters long and can contain alphanumeric, hyphen, and underscore characters.
The unique identifier for a metafield within its namespace.
Must be 3-64 characters long and can contain alphanumeric, hyphen, and underscore characters.
The type of data that is stored in the metafield. Refer to the list of supported types.
The data stored in the metafield. Always stored as a string, regardless of the metafield's type.
Create a metafield for an order
Create a metafield for an order
Show metafield properties
The container for a group of metafields that the metafield is or will be associated with. Used in tandem with
key
to lookup a metafield on a resource, preventing conflicts with other metafields with the same key
.
Must be 3-255 characters long and can contain alphanumeric, hyphen, and underscore characters.
The unique identifier for a metafield within its namespace.
Must be 3-64 characters long and can contain alphanumeric, hyphen, and underscore characters.
The type of data that is stored in the metafield. Refer to the list of supported types.
The data stored in the metafield. Always stored as a string, regardless of the metafield's type.
Create a metafield for the Shop resource
Create a metafield for the Shop resource
Show metafield properties
The container for a group of metafields that the metafield is or will be associated with. Used in tandem with
key
to lookup a metafield on a resource, preventing conflicts with other metafields with the same key
.
Must be 3-255 characters long and can contain alphanumeric, hyphen, and underscore characters.
The unique identifier for a metafield within its namespace.
Must be 3-64 characters long and can contain alphanumeric, hyphen, and underscore characters.
The data stored in the metafield. Always stored as a string, regardless of the metafield's type.
The type of data that is stored in the metafield. Refer to the list of supported types.
Creating a metafield without a key will fail and return an error
Creating a metafield without a key will fail and return an error
Show metafield properties
The unique identifier for a metafield within its namespace.
Must be 3-64 characters long and can contain alphanumeric, hyphen, and underscore characters.
/admin/api/2025-07/blogs/382285388/metafields. json
Response
Anchor to GET request, Retrieve a list of metafields from the resource's endpointgetRetrieve a list of metafields from the resource's endpoint
Retrieves a list of metafields attached to a particular resource by using the resource's endpoint.
Show metafields created before date (format: 2022-02-25T16:15:47-04:00)
Show metafields created after date (format: 2022-02-25T16:15:47-04:00)
Retrieve only certain fields, specified by a comma-separated list of fields names.
Show metafields with given key
The maximum number of results to show on a page.
Show metafields with given namespace
Show metafields created after the specified ID.
The type of data that the metafield stores in the value
field.
Refer to the list of supported types.
Show metafields last updated before date (format: 2022-02-25T16:15:47-04:00)
Show metafields last updated after date (format: 2022-02-25T16:15:47-04:00)
Retrieve metafields attached to a Blog
Retrieve metafields attached to a Blog
Retrieve metafields attached to a Collection
Retrieve metafields attached to a Collection
Retrieve metafields attached to a Customer
Retrieve metafields attached to a Customer
Retrieve metafields attached to a Draft Order
Retrieve metafields attached to a Draft Order
Retrieve metafields attached to a Page
Retrieve metafields attached to a Page
Retrieve metafields attached to a Product
Retrieve metafields attached to a Product
Retrieve metafields attached to a Product Image
Retrieve metafields attached to a Product Image
Retrieve metafields attached to a Product Variant
Retrieve metafields attached to a Product Variant
Retrieve metafields attached to an Article
Retrieve metafields attached to an Article
Retrieve metafields attached to an Order
Retrieve metafields attached to an Order
Retrieve metafields attached to the Shop
Retrieve metafields attached to the Shop
Retrieve metafields attached to the Shop after the specified ID
Retrieve metafields attached to the Shop after the specified ID
Show metafields created after the specified ID.
/admin/api/2025-07/blogs/382285388/metafields. json
Response
Anchor to GET request, Retrieve a specific metafieldgetRetrieve a specific metafield
Retrieve a metafield by specifying the ID. All fields of a metafield are returned unless specific fields are named.
Retrieve only certain fields, specified by a comma-separated list of fields names.
Retrieve a single metafield by its ID attached to a Blog
Retrieve a single metafield by its ID attached to a Blog
Retrieve a single metafield by its ID attached to a Collection
Retrieve a single metafield by its ID attached to a Collection
Retrieve a single metafield by its ID attached to a Customer
Retrieve a single metafield by its ID attached to a Customer
Retrieve a single metafield by its ID attached to a Draft Order
Retrieve a single metafield by its ID attached to a Draft Order
Retrieve a single metafield by its ID attached to a Page
Retrieve a single metafield by its ID attached to a Page
Retrieve a single metafield by its ID attached to a Product
Retrieve a single metafield by its ID attached to a Product
Retrieve a single metafield by its ID attached to a Product Image
Retrieve a single metafield by its ID attached to a Product Image
Retrieve a single metafield by its ID attached to a Product Variant
Retrieve a single metafield by its ID attached to a Product Variant
Retrieve a single metafield by its ID attached to an Article
Retrieve a single metafield by its ID attached to an Article
Retrieve a single metafield by its ID attached to an Order
Retrieve a single metafield by its ID attached to an Order
Retrieve a single metafield by its ID attached to the Shop resource
Retrieve a single metafield by its ID attached to the Shop resource
/admin/api/2025-07/blogs/382285388/metafields/534526895. json
Response
Anchor to GET request, Retrieve a count of a resource's metafields.getRetrieve a count of a resource's metafields.
Get a count of all metafields that belong to a particular resource.
Retrieve a count of metafields attached to a Blog
Retrieve a count of metafields attached to a Blog
Retrieve a count of metafields attached to a Collection
Retrieve a count of metafields attached to a Collection
Retrieve a count of metafields attached to a Customer
Retrieve a count of metafields attached to a Customer
Retrieve a count of metafields attached to a Draft Order
Retrieve a count of metafields attached to a Draft Order
Retrieve a count of metafields attached to a Page
Retrieve a count of metafields attached to a Page
Retrieve a count of metafields attached to a Product
Retrieve a count of metafields attached to a Product
Retrieve a count of metafields attached to a Product Image
Retrieve a count of metafields attached to a Product Image
Retrieve a count of metafields attached to a Product Variant
Retrieve a count of metafields attached to a Product Variant
Retrieve a count of metafields attached to an Article
Retrieve a count of metafields attached to an Article
Retrieve a count of metafields attached to an Order
Retrieve a count of metafields attached to an Order
Retrieve a count of metafields attached to the Shop resource
Retrieve a count of metafields attached to the Shop resource
/admin/api/2025-07/blogs/382285388/metafields/count. json
Response
Anchor to PUT request, Updates a metafieldputUpdates a metafield
Updates a metafield. The properties that can be updated are value
and type
.
Update a metafield for a Blog
Update a metafield for a Blog
Show metafield properties
The unique ID of the metafield.
Required when updating a metafield, but should not be included when creating as it's created automatically.
The data stored in the metafield. Always stored as a string, regardless of the metafield's type.
The type of data that is stored in the metafield. Refer to the list of supported types.
Update a metafield for a Collection
Update a metafield for a Collection
Show metafield properties
The unique ID of the metafield.
Required when updating a metafield, but should not be included when creating as it's created automatically.
The data stored in the metafield. Always stored as a string, regardless of the metafield's type.
The type of data that is stored in the metafield. Refer to the list of supported types.
Update a metafield for a Customer
Update a metafield for a Customer
Show metafield properties
The unique ID of the metafield.
Required when updating a metafield, but should not be included when creating as it's created automatically.
The data stored in the metafield. Always stored as a string, regardless of the metafield's type.
The type of data that is stored in the metafield. Refer to the list of supported types.
Update a metafield for a Draft Order
Update a metafield for a Draft Order
Show metafield properties
The unique ID of the metafield.
Required when updating a metafield, but should not be included when creating as it's created automatically.
The data stored in the metafield. Always stored as a string, regardless of the metafield's type.
The type of data that is stored in the metafield. Refer to the list of supported types.
Update a metafield for a Page
Update a metafield for a Page
Show metafield properties
The unique ID of the metafield.
Required when updating a metafield, but should not be included when creating as it's created automatically.
The data stored in the metafield. Always stored as a string, regardless of the metafield's type.
The type of data that is stored in the metafield. Refer to the list of supported types.
Update a metafield for a Product
Update a metafield for a Product
Show metafield properties
The unique ID of the metafield.
Required when updating a metafield, but should not be included when creating as it's created automatically.
The data stored in the metafield. Always stored as a string, regardless of the metafield's type.
The type of data that is stored in the metafield. Refer to the list of supported types.
Update a metafield for a Product Image
Update a metafield for a Product Image
Show metafield properties
The unique ID of the metafield.
Required when updating a metafield, but should not be included when creating as it's created automatically.
The data stored in the metafield. Always stored as a string, regardless of the metafield's type.
The type of data that is stored in the metafield. Refer to the list of supported types.
Update a metafield for a Product Variant
Update a metafield for a Product Variant
Show metafield properties
The unique ID of the metafield.
Required when updating a metafield, but should not be included when creating as it's created automatically.
The data stored in the metafield. Always stored as a string, regardless of the metafield's type.
The type of data that is stored in the metafield. Refer to the list of supported types.
Update a metafield for a Shop resource
Update a metafield for a Shop resource
Show metafield properties
The unique ID of the metafield.
Required when updating a metafield, but should not be included when creating as it's created automatically.
The data stored in the metafield. Always stored as a string, regardless of the metafield's type.
The type of data that is stored in the metafield. Refer to the list of supported types.
Update a metafield for an Article
Update a metafield for an Article
Show metafield properties
The unique ID of the metafield.
Required when updating a metafield, but should not be included when creating as it's created automatically.
The data stored in the metafield. Always stored as a string, regardless of the metafield's type.
The type of data that is stored in the metafield. Refer to the list of supported types.
Update a metafield for an Order
Update a metafield for an Order
Show metafield properties
The unique ID of the metafield.
Required when updating a metafield, but should not be included when creating as it's created automatically.
The data stored in the metafield. Always stored as a string, regardless of the metafield's type.
The type of data that is stored in the metafield. Refer to the list of supported types.
/admin/api/2025-07/blogs/382285388/metafields/534526895. json
Response
Anchor to DELETE request, Deletes a metafield by its IDdelDeletes a metafield by its ID
Deletes a metafield by its ID.
Delete a metafield by its ID for a Blog
Delete a metafield by its ID for a Blog
Delete a metafield by its ID for a Collection
Delete a metafield by its ID for a Collection
Delete a metafield by its ID for a Customer
Delete a metafield by its ID for a Customer
Delete a metafield by its ID for a Draft Order
Delete a metafield by its ID for a Draft Order
Delete a metafield by its ID for a Page
Delete a metafield by its ID for a Page
Delete a metafield by its ID for a Product
Delete a metafield by its ID for a Product
Delete a metafield by its ID for a Product Image
Delete a metafield by its ID for a Product Image
Delete a metafield by its ID for a Product Variant
Delete a metafield by its ID for a Product Variant
Delete a metafield by its ID for an Article
Delete a metafield by its ID for an Article
Delete a metafield by its ID for an Order
Delete a metafield by its ID for an Order
Delete a metafield by its ID for the Shop resource
Delete a metafield by its ID for the Shop resource