Skip to main content
GET
List Metafields

List Metafields

Returns metafields written by your app (scoped by appId). Filter by owner type, owner id, namespace, or key.
This endpoint returns only the metafields your app has written. To list all metafields on a resource (including those written by other apps or merchants), the merchant must use the Admin API (GET /metafields?ownerType=...&ownerId=...).

Request

Required scope

read_metafields

Query parameters

ownerType
string
Filter by owner type. One of shop, product, variant, collection, customer, order, page, blog, article. Lowercase only.
ownerId
string
Filter by the owning resource id. Required for every owner type except shop.
namespace
string
Filter by namespace.
key
string
Filter by exact key.
page
integer
default:"1"
1-indexed page number.
limit
integer
default:"50"
Items per page. Max 250.

Response

status
integer
HTTP status code (200 on success).
state
string
success or error.
data.metafields
array
Array of metafield objects.
data.total
integer
Total matching records.
data.page
integer
Current page.
data.limit
integer
Page size.

Example response

Error codes

CodeDescription
UNAUTHORIZEDInvalid or missing access token
FORBIDDENApp doesn’t have read_metafields scope
VALIDATION_ERRORInvalid ownerType value