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/unstable/blogs/{blog_
id}/metafields. json Create a metafield - get/admin/api/unstable/blogs/{blog_
id}/metafields. json Retrieve a list of metafields from the resource's endpoint - get/admin/api/unstable/blogs/{blog_
id}/metafields/{metafield_ id}. json Retrieve a specific metafield - get/admin/api/unstable/blogs/{blog_
id}/metafields/count. json Retrieve a count of a resource's metafields. - put/admin/api/unstable/blogs/{blog_
id}/metafields/{metafield_ id}. json Updates a metafield - del/admin/api/unstable/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
Create a metafield for a collection
Create a metafield for a collection
Create a metafield for a customer
Create a metafield for a customer
Create a metafield for a draft order
Create a metafield for a draft order
Create a metafield for a page
Create a metafield for a page
Create a metafield for a product
Create a metafield for a product
Create a metafield for a product image
Create a metafield for a product image
Create a metafield for a product variant
Create a metafield for a product variant
Create a metafield for an article
Create a metafield for an article
Create a metafield for an order
Create a metafield for an order
Create a metafield for the Shop resource
Create a metafield for the Shop resource
Creating a metafield without a key will fail and return an error
Creating a metafield without a key will fail and return an error
/admin/api/unstable/blogs/382285388/metafields. json
Response
examples
Create a metafield for a blog
curl -d '{"metafield":{"namespace":"my_fields","key":"sponsor","type":"single_line_text_field","value":"Shopify"}}' \ -X POST "https://your-development-store.myshopify.com/admin/api/unstable/blogs/382285388/metafields.json" \ -H "X-Shopify-Access-Token: {access_token}" \ -H "Content-Type: application/json"import { DataType } from '@shopify/shopify-api'; const client = new shopify.clients.Rest({session}); const data = await client.post({ path: 'blogs/382285388/metafields', data: {"metafield":{"namespace":"my_fields","key":"sponsor","type":"single_line_text_field","value":"Shopify"}}, type: DataType.JSON, });session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Rest::Admin.new( session: session ) response = client.post( path: 'blogs/382285388/metafields', body: { "metafield": { "namespace": "my_fields", "key": "sponsor", "type": "single_line_text_field", "value": "Shopify" } }, )import { DataType } from '@shopify/shopify-api'; const client = new shopify.clients.Rest({session}); const data = await client.post({ path: 'blogs/382285388/metafields', data: {"metafield":{"namespace":"my_fields","key":"sponsor","type":"single_line_text_field","value":"Shopify"}}, type: DataType.JSON, });response
HTTP/1.1 201 Created{"metafield":{"id":1069228999,"namespace":"my_fields","key":"sponsor","value":"Shopify","description":null,"owner_id":382285388,"created_at":"2026-01-09T19:17:34-05:00","updated_at":"2026-01-09T19:17:34-05:00","owner_resource":"blog","type":"single_line_text_field","admin_graphql_api_id":"gid://shopify/Metafield/1069228999"}}Create a metafield for a collection
curl -d '{"metafield":{"namespace":"my_fields","key":"discount","type":"single_line_text_field","value":"25%"}}' \ -X POST "https://your-development-store.myshopify.com/admin/api/unstable/collections/482865238/metafields.json" \ -H "X-Shopify-Access-Token: {access_token}" \ -H "Content-Type: application/json"import { DataType } from '@shopify/shopify-api'; const client = new shopify.clients.Rest({session}); const data = await client.post({ path: 'collections/482865238/metafields', data: {"metafield":{"namespace":"my_fields","key":"discount","type":"single_line_text_field","value":"25%"}}, type: DataType.JSON, });session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Rest::Admin.new( session: session ) response = client.post( path: 'collections/482865238/metafields', body: { "metafield": { "namespace": "my_fields", "key": "discount", "type": "single_line_text_field", "value": "25%" } }, )import { DataType } from '@shopify/shopify-api'; const client = new shopify.clients.Rest({session}); const data = await client.post({ path: 'collections/482865238/metafields', data: {"metafield":{"namespace":"my_fields","key":"discount","type":"single_line_text_field","value":"25%"}}, type: DataType.JSON, });response
HTTP/1.1 201 Created{"metafield":{"id":1069229007,"namespace":"my_fields","key":"discount","value":"25%","description":null,"owner_id":482865238,"created_at":"2026-01-09T19:33:27-05:00","updated_at":"2026-01-09T19:33:27-05:00","owner_resource":"collection","type":"single_line_text_field","admin_graphql_api_id":"gid://shopify/Metafield/1069229007"}}Create a metafield for a customer
curl -d '{"metafield":{"namespace":"discounts","key":"special","value":"yes","type":"single_line_text_field"}}' \ -X POST "https://your-development-store.myshopify.com/admin/api/unstable/customers/207119551/metafields.json" \ -H "X-Shopify-Access-Token: {access_token}" \ -H "Content-Type: application/json"import { DataType } from '@shopify/shopify-api'; const client = new shopify.clients.Rest({session}); const data = await client.post({ path: 'customers/207119551/metafields', data: {"metafield":{"namespace":"discounts","key":"special","value":"yes","type":"single_line_text_field"}}, type: DataType.JSON, });session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Rest::Admin.new( session: session ) response = client.post( path: 'customers/207119551/metafields', body: { "metafield": { "namespace": "discounts", "key": "special", "value": "yes", "type": "single_line_text_field" } }, )import { DataType } from '@shopify/shopify-api'; const client = new shopify.clients.Rest({session}); const data = await client.post({ path: 'customers/207119551/metafields', data: {"metafield":{"namespace":"discounts","key":"special","value":"yes","type":"single_line_text_field"}}, type: DataType.JSON, });response
HTTP/1.1 201 Created{"metafield":{"id":1069229009,"namespace":"discounts","key":"special","value":"yes","description":null,"owner_id":207119551,"created_at":"2026-01-09T19:33:32-05:00","updated_at":"2026-01-09T19:33:32-05:00","owner_resource":"customer","type":"single_line_text_field","admin_graphql_api_id":"gid://shopify/Metafield/1069229009"}}Create a metafield for a draft order
curl -d '{"metafield":{"namespace":"my_fields","key":"purchase_order","type":"single_line_text_field","value":"97453"}}' \ -X POST "https://your-development-store.myshopify.com/admin/api/unstable/draft_orders/622762746/metafields.json" \ -H "X-Shopify-Access-Token: {access_token}" \ -H "Content-Type: application/json"import { DataType } from '@shopify/shopify-api'; const client = new shopify.clients.Rest({session}); const data = await client.post({ path: 'draft_orders/622762746/metafields', data: {"metafield":{"namespace":"my_fields","key":"purchase_order","type":"single_line_text_field","value":"97453"}}, type: DataType.JSON, });session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Rest::Admin.new( session: session ) response = client.post( path: 'draft_orders/622762746/metafields', body: { "metafield": { "namespace": "my_fields", "key": "purchase_order", "type": "single_line_text_field", "value": "97453" } }, )import { DataType } from '@shopify/shopify-api'; const client = new shopify.clients.Rest({session}); const data = await client.post({ path: 'draft_orders/622762746/metafields', data: {"metafield":{"namespace":"my_fields","key":"purchase_order","type":"single_line_text_field","value":"97453"}}, type: DataType.JSON, });response
HTTP/1.1 201 Created{"metafield":{"id":1069229003,"namespace":"my_fields","key":"purchase_order","value":"97453","description":null,"owner_id":622762746,"created_at":"2026-01-09T19:33:01-05:00","updated_at":"2026-01-09T19:33:01-05:00","owner_resource":"draft_order","type":"single_line_text_field","admin_graphql_api_id":"gid://shopify/Metafield/1069229003"}}Create a metafield for a page
curl -d '{"metafield":{"namespace":"my_fields","key":"subtitle","type":"single_line_text_field","value":"A subtitle for my page"}}' \ -X POST "https://your-development-store.myshopify.com/admin/api/unstable/pages/131092082/metafields.json" \ -H "X-Shopify-Access-Token: {access_token}" \ -H "Content-Type: application/json"import { DataType } from '@shopify/shopify-api'; const client = new shopify.clients.Rest({session}); const data = await client.post({ path: 'pages/131092082/metafields', data: {"metafield":{"namespace":"my_fields","key":"subtitle","type":"single_line_text_field","value":"A subtitle for my page"}}, type: DataType.JSON, });session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Rest::Admin.new( session: session ) response = client.post( path: 'pages/131092082/metafields', body: { "metafield": { "namespace": "my_fields", "key": "subtitle", "type": "single_line_text_field", "value": "A subtitle for my page" } }, )import { DataType } from '@shopify/shopify-api'; const client = new shopify.clients.Rest({session}); const data = await client.post({ path: 'pages/131092082/metafields', data: {"metafield":{"namespace":"my_fields","key":"subtitle","type":"single_line_text_field","value":"A subtitle for my page"}}, type: DataType.JSON, });response
HTTP/1.1 201 Created{"metafield":{"id":1069229008,"namespace":"my_fields","key":"subtitle","value":"A subtitle for my page","description":null,"owner_id":131092082,"created_at":"2026-01-09T19:33:28-05:00","updated_at":"2026-01-09T19:33:28-05:00","owner_resource":"page","type":"single_line_text_field","admin_graphql_api_id":"gid://shopify/Metafield/1069229008"}}Create a metafield for a product
curl -d '{"metafield":{"namespace":"inventory","key":"warehouse","value":25,"type":"number_integer"}}' \ -X POST "https://your-development-store.myshopify.com/admin/api/unstable/products/632910392/metafields.json" \ -H "X-Shopify-Access-Token: {access_token}" \ -H "Content-Type: application/json"import { DataType } from '@shopify/shopify-api'; const client = new shopify.clients.Rest({session}); const data = await client.post({ path: 'products/632910392/metafields', data: {"metafield":{"namespace":"inventory","key":"warehouse","value":25,"type":"number_integer"}}, type: DataType.JSON, });session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Rest::Admin.new( session: session ) response = client.post( path: 'products/632910392/metafields', body: { "metafield": { "namespace": "inventory", "key": "warehouse", "value": 25, "type": "number_integer" } }, )import { DataType } from '@shopify/shopify-api'; const client = new shopify.clients.Rest({session}); const data = await client.post({ path: 'products/632910392/metafields', data: {"metafield":{"namespace":"inventory","key":"warehouse","value":25,"type":"number_integer"}}, type: DataType.JSON, });response
HTTP/1.1 201 Created{"metafield":{"id":1069229006,"namespace":"inventory","key":"warehouse","value":25,"description":null,"owner_id":632910392,"created_at":"2026-01-09T19:33:24-05:00","updated_at":"2026-01-09T19:33:24-05:00","owner_resource":"product","type":"number_integer","admin_graphql_api_id":"gid://shopify/Metafield/1069229006"}}Create a metafield for a product image
curl -d '{"metafield":{"namespace":"translation","key":"title_spanish","type":"single_line_text_field","value":"botas"}}' \ -X POST "https://your-development-store.myshopify.com/admin/api/unstable/product_images/850703190/metafields.json" \ -H "X-Shopify-Access-Token: {access_token}" \ -H "Content-Type: application/json"import { DataType } from '@shopify/shopify-api'; const client = new shopify.clients.Rest({session}); const data = await client.post({ path: 'product_images/850703190/metafields', data: {"metafield":{"namespace":"translation","key":"title_spanish","type":"single_line_text_field","value":"botas"}}, type: DataType.JSON, });session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Rest::Admin.new( session: session ) response = client.post( path: 'product_images/850703190/metafields', body: { "metafield": { "namespace": "translation", "key": "title_spanish", "type": "single_line_text_field", "value": "botas" } }, )import { DataType } from '@shopify/shopify-api'; const client = new shopify.clients.Rest({session}); const data = await client.post({ path: 'product_images/850703190/metafields', data: {"metafield":{"namespace":"translation","key":"title_spanish","type":"single_line_text_field","value":"botas"}}, type: DataType.JSON, });response
HTTP/1.1 201 Created{"metafield":{"id":1069229012,"namespace":"translation","key":"title_spanish","value":"botas","description":null,"owner_id":850703190,"created_at":"2026-01-09T19:33:45-05:00","updated_at":"2026-01-09T19:33:45-05:00","owner_resource":"product_image","type":"single_line_text_field","admin_graphql_api_id":"gid://shopify/Metafield/1069229012"}}Create a metafield for a product variant
curl -d '{"metafield":{"namespace":"my_fields","key":"liner_material","type":"single_line_text_field","value":"synthetic leather"}}' \ -X POST "https://your-development-store.myshopify.com/admin/api/unstable/variants/49148385/metafields.json" \ -H "X-Shopify-Access-Token: {access_token}" \ -H "Content-Type: application/json"import { DataType } from '@shopify/shopify-api'; const client = new shopify.clients.Rest({session}); const data = await client.post({ path: 'variants/49148385/metafields', data: {"metafield":{"namespace":"my_fields","key":"liner_material","type":"single_line_text_field","value":"synthetic leather"}}, type: DataType.JSON, });session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Rest::Admin.new( session: session ) response = client.post( path: 'variants/49148385/metafields', body: { "metafield": { "namespace": "my_fields", "key": "liner_material", "type": "single_line_text_field", "value": "synthetic leather" } }, )import { DataType } from '@shopify/shopify-api'; const client = new shopify.clients.Rest({session}); const data = await client.post({ path: 'variants/49148385/metafields', data: {"metafield":{"namespace":"my_fields","key":"liner_material","type":"single_line_text_field","value":"synthetic leather"}}, type: DataType.JSON, });response
HTTP/1.1 201 Created{"metafield":{"id":1069228998,"namespace":"my_fields","key":"liner_material","value":"synthetic leather","description":null,"owner_id":49148385,"created_at":"2026-01-09T19:17:28-05:00","updated_at":"2026-01-09T19:17:28-05:00","owner_resource":"variant","type":"single_line_text_field","admin_graphql_api_id":"gid://shopify/Metafield/1069228998"}}Create a metafield for an article
curl -d '{"metafield":{"namespace":"my_fields","key":"category","type":"single_line_text_field","value":"outdoors"}}' \ -X POST "https://your-development-store.myshopify.com/admin/api/unstable/articles/674387490/metafields.json" \ -H "X-Shopify-Access-Token: {access_token}" \ -H "Content-Type: application/json"import { DataType } from '@shopify/shopify-api'; const client = new shopify.clients.Rest({session}); const data = await client.post({ path: 'articles/674387490/metafields', data: {"metafield":{"namespace":"my_fields","key":"category","type":"single_line_text_field","value":"outdoors"}}, type: DataType.JSON, });session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Rest::Admin.new( session: session ) response = client.post( path: 'articles/674387490/metafields', body: { "metafield": { "namespace": "my_fields", "key": "category", "type": "single_line_text_field", "value": "outdoors" } }, )import { DataType } from '@shopify/shopify-api'; const client = new shopify.clients.Rest({session}); const data = await client.post({ path: 'articles/674387490/metafields', data: {"metafield":{"namespace":"my_fields","key":"category","type":"single_line_text_field","value":"outdoors"}}, type: DataType.JSON, });response
HTTP/1.1 201 Created{"metafield":{"id":1069228996,"namespace":"my_fields","key":"category","value":"outdoors","description":null,"owner_id":674387490,"created_at":"2026-01-09T19:17:17-05:00","updated_at":"2026-01-09T19:17:17-05:00","owner_resource":"article","type":"single_line_text_field","admin_graphql_api_id":"gid://shopify/Metafield/1069228996"}}Create a metafield for an order
curl -d '{"metafield":{"namespace":"my_fields","key":"purchase_order","type":"single_line_text_field","value":"123"}}' \ -X POST "https://your-development-store.myshopify.com/admin/api/unstable/orders/450789469/metafields.json" \ -H "X-Shopify-Access-Token: {access_token}" \ -H "Content-Type: application/json"import { DataType } from '@shopify/shopify-api'; const client = new shopify.clients.Rest({session}); const data = await client.post({ path: 'orders/450789469/metafields', data: {"metafield":{"namespace":"my_fields","key":"purchase_order","type":"single_line_text_field","value":"123"}}, type: DataType.JSON, });session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Rest::Admin.new( session: session ) response = client.post( path: 'orders/450789469/metafields', body: { "metafield": { "namespace": "my_fields", "key": "purchase_order", "type": "single_line_text_field", "value": "123" } }, )import { DataType } from '@shopify/shopify-api'; const client = new shopify.clients.Rest({session}); const data = await client.post({ path: 'orders/450789469/metafields', data: {"metafield":{"namespace":"my_fields","key":"purchase_order","type":"single_line_text_field","value":"123"}}, type: DataType.JSON, });response
HTTP/1.1 201 Created{"metafield":{"id":1069228994,"namespace":"my_fields","key":"purchase_order","value":"123","description":null,"owner_id":450789469,"created_at":"2026-01-09T19:17:14-05:00","updated_at":"2026-01-09T19:17:14-05:00","owner_resource":"order","type":"single_line_text_field","admin_graphql_api_id":"gid://shopify/Metafield/1069228994"}}Create a metafield for the Shop resource
curl -d '{"metafield":{"namespace":"my_fields","key":"my_items","value":"{\"items\":[\"some item\"]}","type":"json"}}' \ -X POST "https://your-development-store.myshopify.com/admin/api/unstable/metafields.json" \ -H "X-Shopify-Access-Token: {access_token}" \ -H "Content-Type: application/json"import { DataType } from '@shopify/shopify-api'; const client = new shopify.clients.Rest({session}); const data = await client.post({ path: 'metafields', data: {"metafield":{"namespace":"my_fields","key":"my_items","value":"{\"items\":[\"some item\"]}","type":"json"}}, type: DataType.JSON, });session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Rest::Admin.new( session: session ) response = client.post( path: 'metafields', body: { "metafield": { "namespace": "my_fields", "key": "my_items", "value": "{"items":["some item"]}", "type": "json" } }, )import { DataType } from '@shopify/shopify-api'; const client = new shopify.clients.Rest({session}); const data = await client.post({ path: 'metafields', data: {"metafield":{"namespace":"my_fields","key":"my_items","value":"{\"items\":[\"some item\"]}","type":"json"}}, type: DataType.JSON, });response
HTTP/1.1 201 Created{"metafield":{"id":1069229002,"namespace":"my_fields","key":"my_items","value":"{\"items\":[\"some item\"]}","description":null,"owner_id":548380009,"created_at":"2026-01-09T19:17:41-05:00","updated_at":"2026-01-09T19:17:41-05:00","owner_resource":"shop","type":"json","admin_graphql_api_id":"gid://shopify/Metafield/1069229002"}}Creating a metafield without a key will fail and return an error
curl -d '{"metafield":{"key":null}}' \ -X POST "https://your-development-store.myshopify.com/admin/api/unstable/metafields.json" \ -H "X-Shopify-Access-Token: {access_token}" \ -H "Content-Type: application/json"import { DataType } from '@shopify/shopify-api'; const client = new shopify.clients.Rest({session}); const data = await client.post({ path: 'metafields', data: {"metafield":{"key":null}}, type: DataType.JSON, });session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Rest::Admin.new( session: session ) response = client.post( path: 'metafields', body: { "metafield": { "key": null } }, )import { DataType } from '@shopify/shopify-api'; const client = new shopify.clients.Rest({session}); const data = await client.post({ path: 'metafields', data: {"metafield":{"key":null}}, type: DataType.JSON, });response
HTTP/1.1 422 Unprocessable Entity{"errors":{"type":["can't be blank"],"namespace":["can't be blank","is too short (minimum is 3 characters)"],"key":["can't be blank","is too short (minimum is 2 characters)"]}}
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
/admin/api/unstable/blogs/382285388/metafields. json
Response
examples
Retrieve metafields attached to a Blog
curl -X GET "https://your-development-store.myshopify.com/admin/api/unstable/blogs/382285388/metafields.json" \ -H "X-Shopify-Access-Token: {access_token}"const client = new shopify.clients.Rest({session}); const data = await client.get({ path: 'blogs/382285388/metafields', });session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Rest::Admin.new( session: session ) response = client.get( path: 'blogs/382285388/metafields', )const client = new shopify.clients.Rest({session}); const data = await client.get({ path: 'blogs/382285388/metafields', });response
HTTP/1.1 200 OK{"metafields":[{"id":1069228995,"namespace":"my_fields","key":"sponsor","value":"Shopify","description":null,"owner_id":382285388,"created_at":"2026-01-09T19:17:14-05:00","updated_at":"2026-01-09T19:17:14-05:00","owner_resource":"blog","type":"single_line_text_field","admin_graphql_api_id":"gid://shopify/Metafield/1069228995"}]}Retrieve metafields attached to a Collection
curl -X GET "https://your-development-store.myshopify.com/admin/api/unstable/collections/482865238/metafields.json" \ -H "X-Shopify-Access-Token: {access_token}"const client = new shopify.clients.Rest({session}); const data = await client.get({ path: 'collections/482865238/metafields', });session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Rest::Admin.new( session: session ) response = client.get( path: 'collections/482865238/metafields', )const client = new shopify.clients.Rest({session}); const data = await client.get({ path: 'collections/482865238/metafields', });response
HTTP/1.1 200 OK{"metafields":[{"id":519046726,"namespace":"notes","key":"descriptionription","value":"Collection description","description":"Custom Collection notes","owner_id":482865238,"created_at":"2026-01-09T17:04:11-05:00","updated_at":"2026-01-09T17:04:11-05:00","owner_resource":"collection","type":"multi_line_text_field","admin_graphql_api_id":"gid://shopify/Metafield/519046726"},{"id":624849518,"namespace":"global","key":"description_tag","value":"Some seo description value","description":null,"owner_id":482865238,"created_at":"2026-01-09T17:04:11-05:00","updated_at":"2026-01-09T17:04:11-05:00","owner_resource":"collection","type":"multi_line_text_field","admin_graphql_api_id":"gid://shopify/Metafield/624849518"},{"id":1010236510,"namespace":"global","key":"title_tag","value":"Some seo title value","description":null,"owner_id":482865238,"created_at":"2026-01-09T17:04:11-05:00","updated_at":"2026-01-09T17:04:11-05:00","owner_resource":"collection","type":"single_line_text_field","admin_graphql_api_id":"gid://shopify/Metafield/1010236510"},{"id":1069229014,"namespace":"my_fields","key":"discount","value":"25%","description":null,"owner_id":482865238,"created_at":"2026-01-09T19:33:50-05:00","updated_at":"2026-01-09T19:33:50-05:00","owner_resource":"collection","type":"single_line_text_field","admin_graphql_api_id":"gid://shopify/Metafield/1069229014"}]}Retrieve metafields attached to a Customer
curl -X GET "https://your-development-store.myshopify.com/admin/api/unstable/customers/207119551/metafields.json" \ -H "X-Shopify-Access-Token: {access_token}"const client = new shopify.clients.Rest({session}); const data = await client.get({ path: 'customers/207119551/metafields', });session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Rest::Admin.new( session: session ) response = client.get( path: 'customers/207119551/metafields', )const client = new shopify.clients.Rest({session}); const data = await client.get({ path: 'customers/207119551/metafields', });response
HTTP/1.1 200 OK{"metafields":[{"id":220591908,"namespace":"discounts","key":"returning_customer","value":"no","description":"Customer deserves discount","owner_id":207119551,"created_at":"2026-01-09T17:04:11-05:00","updated_at":"2026-01-09T17:04:11-05:00","owner_resource":"customer","type":"single_line_text_field","admin_graphql_api_id":"gid://shopify/Metafield/220591908"},{"id":1069229011,"namespace":"discounts","key":"special","value":"yes","description":null,"owner_id":207119551,"created_at":"2026-01-09T19:33:40-05:00","updated_at":"2026-01-09T19:33:40-05:00","owner_resource":"customer","type":"single_line_text_field","admin_graphql_api_id":"gid://shopify/Metafield/1069229011"}]}Retrieve metafields attached to a Draft Order
curl -X GET "https://your-development-store.myshopify.com/admin/api/unstable/draft_orders/622762746/metafields.json" \ -H "X-Shopify-Access-Token: {access_token}"const client = new shopify.clients.Rest({session}); const data = await client.get({ path: 'draft_orders/622762746/metafields', });session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Rest::Admin.new( session: session ) response = client.get( path: 'draft_orders/622762746/metafields', )const client = new shopify.clients.Rest({session}); const data = await client.get({ path: 'draft_orders/622762746/metafields', });response
HTTP/1.1 200 OK{"metafields":[{"id":106172460,"namespace":"notes","key":"note","value":"B flat","description":"This is for notes","owner_id":622762746,"created_at":"2026-01-09T17:04:11-05:00","updated_at":"2026-01-09T17:04:11-05:00","owner_resource":"draft_order","type":"single_line_text_field","admin_graphql_api_id":"gid://shopify/Metafield/106172460"},{"id":1069229010,"namespace":"my_fields","key":"purchase_order","value":"97453","description":null,"owner_id":622762746,"created_at":"2026-01-09T19:33:36-05:00","updated_at":"2026-01-09T19:33:36-05:00","owner_resource":"draft_order","type":"single_line_text_field","admin_graphql_api_id":"gid://shopify/Metafield/1069229010"}]}Retrieve metafields attached to a Page
curl -X GET "https://your-development-store.myshopify.com/admin/api/unstable/pages/131092082/metafields.json" \ -H "X-Shopify-Access-Token: {access_token}"const client = new shopify.clients.Rest({session}); const data = await client.get({ path: 'pages/131092082/metafields', });session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Rest::Admin.new( session: session ) response = client.get( path: 'pages/131092082/metafields', )const client = new shopify.clients.Rest({session}); const data = await client.get({ path: 'pages/131092082/metafields', });response
HTTP/1.1 200 OK{"metafields":[{"id":290519330,"namespace":"translation","key":"title_fr","value":"Le TOS","description":"Page French title translation","owner_id":131092082,"created_at":"2026-01-09T17:04:11-05:00","updated_at":"2026-01-09T17:04:11-05:00","owner_resource":"page","type":"single_line_text_field","admin_graphql_api_id":"gid://shopify/Metafield/290519330"},{"id":1069228992,"namespace":"my_fields","key":"subtitle","value":"A subtitle for my page","description":null,"owner_id":131092082,"created_at":"2026-01-09T19:17:05-05:00","updated_at":"2026-01-09T19:17:05-05:00","owner_resource":"page","type":"single_line_text_field","admin_graphql_api_id":"gid://shopify/Metafield/1069228992"}]}Retrieve metafields attached to a Product
curl -X GET "https://your-development-store.myshopify.com/admin/api/unstable/products/632910392/metafields.json" \ -H "X-Shopify-Access-Token: {access_token}"const client = new shopify.clients.Rest({session}); const data = await client.get({ path: 'products/632910392/metafields', });session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Rest::Admin.new( session: session ) response = client.get( path: 'products/632910392/metafields', )const client = new shopify.clients.Rest({session}); const data = await client.get({ path: 'products/632910392/metafields', });response
HTTP/1.1 200 OK{"metafields":[{"id":51714266,"namespace":"my_namespace","key":"my_key","value":"Hello","description":null,"owner_id":632910392,"created_at":"2026-01-09T17:04:11-05:00","updated_at":"2026-01-09T17:04:11-05:00","owner_resource":"product","type":"single_line_text_field","admin_graphql_api_id":"gid://shopify/Metafield/51714266"},{"id":116539875,"namespace":"descriptors","key":"subtitle","value":"The best ipod","description":null,"owner_id":632910392,"created_at":"2026-01-09T17:04:11-05:00","updated_at":"2026-01-09T17:04:11-05:00","owner_resource":"product","type":"single_line_text_field","admin_graphql_api_id":"gid://shopify/Metafield/116539875"},{"id":263497237,"namespace":"installments","key":"disable","value":true,"description":null,"owner_id":632910392,"created_at":"2026-01-09T17:04:11-05:00","updated_at":"2026-01-09T17:04:11-05:00","owner_resource":"product","type":"boolean","admin_graphql_api_id":"gid://shopify/Metafield/263497237"},{"id":273160493,"namespace":"facts","key":"isbn","value":"978-0-14-004259-7","description":null,"owner_id":632910392,"created_at":"2026-01-09T17:04:11-05:00","updated_at":"2026-01-09T17:04:11-05:00","owner_resource":"product","type":"single_line_text_field","admin_graphql_api_id":"gid://shopify/Metafield/273160493"},{"id":524118066,"namespace":"facts","key":"ean","value":"0123456789012","description":null,"owner_id":632910392,"created_at":"2026-01-09T17:04:11-05:00","updated_at":"2026-01-09T17:04:11-05:00","owner_resource":"product","type":"single_line_text_field","admin_graphql_api_id":"gid://shopify/Metafield/524118066"},{"id":543636738,"namespace":"reviews","key":"rating_count","value":1,"description":null,"owner_id":632910392,"created_at":"2026-01-09T17:04:11-05:00","updated_at":"2026-01-09T17:04:11-05:00","owner_resource":"product","type":"number_integer","admin_graphql_api_id":"gid://shopify/Metafield/543636738"},{"id":572384404,"namespace":"reviews","key":"rating","value":"{\"value\": \"3.5\", \"scale_min\": \"1.0\", \"scale_max\": \"5.0\"}","description":null,"owner_id":632910392,"created_at":"2026-01-09T17:04:11-05:00","updated_at":"2026-01-09T17:04:11-05:00","owner_resource":"product","type":"rating","admin_graphql_api_id":"gid://shopify/Metafield/572384404"},{"id":613330208,"namespace":"shopify_filter","key":"display","value":"retina","description":"This field keeps track of the type of display","owner_id":632910392,"created_at":"2026-01-09T17:04:11-05:00","updated_at":"2026-01-09T17:04:11-05:00","owner_resource":"product","type":"single_line_text_field","admin_graphql_api_id":"gid://shopify/Metafield/613330208"},{"id":779326701,"namespace":"facts","key":"upc","value":"012345678901","description":null,"owner_id":632910392,"created_at":"2026-01-09T17:04:11-05:00","updated_at":"2026-01-09T17:04:11-05:00","owner_resource":"product","type":"single_line_text_field","admin_graphql_api_id":"gid://shopify/Metafield/779326701"},{"id":845366454,"namespace":"translations","key":"title_fr","value":"produit","description":"French product title","owner_id":632910392,"created_at":"2026-01-09T17:04:11-05:00","updated_at":"2026-01-09T17:04:11-05:00","owner_resource":"product","type":"single_line_text_field","admin_graphql_api_id":"gid://shopify/Metafield/845366454"},{"id":861799889,"namespace":"my_other_fields","key":"organic","value":true,"description":null,"owner_id":632910392,"created_at":"2026-01-09T17:04:11-05:00","updated_at":"2026-01-09T17:04:11-05:00","owner_resource":"product","type":"boolean","admin_graphql_api_id":"gid://shopify/Metafield/861799889"},{"id":870326793,"namespace":"descriptors","key":"care_guide","value":"Wash in cold water","description":null,"owner_id":632910392,"created_at":"2026-01-09T17:04:11-05:00","updated_at":"2026-01-09T17:04:11-05:00","owner_resource":"product","type":null,"admin_graphql_api_id":"gid://shopify/Metafield/870326793"},{"id":908250163,"namespace":"my_other_fields","key":"shipping_policy","value":"Ships for free in Canada","description":null,"owner_id":632910392,"created_at":"2026-01-09T17:04:11-05:00","updated_at":"2026-01-09T17:04:11-05:00","owner_resource":"product","type":"multi_line_text_field","admin_graphql_api_id":"gid://shopify/Metafield/908250163"},{"id":925288667,"namespace":"my_other_fields","key":"year_released","value":2019,"description":null,"owner_id":632910392,"created_at":"2026-01-09T17:04:11-05:00","updated_at":"2026-01-09T17:04:11-05:00","owner_resource":"product","type":"number_integer","admin_graphql_api_id":"gid://shopify/Metafield/925288667"},{"id":1001077698,"namespace":"my_fields","key":"best_for","value":"travel","description":null,"owner_id":632910392,"created_at":"2026-01-09T17:04:11-05:00","updated_at":"2026-01-09T17:04:11-05:00","owner_resource":"product","type":"single_line_text_field","admin_graphql_api_id":"gid://shopify/Metafield/1001077698"},{"id":1029402048,"namespace":"my_other_fields","key":"ingredients","value":"[\"apple\", \"music\", \"u2\"]","description":null,"owner_id":632910392,"created_at":"2026-01-09T17:04:11-05:00","updated_at":"2026-01-09T17:04:11-05:00","owner_resource":"product","type":"list.single_line_text_field","admin_graphql_api_id":"gid://shopify/Metafield/1029402048"},{"id":1069229004,"namespace":"inventory","key":"warehouse","value":25,"description":null,"owner_id":632910392,"created_at":"2026-01-09T19:33:06-05:00","updated_at":"2026-01-09T19:33:06-05:00","owner_resource":"product","type":"number_integer","admin_graphql_api_id":"gid://shopify/Metafield/1069229004"}]}Retrieve metafields attached to a Product Image
curl -X GET "https://your-development-store.myshopify.com/admin/api/unstable/product_images/850703190/metafields.json" \ -H "X-Shopify-Access-Token: {access_token}"const client = new shopify.clients.Rest({session}); const data = await client.get({ path: 'product_images/850703190/metafields', });session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Rest::Admin.new( session: session ) response = client.get( path: 'product_images/850703190/metafields', )const client = new shopify.clients.Rest({session}); const data = await client.get({ path: 'product_images/850703190/metafields', });response
HTTP/1.1 200 OK{"metafields":[{"id":625663657,"namespace":"translation","key":"title_fr","value":"tbn","description":"French product image title","owner_id":498048120,"created_at":"2026-01-09T17:04:11-05:00","updated_at":"2026-01-09T17:04:11-05:00","owner_resource":"media_image","type":"single_line_text_field","admin_graphql_api_id":"gid://shopify/Metafield/625663657"},{"id":1069229001,"namespace":"translation","key":"title_spanish","value":"botas","description":null,"owner_id":498048120,"created_at":"2026-01-09T19:17:39-05:00","updated_at":"2026-01-09T19:17:39-05:00","owner_resource":"media_image","type":"single_line_text_field","admin_graphql_api_id":"gid://shopify/Metafield/1069229001"}]}Retrieve metafields attached to a Product Variant
curl -X GET "https://your-development-store.myshopify.com/admin/api/unstable/variants/49148385/metafields.json" \ -H "X-Shopify-Access-Token: {access_token}"const client = new shopify.clients.Rest({session}); const data = await client.get({ path: 'variants/49148385/metafields', });session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Rest::Admin.new( session: session ) response = client.get( path: 'variants/49148385/metafields', )const client = new shopify.clients.Rest({session}); const data = await client.get({ path: 'variants/49148385/metafields', });response
HTTP/1.1 200 OK{"metafields":[{"id":1069229013,"namespace":"my_fields","key":"liner_material","value":"synthetic leather","description":null,"owner_id":49148385,"created_at":"2026-01-09T19:33:46-05:00","updated_at":"2026-01-09T19:33:46-05:00","owner_resource":"variant","type":"single_line_text_field","admin_graphql_api_id":"gid://shopify/Metafield/1069229013"}]}Retrieve metafields attached to an Article
curl -X GET "https://your-development-store.myshopify.com/admin/api/unstable/articles/674387490/metafields.json" \ -H "X-Shopify-Access-Token: {access_token}"const client = new shopify.clients.Rest({session}); const data = await client.get({ path: 'articles/674387490/metafields', });session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Rest::Admin.new( session: session ) response = client.get( path: 'articles/674387490/metafields', )const client = new shopify.clients.Rest({session}); const data = await client.get({ path: 'articles/674387490/metafields', });response
HTTP/1.1 200 OK{"metafields":[{"id":1069229005,"namespace":"my_fields","key":"category","value":"outdoors","description":null,"owner_id":674387490,"created_at":"2026-01-09T19:33:21-05:00","updated_at":"2026-01-09T19:33:21-05:00","owner_resource":"article","type":"single_line_text_field","admin_graphql_api_id":"gid://shopify/Metafield/1069229005"}]}Retrieve metafields attached to an Order
curl -X GET "https://your-development-store.myshopify.com/admin/api/unstable/orders/450789469/metafields.json" \ -H "X-Shopify-Access-Token: {access_token}"const client = new shopify.clients.Rest({session}); const data = await client.get({ path: 'orders/450789469/metafields', });session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Rest::Admin.new( session: session ) response = client.get( path: 'orders/450789469/metafields', )const client = new shopify.clients.Rest({session}); const data = await client.get({ path: 'orders/450789469/metafields', });response
HTTP/1.1 200 OK{"metafields":[{"id":915396079,"namespace":"notes","key":"buyer","value":"Notes about this buyer","description":"This field is for buyer notes","owner_id":450789469,"created_at":"2026-01-09T17:04:11-05:00","updated_at":"2026-01-09T17:04:11-05:00","owner_resource":"order","type":"single_line_text_field","admin_graphql_api_id":"gid://shopify/Metafield/915396079"},{"id":1069228993,"namespace":"my_fields","key":"purchase_order","value":"123","description":null,"owner_id":450789469,"created_at":"2026-01-09T19:17:05-05:00","updated_at":"2026-01-09T19:17:05-05:00","owner_resource":"order","type":"single_line_text_field","admin_graphql_api_id":"gid://shopify/Metafield/1069228993"}]}Retrieve metafields attached to the Shop
curl -X GET "https://your-development-store.myshopify.com/admin/api/unstable/metafields.json" \ -H "X-Shopify-Access-Token: {access_token}"const client = new shopify.clients.Rest({session}); const data = await client.get({ path: 'metafields', });session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Rest::Admin.new( session: session ) response = client.get( path: 'metafields', )const client = new shopify.clients.Rest({session}); const data = await client.get({ path: 'metafields', });response
HTTP/1.1 200 OK{"metafields":[{"id":721389482,"namespace":"affiliates","key":"app_key","value":"app_key","description":null,"owner_id":548380009,"created_at":"2026-01-09T17:04:11-05:00","updated_at":"2026-01-09T17:04:11-05:00","owner_resource":"shop","type":"single_line_text_field","admin_graphql_api_id":"gid://shopify/Metafield/721389482"}]}Retrieve metafields attached to the Shop after the specified ID
curl -X GET "https://your-development-store.myshopify.com/admin/api/unstable/metafields.json?since_id=721389482" \ -H "X-Shopify-Access-Token: {access_token}"const client = new shopify.clients.Rest({session}); const data = await client.get({ path: 'metafields', query: {"since_id":"721389482"}, });session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Rest::Admin.new( session: session ) response = client.get( path: 'metafields', query: { "since_id": "721389482" }, )const client = new shopify.clients.Rest({session}); const data = await client.get({ path: 'metafields', query: {"since_id":"721389482"}, });response
HTTP/1.1 200 OK{"metafields":[{"id":1069229000,"namespace":"my_fields","key":"my_items","value":"{\"items\":[\"some item\"]}","description":null,"owner_id":548380009,"created_at":"2026-01-09T19:17:38-05:00","updated_at":"2026-01-09T19:17:38-05:00","owner_resource":"shop","type":"json","admin_graphql_api_id":"gid://shopify/Metafield/1069229000"}]}
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/unstable/blogs/382285388/metafields/534526895. json
Response
examples
Retrieve a single metafield by its ID attached to a Blog
curl -X GET "https://your-development-store.myshopify.com/admin/api/unstable/blogs/382285388/metafields/534526895.json" \ -H "X-Shopify-Access-Token: {access_token}"const client = new shopify.clients.Rest({session}); const data = await client.get({ path: 'blogs/382285388/metafields/534526895', });session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Rest::Admin.new( session: session ) response = client.get( path: 'blogs/382285388/metafields/534526895', )const client = new shopify.clients.Rest({session}); const data = await client.get({ path: 'blogs/382285388/metafields/534526895', });response
HTTP/1.1 200 OK{"metafield":{"id":534526895,"namespace":"translation","key":"title_fr","value":"Le iPod","description":"Blog French title translation","owner_id":241253187,"created_at":"2026-01-09T17:04:11-05:00","updated_at":"2026-01-09T17:04:11-05:00","owner_resource":"blog","type":"single_line_text_field","admin_graphql_api_id":"gid://shopify/Metafield/534526895"}}Retrieve a single metafield by its ID attached to a Collection
curl -X GET "https://your-development-store.myshopify.com/admin/api/unstable/collections/482865238/metafields/1010236510.json" \ -H "X-Shopify-Access-Token: {access_token}"const client = new shopify.clients.Rest({session}); const data = await client.get({ path: 'collections/482865238/metafields/1010236510', });session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Rest::Admin.new( session: session ) response = client.get( path: 'collections/482865238/metafields/1010236510', )const client = new shopify.clients.Rest({session}); const data = await client.get({ path: 'collections/482865238/metafields/1010236510', });response
HTTP/1.1 200 OK{"metafield":{"id":1010236510,"namespace":"global","key":"title_tag","value":"Some seo title value","description":null,"owner_id":482865238,"created_at":"2026-01-09T17:04:11-05:00","updated_at":"2026-01-09T17:04:11-05:00","owner_resource":"collection","type":"single_line_text_field","admin_graphql_api_id":"gid://shopify/Metafield/1010236510"}}Retrieve a single metafield by its ID attached to a Customer
curl -X GET "https://your-development-store.myshopify.com/admin/api/unstable/customers/207119551/metafields/220591908.json" \ -H "X-Shopify-Access-Token: {access_token}"const client = new shopify.clients.Rest({session}); const data = await client.get({ path: 'customers/207119551/metafields/220591908', });session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Rest::Admin.new( session: session ) response = client.get( path: 'customers/207119551/metafields/220591908', )const client = new shopify.clients.Rest({session}); const data = await client.get({ path: 'customers/207119551/metafields/220591908', });response
HTTP/1.1 200 OK{"metafield":{"id":220591908,"namespace":"discounts","key":"returning_customer","value":"no","description":"Customer deserves discount","owner_id":207119551,"created_at":"2026-01-09T17:04:11-05:00","updated_at":"2026-01-09T17:04:11-05:00","owner_resource":"customer","type":"single_line_text_field","admin_graphql_api_id":"gid://shopify/Metafield/220591908"}}Retrieve a single metafield by its ID attached to a Draft Order
curl -X GET "https://your-development-store.myshopify.com/admin/api/unstable/draft_orders/622762746/metafields/106172460.json" \ -H "X-Shopify-Access-Token: {access_token}"const client = new shopify.clients.Rest({session}); const data = await client.get({ path: 'draft_orders/622762746/metafields/106172460', });session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Rest::Admin.new( session: session ) response = client.get( path: 'draft_orders/622762746/metafields/106172460', )const client = new shopify.clients.Rest({session}); const data = await client.get({ path: 'draft_orders/622762746/metafields/106172460', });response
HTTP/1.1 200 OK{"metafield":{"id":106172460,"namespace":"notes","key":"note","value":"B flat","description":"This is for notes","owner_id":622762746,"created_at":"2026-01-09T17:04:11-05:00","updated_at":"2026-01-09T17:04:11-05:00","owner_resource":"draft_order","type":"single_line_text_field","admin_graphql_api_id":"gid://shopify/Metafield/106172460"}}Retrieve a single metafield by its ID attached to a Page
curl -X GET "https://your-development-store.myshopify.com/admin/api/unstable/pages/131092082/metafields/290519330.json" \ -H "X-Shopify-Access-Token: {access_token}"const client = new shopify.clients.Rest({session}); const data = await client.get({ path: 'pages/131092082/metafields/290519330', });session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Rest::Admin.new( session: session ) response = client.get( path: 'pages/131092082/metafields/290519330', )const client = new shopify.clients.Rest({session}); const data = await client.get({ path: 'pages/131092082/metafields/290519330', });response
HTTP/1.1 200 OK{"metafield":{"id":290519330,"namespace":"translation","key":"title_fr","value":"Le TOS","description":"Page French title translation","owner_id":131092082,"created_at":"2026-01-09T17:04:11-05:00","updated_at":"2026-01-09T17:04:11-05:00","owner_resource":"page","type":"single_line_text_field","admin_graphql_api_id":"gid://shopify/Metafield/290519330"}}Retrieve a single metafield by its ID attached to a Product
curl -X GET "https://your-development-store.myshopify.com/admin/api/unstable/products/632910392/metafields/1001077698.json" \ -H "X-Shopify-Access-Token: {access_token}"const client = new shopify.clients.Rest({session}); const data = await client.get({ path: 'products/632910392/metafields/1001077698', });session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Rest::Admin.new( session: session ) response = client.get( path: 'products/632910392/metafields/1001077698', )const client = new shopify.clients.Rest({session}); const data = await client.get({ path: 'products/632910392/metafields/1001077698', });response
HTTP/1.1 200 OK{"metafield":{"id":1001077698,"namespace":"my_fields","key":"best_for","value":"travel","description":null,"owner_id":632910392,"created_at":"2026-01-09T17:04:11-05:00","updated_at":"2026-01-09T17:04:11-05:00","owner_resource":"product","type":"single_line_text_field","admin_graphql_api_id":"gid://shopify/Metafield/1001077698"}}Retrieve a single metafield by its ID attached to a Product Image
curl -X GET "https://your-development-store.myshopify.com/admin/api/unstable/product_images/850703190/metafields/625663657.json" \ -H "X-Shopify-Access-Token: {access_token}"const client = new shopify.clients.Rest({session}); const data = await client.get({ path: 'product_images/850703190/metafields/625663657', });session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Rest::Admin.new( session: session ) response = client.get( path: 'product_images/850703190/metafields/625663657', )const client = new shopify.clients.Rest({session}); const data = await client.get({ path: 'product_images/850703190/metafields/625663657', });response
HTTP/1.1 200 OK{"metafield":{"id":625663657,"namespace":"translation","key":"title_fr","value":"tbn","description":"French product image title","owner_id":498048120,"created_at":"2026-01-09T17:04:11-05:00","updated_at":"2026-01-09T17:04:11-05:00","owner_resource":"media_image","type":"single_line_text_field","admin_graphql_api_id":"gid://shopify/Metafield/625663657"}}Retrieve a single metafield by its ID attached to a Product Variant
curl -X GET "https://your-development-store.myshopify.com/admin/api/unstable/variants/49148385/metafields/323119633.json" \ -H "X-Shopify-Access-Token: {access_token}"const client = new shopify.clients.Rest({session}); const data = await client.get({ path: 'variants/49148385/metafields/323119633', });session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Rest::Admin.new( session: session ) response = client.get( path: 'variants/49148385/metafields/323119633', )const client = new shopify.clients.Rest({session}); const data = await client.get({ path: 'variants/49148385/metafields/323119633', });response
HTTP/1.1 200 OK{"metafield":{"id":323119633,"namespace":"my_fields","key":"color","value":"Pink","description":null,"owner_id":808950810,"created_at":"2026-01-09T17:04:11-05:00","updated_at":"2026-01-09T17:04:11-05:00","owner_resource":"variant","type":"single_line_text_field","admin_graphql_api_id":"gid://shopify/Metafield/323119633"}}Retrieve a single metafield by its ID attached to an Article
curl -X GET "https://your-development-store.myshopify.com/admin/api/unstable/articles/674387490/metafields/838981074.json" \ -H "X-Shopify-Access-Token: {access_token}"const client = new shopify.clients.Rest({session}); const data = await client.get({ path: 'articles/674387490/metafields/838981074', });session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Rest::Admin.new( session: session ) response = client.get( path: 'articles/674387490/metafields/838981074', )const client = new shopify.clients.Rest({session}); const data = await client.get({ path: 'articles/674387490/metafields/838981074', });response
HTTP/1.1 200 OK{"metafield":{"id":838981074,"namespace":"translation","key":"title_fr","value":"Le Article","description":"Article French title translation","owner_id":134645308,"created_at":"2026-01-09T17:04:11-05:00","updated_at":"2026-01-09T17:04:11-05:00","owner_resource":"article","type":"single_line_text_field","admin_graphql_api_id":"gid://shopify/Metafield/838981074"}}Retrieve a single metafield by its ID attached to an Order
curl -X GET "https://your-development-store.myshopify.com/admin/api/unstable/orders/450789469/metafields/915396079.json" \ -H "X-Shopify-Access-Token: {access_token}"const client = new shopify.clients.Rest({session}); const data = await client.get({ path: 'orders/450789469/metafields/915396079', });session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Rest::Admin.new( session: session ) response = client.get( path: 'orders/450789469/metafields/915396079', )const client = new shopify.clients.Rest({session}); const data = await client.get({ path: 'orders/450789469/metafields/915396079', });response
HTTP/1.1 200 OK{"metafield":{"id":915396079,"namespace":"notes","key":"buyer","value":"Notes about this buyer","description":"This field is for buyer notes","owner_id":450789469,"created_at":"2026-01-09T17:04:11-05:00","updated_at":"2026-01-09T17:04:11-05:00","owner_resource":"order","type":"single_line_text_field","admin_graphql_api_id":"gid://shopify/Metafield/915396079"}}Retrieve a single metafield by its ID attached to the Shop resource
curl -X GET "https://your-development-store.myshopify.com/admin/api/unstable/metafields/721389482.json" \ -H "X-Shopify-Access-Token: {access_token}"const client = new shopify.clients.Rest({session}); const data = await client.get({ path: 'metafields/721389482', });session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Rest::Admin.new( session: session ) response = client.get( path: 'metafields/721389482', )const client = new shopify.clients.Rest({session}); const data = await client.get({ path: 'metafields/721389482', });response
HTTP/1.1 200 OK{"metafield":{"id":721389482,"namespace":"affiliates","key":"app_key","value":"app_key","description":null,"owner_id":548380009,"created_at":"2026-01-09T17:04:11-05:00","updated_at":"2026-01-09T17:04:11-05:00","owner_resource":"shop","type":"single_line_text_field","admin_graphql_api_id":"gid://shopify/Metafield/721389482"}}
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/unstable/blogs/382285388/metafields/count. json
Response
examples
Retrieve a count of metafields attached to a Blog
curl -X GET "https://your-development-store.myshopify.com/admin/api/unstable/blogs/382285388/metafields/count.json" \ -H "X-Shopify-Access-Token: {access_token}"const client = new shopify.clients.Rest({session}); const data = await client.get({ path: 'blogs/382285388/metafields/count', });session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Rest::Admin.new( session: session ) response = client.get( path: 'blogs/382285388/metafields/count', )const client = new shopify.clients.Rest({session}); const data = await client.get({ path: 'blogs/382285388/metafields/count', });response
HTTP/1.1 200 OK{"count":0}Retrieve a count of metafields attached to a Collection
curl -X GET "https://your-development-store.myshopify.com/admin/api/unstable/collections/482865238/metafields/count.json" \ -H "X-Shopify-Access-Token: {access_token}"const client = new shopify.clients.Rest({session}); const data = await client.get({ path: 'collections/482865238/metafields/count', });session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Rest::Admin.new( session: session ) response = client.get( path: 'collections/482865238/metafields/count', )const client = new shopify.clients.Rest({session}); const data = await client.get({ path: 'collections/482865238/metafields/count', });response
HTTP/1.1 200 OK{"count":3}Retrieve a count of metafields attached to a Customer
curl -X GET "https://your-development-store.myshopify.com/admin/api/unstable/customers/207119551/metafields/count.json" \ -H "X-Shopify-Access-Token: {access_token}"const client = new shopify.clients.Rest({session}); const data = await client.get({ path: 'customers/207119551/metafields/count', });session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Rest::Admin.new( session: session ) response = client.get( path: 'customers/207119551/metafields/count', )const client = new shopify.clients.Rest({session}); const data = await client.get({ path: 'customers/207119551/metafields/count', });response
HTTP/1.1 200 OK{"count":1}Retrieve a count of metafields attached to a Draft Order
curl -X GET "https://your-development-store.myshopify.com/admin/api/unstable/draft_orders/622762746/metafields/count.json" \ -H "X-Shopify-Access-Token: {access_token}"const client = new shopify.clients.Rest({session}); const data = await client.get({ path: 'draft_orders/622762746/metafields/count', });session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Rest::Admin.new( session: session ) response = client.get( path: 'draft_orders/622762746/metafields/count', )const client = new shopify.clients.Rest({session}); const data = await client.get({ path: 'draft_orders/622762746/metafields/count', });response
HTTP/1.1 200 OK{"count":1}Retrieve a count of metafields attached to a Page
curl -X GET "https://your-development-store.myshopify.com/admin/api/unstable/pages/131092082/metafields/count.json" \ -H "X-Shopify-Access-Token: {access_token}"const client = new shopify.clients.Rest({session}); const data = await client.get({ path: 'pages/131092082/metafields/count', });session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Rest::Admin.new( session: session ) response = client.get( path: 'pages/131092082/metafields/count', )const client = new shopify.clients.Rest({session}); const data = await client.get({ path: 'pages/131092082/metafields/count', });response
HTTP/1.1 200 OK{"count":1}Retrieve a count of metafields attached to a Product
curl -X GET "https://your-development-store.myshopify.com/admin/api/unstable/products/632910392/metafields/count.json" \ -H "X-Shopify-Access-Token: {access_token}"const client = new shopify.clients.Rest({session}); const data = await client.get({ path: 'products/632910392/metafields/count', });session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Rest::Admin.new( session: session ) response = client.get( path: 'products/632910392/metafields/count', )const client = new shopify.clients.Rest({session}); const data = await client.get({ path: 'products/632910392/metafields/count', });response
HTTP/1.1 200 OK{"count":16}Retrieve a count of metafields attached to a Product Image
curl -X GET "https://your-development-store.myshopify.com/admin/api/unstable/product_images/850703190/metafields/count.json" \ -H "X-Shopify-Access-Token: {access_token}"const client = new shopify.clients.Rest({session}); const data = await client.get({ path: 'product_images/850703190/metafields/count', });session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Rest::Admin.new( session: session ) response = client.get( path: 'product_images/850703190/metafields/count', )const client = new shopify.clients.Rest({session}); const data = await client.get({ path: 'product_images/850703190/metafields/count', });response
HTTP/1.1 200 OK{"count":1}Retrieve a count of metafields attached to a Product Variant
curl -X GET "https://your-development-store.myshopify.com/admin/api/unstable/variants/49148385/metafields/count.json" \ -H "X-Shopify-Access-Token: {access_token}"const client = new shopify.clients.Rest({session}); const data = await client.get({ path: 'variants/49148385/metafields/count', });session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Rest::Admin.new( session: session ) response = client.get( path: 'variants/49148385/metafields/count', )const client = new shopify.clients.Rest({session}); const data = await client.get({ path: 'variants/49148385/metafields/count', });response
HTTP/1.1 200 OK{"count":0}Retrieve a count of metafields attached to an Article
curl -X GET "https://your-development-store.myshopify.com/admin/api/unstable/articles/674387490/metafields/count.json" \ -H "X-Shopify-Access-Token: {access_token}"const client = new shopify.clients.Rest({session}); const data = await client.get({ path: 'articles/674387490/metafields/count', });session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Rest::Admin.new( session: session ) response = client.get( path: 'articles/674387490/metafields/count', )const client = new shopify.clients.Rest({session}); const data = await client.get({ path: 'articles/674387490/metafields/count', });response
HTTP/1.1 200 OK{"count":0}Retrieve a count of metafields attached to an Order
curl -X GET "https://your-development-store.myshopify.com/admin/api/unstable/orders/450789469/metafields/count.json" \ -H "X-Shopify-Access-Token: {access_token}"const client = new shopify.clients.Rest({session}); const data = await client.get({ path: 'orders/450789469/metafields/count', });session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Rest::Admin.new( session: session ) response = client.get( path: 'orders/450789469/metafields/count', )const client = new shopify.clients.Rest({session}); const data = await client.get({ path: 'orders/450789469/metafields/count', });response
HTTP/1.1 200 OK{"count":1}Retrieve a count of metafields attached to the Shop resource
curl -X GET "https://your-development-store.myshopify.com/admin/api/unstable/metafields/count.json" \ -H "X-Shopify-Access-Token: {access_token}"const client = new shopify.clients.Rest({session}); const data = await client.get({ path: 'metafields/count', });session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Rest::Admin.new( session: session ) response = client.get( path: 'metafields/count', )const client = new shopify.clients.Rest({session}); const data = await client.get({ path: 'metafields/count', });response
HTTP/1.1 200 OK{"count":1}
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
Update a metafield for a Collection
Update a metafield for a Collection
Update a metafield for a Customer
Update a metafield for a Customer
Update a metafield for a Draft Order
Update a metafield for a Draft Order
Update a metafield for a Page
Update a metafield for a Page
Update a metafield for a Product
Update a metafield for a Product
Update a metafield for a Product Image
Update a metafield for a Product Image
Update a metafield for a Product Variant
Update a metafield for a Product Variant
Update a metafield for a Shop resource
Update a metafield for a Shop resource
Update a metafield for an Article
Update a metafield for an Article
Update a metafield for an Order
Update a metafield for an Order
/admin/api/unstable/blogs/382285388/metafields/534526895. json
Response
examples
Update a metafield for a Blog
curl -d '{"metafield":{"id":534526895,"value":"a translated blog title","type":"single_line_text_field"}}' \ -X PUT "https://your-development-store.myshopify.com/admin/api/unstable/blogs/382285388/metafields/534526895.json" \ -H "X-Shopify-Access-Token: {access_token}" \ -H "Content-Type: application/json"import { DataType } from '@shopify/shopify-api'; const client = new shopify.clients.Rest({session}); const data = await client.put({ path: 'blogs/382285388/metafields/534526895', data: {"metafield":{"id":534526895,"value":"a translated blog title","type":"single_line_text_field"}}, type: DataType.JSON, });session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Rest::Admin.new( session: session ) response = client.put( path: 'blogs/382285388/metafields/534526895', body: { "metafield": { "id": 534526895, "value": "a translated blog title", "type": "single_line_text_field" } }, )import { DataType } from '@shopify/shopify-api'; const client = new shopify.clients.Rest({session}); const data = await client.put({ path: 'blogs/382285388/metafields/534526895', data: {"metafield":{"id":534526895,"value":"a translated blog title","type":"single_line_text_field"}}, type: DataType.JSON, });response
HTTP/1.1 200 OK{"metafield":{"value":"a translated blog title","owner_id":241253187,"description":"Blog French title translation","namespace":"translation","key":"title_fr","id":534526895,"created_at":"2026-01-09T17:04:11-05:00","updated_at":"2026-01-09T19:32:57-05:00","owner_resource":"blog","type":"single_line_text_field","admin_graphql_api_id":"gid://shopify/Metafield/534526895"}}Update a metafield for a Collection
curl -d '{"metafield":{"id":1010236510,"value":"seo title","type":"single_line_text_field"}}' \ -X PUT "https://your-development-store.myshopify.com/admin/api/unstable/collections/482865238/metafields/1010236510.json" \ -H "X-Shopify-Access-Token: {access_token}" \ -H "Content-Type: application/json"import { DataType } from '@shopify/shopify-api'; const client = new shopify.clients.Rest({session}); const data = await client.put({ path: 'collections/482865238/metafields/1010236510', data: {"metafield":{"id":1010236510,"value":"seo title","type":"single_line_text_field"}}, type: DataType.JSON, });session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Rest::Admin.new( session: session ) response = client.put( path: 'collections/482865238/metafields/1010236510', body: { "metafield": { "id": 1010236510, "value": "seo title", "type": "single_line_text_field" } }, )import { DataType } from '@shopify/shopify-api'; const client = new shopify.clients.Rest({session}); const data = await client.put({ path: 'collections/482865238/metafields/1010236510', data: {"metafield":{"id":1010236510,"value":"seo title","type":"single_line_text_field"}}, type: DataType.JSON, });response
HTTP/1.1 200 OK{"metafield":{"value":"seo title","owner_id":482865238,"description":null,"namespace":"global","key":"title_tag","id":1010236510,"created_at":"2026-01-09T17:04:11-05:00","updated_at":"2026-01-09T19:32:59-05:00","owner_resource":"collection","type":"single_line_text_field","admin_graphql_api_id":"gid://shopify/Metafield/1010236510"}}Update a metafield for a Customer
curl -d '{"metafield":{"id":220591908,"value":"yes","type":"single_line_text_field"}}' \ -X PUT "https://your-development-store.myshopify.com/admin/api/unstable/customers/207119551/metafields/220591908.json" \ -H "X-Shopify-Access-Token: {access_token}" \ -H "Content-Type: application/json"import { DataType } from '@shopify/shopify-api'; const client = new shopify.clients.Rest({session}); const data = await client.put({ path: 'customers/207119551/metafields/220591908', data: {"metafield":{"id":220591908,"value":"yes","type":"single_line_text_field"}}, type: DataType.JSON, });session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Rest::Admin.new( session: session ) response = client.put( path: 'customers/207119551/metafields/220591908', body: { "metafield": { "id": 220591908, "value": "yes", "type": "single_line_text_field" } }, )import { DataType } from '@shopify/shopify-api'; const client = new shopify.clients.Rest({session}); const data = await client.put({ path: 'customers/207119551/metafields/220591908', data: {"metafield":{"id":220591908,"value":"yes","type":"single_line_text_field"}}, type: DataType.JSON, });response
HTTP/1.1 200 OK{"metafield":{"value":"yes","owner_id":207119551,"description":"Customer deserves discount","namespace":"discounts","key":"returning_customer","id":220591908,"created_at":"2026-01-09T17:04:11-05:00","updated_at":"2026-01-09T19:33:29-05:00","owner_resource":"customer","type":"single_line_text_field","admin_graphql_api_id":"gid://shopify/Metafield/220591908"}}Update a metafield for a Draft Order
curl -d '{"metafield":{"id":106172460,"value":"110000","type":"single_line_text_field"}}' \ -X PUT "https://your-development-store.myshopify.com/admin/api/unstable/draft_orders/622762746/metafields/106172460.json" \ -H "X-Shopify-Access-Token: {access_token}" \ -H "Content-Type: application/json"import { DataType } from '@shopify/shopify-api'; const client = new shopify.clients.Rest({session}); const data = await client.put({ path: 'draft_orders/622762746/metafields/106172460', data: {"metafield":{"id":106172460,"value":"110000","type":"single_line_text_field"}}, type: DataType.JSON, });session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Rest::Admin.new( session: session ) response = client.put( path: 'draft_orders/622762746/metafields/106172460', body: { "metafield": { "id": 106172460, "value": "110000", "type": "single_line_text_field" } }, )import { DataType } from '@shopify/shopify-api'; const client = new shopify.clients.Rest({session}); const data = await client.put({ path: 'draft_orders/622762746/metafields/106172460', data: {"metafield":{"id":106172460,"value":"110000","type":"single_line_text_field"}}, type: DataType.JSON, });response
HTTP/1.1 200 OK{"metafield":{"value":"110000","owner_id":622762746,"description":"This is for notes","namespace":"notes","key":"note","id":106172460,"created_at":"2026-01-09T17:04:11-05:00","updated_at":"2026-01-09T19:33:26-05:00","owner_resource":"draft_order","type":"single_line_text_field","admin_graphql_api_id":"gid://shopify/Metafield/106172460"}}Update a metafield for a Page
curl -d '{"metafield":{"id":290519330,"value":"An updated translation","type":"single_line_text_field"}}' \ -X PUT "https://your-development-store.myshopify.com/admin/api/unstable/pages/131092082/metafields/290519330.json" \ -H "X-Shopify-Access-Token: {access_token}" \ -H "Content-Type: application/json"import { DataType } from '@shopify/shopify-api'; const client = new shopify.clients.Rest({session}); const data = await client.put({ path: 'pages/131092082/metafields/290519330', data: {"metafield":{"id":290519330,"value":"An updated translation","type":"single_line_text_field"}}, type: DataType.JSON, });session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Rest::Admin.new( session: session ) response = client.put( path: 'pages/131092082/metafields/290519330', body: { "metafield": { "id": 290519330, "value": "An updated translation", "type": "single_line_text_field" } }, )import { DataType } from '@shopify/shopify-api'; const client = new shopify.clients.Rest({session}); const data = await client.put({ path: 'pages/131092082/metafields/290519330', data: {"metafield":{"id":290519330,"value":"An updated translation","type":"single_line_text_field"}}, type: DataType.JSON, });response
HTTP/1.1 200 OK{"metafield":{"value":"An updated translation","owner_id":131092082,"description":"Page French title translation","namespace":"translation","key":"title_fr","id":290519330,"created_at":"2026-01-09T17:04:11-05:00","updated_at":"2026-01-09T19:17:16-05:00","owner_resource":"page","type":"single_line_text_field","admin_graphql_api_id":"gid://shopify/Metafield/290519330"}}Update a metafield for a Product
curl -d '{"metafield":{"id":1001077698,"value":"having fun","type":"single_line_text_field"}}' \ -X PUT "https://your-development-store.myshopify.com/admin/api/unstable/products/632910392/metafields/1001077698.json" \ -H "X-Shopify-Access-Token: {access_token}" \ -H "Content-Type: application/json"import { DataType } from '@shopify/shopify-api'; const client = new shopify.clients.Rest({session}); const data = await client.put({ path: 'products/632910392/metafields/1001077698', data: {"metafield":{"id":1001077698,"value":"having fun","type":"single_line_text_field"}}, type: DataType.JSON, });session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Rest::Admin.new( session: session ) response = client.put( path: 'products/632910392/metafields/1001077698', body: { "metafield": { "id": 1001077698, "value": "having fun", "type": "single_line_text_field" } }, )import { DataType } from '@shopify/shopify-api'; const client = new shopify.clients.Rest({session}); const data = await client.put({ path: 'products/632910392/metafields/1001077698', data: {"metafield":{"id":1001077698,"value":"having fun","type":"single_line_text_field"}}, type: DataType.JSON, });response
HTTP/1.1 200 OK{"metafield":{"value":"having fun","owner_id":632910392,"description":null,"namespace":"my_fields","key":"best_for","id":1001077698,"created_at":"2026-01-09T17:04:11-05:00","updated_at":"2026-01-09T19:17:21-05:00","owner_resource":"product","type":"single_line_text_field","admin_graphql_api_id":"gid://shopify/Metafield/1001077698"}}Update a metafield for a Product Image
curl -d '{"metafield":{"id":625663657,"value":"translated description","type":"single_line_text_field"}}' \ -X PUT "https://your-development-store.myshopify.com/admin/api/unstable/product_images/850703190/metafields/625663657.json" \ -H "X-Shopify-Access-Token: {access_token}" \ -H "Content-Type: application/json"import { DataType } from '@shopify/shopify-api'; const client = new shopify.clients.Rest({session}); const data = await client.put({ path: 'product_images/850703190/metafields/625663657', data: {"metafield":{"id":625663657,"value":"translated description","type":"single_line_text_field"}}, type: DataType.JSON, });session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Rest::Admin.new( session: session ) response = client.put( path: 'product_images/850703190/metafields/625663657', body: { "metafield": { "id": 625663657, "value": "translated description", "type": "single_line_text_field" } }, )import { DataType } from '@shopify/shopify-api'; const client = new shopify.clients.Rest({session}); const data = await client.put({ path: 'product_images/850703190/metafields/625663657', data: {"metafield":{"id":625663657,"value":"translated description","type":"single_line_text_field"}}, type: DataType.JSON, });response
HTTP/1.1 200 OK{"metafield":{"value":"translated description","owner_id":498048120,"description":"French product image title","namespace":"translation","key":"title_fr","id":625663657,"created_at":"2026-01-09T17:04:11-05:00","updated_at":"2026-01-09T19:33:34-05:00","owner_resource":"media_image","type":"single_line_text_field","admin_graphql_api_id":"gid://shopify/Metafield/625663657"}}Update a metafield for a Product Variant
curl -d '{"metafield":{"id":323119633,"value":"Red","type":"single_line_text_field"}}' \ -X PUT "https://your-development-store.myshopify.com/admin/api/unstable/variants/49148385/metafields/323119633.json" \ -H "X-Shopify-Access-Token: {access_token}" \ -H "Content-Type: application/json"import { DataType } from '@shopify/shopify-api'; const client = new shopify.clients.Rest({session}); const data = await client.put({ path: 'variants/49148385/metafields/323119633', data: {"metafield":{"id":323119633,"value":"Red","type":"single_line_text_field"}}, type: DataType.JSON, });session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Rest::Admin.new( session: session ) response = client.put( path: 'variants/49148385/metafields/323119633', body: { "metafield": { "id": 323119633, "value": "Red", "type": "single_line_text_field" } }, )import { DataType } from '@shopify/shopify-api'; const client = new shopify.clients.Rest({session}); const data = await client.put({ path: 'variants/49148385/metafields/323119633', data: {"metafield":{"id":323119633,"value":"Red","type":"single_line_text_field"}}, type: DataType.JSON, });response
HTTP/1.1 200 OK{"metafield":{"value":"Red","owner_id":808950810,"description":null,"namespace":"my_fields","key":"color","id":323119633,"created_at":"2026-01-09T17:04:11-05:00","updated_at":"2026-01-09T19:17:13-05:00","owner_resource":"variant","type":"single_line_text_field","admin_graphql_api_id":"gid://shopify/Metafield/323119633"}}Update a metafield for a Shop resource
curl -d '{"metafield":{"id":721389482,"value":"[\"something new\"]","type":"list.single_line_text_field"}}' \ -X PUT "https://your-development-store.myshopify.com/admin/api/unstable/metafields/721389482.json" \ -H "X-Shopify-Access-Token: {access_token}" \ -H "Content-Type: application/json"import { DataType } from '@shopify/shopify-api'; const client = new shopify.clients.Rest({session}); const data = await client.put({ path: 'metafields/721389482', data: {"metafield":{"id":721389482,"value":"[\"something new\"]","type":"list.single_line_text_field"}}, type: DataType.JSON, });session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Rest::Admin.new( session: session ) response = client.put( path: 'metafields/721389482', body: { "metafield": { "id": 721389482, "value": "["something new"]", "type": "list.single_line_text_field" } }, )import { DataType } from '@shopify/shopify-api'; const client = new shopify.clients.Rest({session}); const data = await client.put({ path: 'metafields/721389482', data: {"metafield":{"id":721389482,"value":"[\"something new\"]","type":"list.single_line_text_field"}}, type: DataType.JSON, });response
HTTP/1.1 200 OK{"metafield":{"value":"[\"something new\"]","owner_id":548380009,"description":null,"namespace":"affiliates","key":"app_key","id":721389482,"created_at":"2026-01-09T17:04:11-05:00","updated_at":"2026-01-09T19:33:12-05:00","owner_resource":"shop","type":"list.single_line_text_field","admin_graphql_api_id":"gid://shopify/Metafield/721389482"}}Update a metafield for an Article
curl -d '{"metafield":{"id":838981074,"value":"a translated title","type":"single_line_text_field"}}' \ -X PUT "https://your-development-store.myshopify.com/admin/api/unstable/articles/674387490/metafields/838981074.json" \ -H "X-Shopify-Access-Token: {access_token}" \ -H "Content-Type: application/json"import { DataType } from '@shopify/shopify-api'; const client = new shopify.clients.Rest({session}); const data = await client.put({ path: 'articles/674387490/metafields/838981074', data: {"metafield":{"id":838981074,"value":"a translated title","type":"single_line_text_field"}}, type: DataType.JSON, });session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Rest::Admin.new( session: session ) response = client.put( path: 'articles/674387490/metafields/838981074', body: { "metafield": { "id": 838981074, "value": "a translated title", "type": "single_line_text_field" } }, )import { DataType } from '@shopify/shopify-api'; const client = new shopify.clients.Rest({session}); const data = await client.put({ path: 'articles/674387490/metafields/838981074', data: {"metafield":{"id":838981074,"value":"a translated title","type":"single_line_text_field"}}, type: DataType.JSON, });response
HTTP/1.1 200 OK{"metafield":{"value":"a translated title","owner_id":134645308,"description":"Article French title translation","namespace":"translation","key":"title_fr","id":838981074,"created_at":"2026-01-09T17:04:11-05:00","updated_at":"2026-01-09T19:17:18-05:00","owner_resource":"article","type":"single_line_text_field","admin_graphql_api_id":"gid://shopify/Metafield/838981074"}}Update a metafield for an Order
curl -d '{"metafield":{"id":915396079,"value":"Provided a discount code","type":"single_line_text_field"}}' \ -X PUT "https://your-development-store.myshopify.com/admin/api/unstable/orders/450789469/metafields/915396079.json" \ -H "X-Shopify-Access-Token: {access_token}" \ -H "Content-Type: application/json"import { DataType } from '@shopify/shopify-api'; const client = new shopify.clients.Rest({session}); const data = await client.put({ path: 'orders/450789469/metafields/915396079', data: {"metafield":{"id":915396079,"value":"Provided a discount code","type":"single_line_text_field"}}, type: DataType.JSON, });session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Rest::Admin.new( session: session ) response = client.put( path: 'orders/450789469/metafields/915396079', body: { "metafield": { "id": 915396079, "value": "Provided a discount code", "type": "single_line_text_field" } }, )import { DataType } from '@shopify/shopify-api'; const client = new shopify.clients.Rest({session}); const data = await client.put({ path: 'orders/450789469/metafields/915396079', data: {"metafield":{"id":915396079,"value":"Provided a discount code","type":"single_line_text_field"}}, type: DataType.JSON, });response
HTTP/1.1 200 OK{"metafield":{"value":"Provided a discount code","owner_id":450789469,"description":"This field is for buyer notes","namespace":"notes","key":"buyer","id":915396079,"created_at":"2026-01-09T17:04:11-05:00","updated_at":"2026-01-09T19:17:30-05:00","owner_resource":"order","type":"single_line_text_field","admin_graphql_api_id":"gid://shopify/Metafield/915396079"}}
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
/admin/api/unstable/blogs/382285388/metafields/534526895. json
Response
examples
Delete a metafield by its ID for a Blog
curl -X DELETE "https://your-development-store.myshopify.com/admin/api/unstable/blogs/382285388/metafields/534526895.json" \ -H "X-Shopify-Access-Token: {access_token}"const client = new shopify.clients.Rest({session}); const data = await client.delete({ path: 'blogs/382285388/metafields/534526895', });session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Rest::Admin.new( session: session ) response = client.delete( path: 'blogs/382285388/metafields/534526895', )const client = new shopify.clients.Rest({session}); const data = await client.delete({ path: 'blogs/382285388/metafields/534526895', });response
HTTP/1.1 200 OK{}Delete a metafield by its ID for a Collection
curl -X DELETE "https://your-development-store.myshopify.com/admin/api/unstable/collections/482865238/metafields/1010236510.json" \ -H "X-Shopify-Access-Token: {access_token}"const client = new shopify.clients.Rest({session}); const data = await client.delete({ path: 'collections/482865238/metafields/1010236510', });session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Rest::Admin.new( session: session ) response = client.delete( path: 'collections/482865238/metafields/1010236510', )const client = new shopify.clients.Rest({session}); const data = await client.delete({ path: 'collections/482865238/metafields/1010236510', });response
HTTP/1.1 200 OK{}Delete a metafield by its ID for a Customer
curl -X DELETE "https://your-development-store.myshopify.com/admin/api/unstable/customers/207119551/metafields/220591908.json" \ -H "X-Shopify-Access-Token: {access_token}"const client = new shopify.clients.Rest({session}); const data = await client.delete({ path: 'customers/207119551/metafields/220591908', });session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Rest::Admin.new( session: session ) response = client.delete( path: 'customers/207119551/metafields/220591908', )const client = new shopify.clients.Rest({session}); const data = await client.delete({ path: 'customers/207119551/metafields/220591908', });response
HTTP/1.1 200 OK{}Delete a metafield by its ID for a Draft Order
curl -X DELETE "https://your-development-store.myshopify.com/admin/api/unstable/draft_orders/622762746/metafields/106172460.json" \ -H "X-Shopify-Access-Token: {access_token}"const client = new shopify.clients.Rest({session}); const data = await client.delete({ path: 'draft_orders/622762746/metafields/106172460', });session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Rest::Admin.new( session: session ) response = client.delete( path: 'draft_orders/622762746/metafields/106172460', )const client = new shopify.clients.Rest({session}); const data = await client.delete({ path: 'draft_orders/622762746/metafields/106172460', });response
HTTP/1.1 200 OK{}Delete a metafield by its ID for a Page
curl -X DELETE "https://your-development-store.myshopify.com/admin/api/unstable/pages/131092082/metafields/290519330.json" \ -H "X-Shopify-Access-Token: {access_token}"const client = new shopify.clients.Rest({session}); const data = await client.delete({ path: 'pages/131092082/metafields/290519330', });session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Rest::Admin.new( session: session ) response = client.delete( path: 'pages/131092082/metafields/290519330', )const client = new shopify.clients.Rest({session}); const data = await client.delete({ path: 'pages/131092082/metafields/290519330', });response
HTTP/1.1 200 OK{}Delete a metafield by its ID for a Product
curl -X DELETE "https://your-development-store.myshopify.com/admin/api/unstable/products/632910392/metafields/1001077698.json" \ -H "X-Shopify-Access-Token: {access_token}"const client = new shopify.clients.Rest({session}); const data = await client.delete({ path: 'products/632910392/metafields/1001077698', });session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Rest::Admin.new( session: session ) response = client.delete( path: 'products/632910392/metafields/1001077698', )const client = new shopify.clients.Rest({session}); const data = await client.delete({ path: 'products/632910392/metafields/1001077698', });response
HTTP/1.1 200 OK{}Delete a metafield by its ID for a Product Image
curl -X DELETE "https://your-development-store.myshopify.com/admin/api/unstable/product_images/850703190/metafields/625663657.json" \ -H "X-Shopify-Access-Token: {access_token}"const client = new shopify.clients.Rest({session}); const data = await client.delete({ path: 'product_images/850703190/metafields/625663657', });session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Rest::Admin.new( session: session ) response = client.delete( path: 'product_images/850703190/metafields/625663657', )const client = new shopify.clients.Rest({session}); const data = await client.delete({ path: 'product_images/850703190/metafields/625663657', });response
HTTP/1.1 200 OK{}Delete a metafield by its ID for a Product Variant
curl -X DELETE "https://your-development-store.myshopify.com/admin/api/unstable/variants/49148385/metafields/323119633.json" \ -H "X-Shopify-Access-Token: {access_token}"const client = new shopify.clients.Rest({session}); const data = await client.delete({ path: 'variants/49148385/metafields/323119633', });session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Rest::Admin.new( session: session ) response = client.delete( path: 'variants/49148385/metafields/323119633', )const client = new shopify.clients.Rest({session}); const data = await client.delete({ path: 'variants/49148385/metafields/323119633', });response
HTTP/1.1 200 OK{}Delete a metafield by its ID for an Article
curl -X DELETE "https://your-development-store.myshopify.com/admin/api/unstable/articles/674387490/metafields/838981074.json" \ -H "X-Shopify-Access-Token: {access_token}"const client = new shopify.clients.Rest({session}); const data = await client.delete({ path: 'articles/674387490/metafields/838981074', });session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Rest::Admin.new( session: session ) response = client.delete( path: 'articles/674387490/metafields/838981074', )const client = new shopify.clients.Rest({session}); const data = await client.delete({ path: 'articles/674387490/metafields/838981074', });response
HTTP/1.1 200 OK{}Delete a metafield by its ID for an Order
curl -X DELETE "https://your-development-store.myshopify.com/admin/api/unstable/orders/450789469/metafields/915396079.json" \ -H "X-Shopify-Access-Token: {access_token}"const client = new shopify.clients.Rest({session}); const data = await client.delete({ path: 'orders/450789469/metafields/915396079', });session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Rest::Admin.new( session: session ) response = client.delete( path: 'orders/450789469/metafields/915396079', )const client = new shopify.clients.Rest({session}); const data = await client.delete({ path: 'orders/450789469/metafields/915396079', });response
HTTP/1.1 200 OK{}Delete a metafield by its ID for the Shop resource
curl -X DELETE "https://your-development-store.myshopify.com/admin/api/unstable/metafields/721389482.json" \ -H "X-Shopify-Access-Token: {access_token}"const client = new shopify.clients.Rest({session}); const data = await client.delete({ path: 'metafields/721389482', });session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Rest::Admin.new( session: session ) response = client.delete( path: 'metafields/721389482', )const client = new shopify.clients.Rest({session}); const data = await client.delete({ path: 'metafields/721389482', });response
HTTP/1.1 200 OK{}