Get Metafield List

Retrieve a list of metafields for a specific resource

The Get Metafields List API allows developers to retrieves a paginated list of metafields associated with a specific resource in your store.

This API is particularly useful for:

  1. Managing custom metadata for various store resources
  2. Building integrations with external systems
  3. Creating advanced filtering and categorization systems

Request Parameters

Public Request Parameters

📘

Path Parameters

Parameter

Type

Required

Description

Example

owner_resource

string

Yes

Type of resource the metafield belongs to. Valid values:
shop, product, product_image, product_variant,
order, page, customer, collection, blog, article

"product"

owner_id

string

Yes

Unique identifier of the resource

"prod_123"

Query Parameters

Parameter

Type

Required

Description

Example

namespace

string

No

Filters metafields by their namespace

"custom"

key

string

No

Filters metafields by exact key match

"material"

type

string

No

Filters by metafield data type. Valid values:
date, date_time, weight, volume, dimension,
integer, number_decimal, file_reference,
single_line_text_field, json, multi_line_text_field,
color, rating, url, boolean

"color"

page_size

string

No

Number of items per page

"50"

cursor

string

No

Pagination cursor

"abc123"

created_at_min

string

No

Filter metafields created after this timestamp (ISO-8601)

"2023-01-01T00:00:00Z"

created_at_max

string

No

Filter metafields created before this timestamp (ISO-8601)

"2023-12-31T23:59:59Z"

updated_at_min

string

No

Filter metafields updated after this timestamp (ISO-8601)

"2023-06-01T00:00:00Z"

updated_at_max

string

No

Filter metafields updated before this timestamp (ISO-8601)

"2023-06-30T23:59:59Z"

definition_ids

array of string

No

Filter by metafield definition IDs

["def_123","def_456"]

Response Explanation

Public Response Parameters

📘

Successful Response

FieldTypeExampleDescription
codestring"success"code indicating request status.
messagestringDescriptive message about the response.
data.metafieldsarrayList of metafield objects.
data.metafields[].idstring"mf_001"Unique ID of the metafield.
data.metafields[].store_idinteger12345ID of the store that owns the metafield.
data.metafields[].owner_resourcestring"product"Resource type that owns the metafield (e.g., "product").
data.metafields[].owner_idstring"prod_001"ID of the owner resource.
data.metafields[].namespacestring"global"Namespace of the metafield.
data.metafields[].keystring"color"Key of the metafield.
data.metafields[].typestring"string"Type of the metafield ("json" or "string").
data.metafields[].descriptionstring"Product color"Description of the metafield.
data.metafields[].definition_idstring"df_001"ID of the metafield definition.
data.metafields[].created_atstring"2023-01-15T10:00:00Z"Timestamp when the metafield was created (ISO 8601 format).
data.metafields[].updated_atstring"2023-06-20T14:30:00Z"Timestamp when the metafield was last updated (ISO 8601 format).
data.cursorstring"eyJpZCI6IjEwMDAiLCJ..."Cursor for pagination (use for fetching next page).
data.has_morebooleantrueIndicates if more results are available (true if there are more results).

Error Response

FieldTypeExampleDescription
codestringInvalidParameterError http message
messagestring``Error message

API Structure Overview

Language
Credentials
Header
URL
Click Try It! to start a request and see the response here!