Skip to content

List metaobject entries

GET
/public/stores/{storeRef}/metaobjects/{type}
curl --request GET \
--url https://apibase.ecomweb.app/api/v1/public/stores/example/metaobjects/example \
--header 'x-storefront-api-key: <x-storefront-api-key>'

Returns a page of the active entries of a metaobject type, in ascending ID order. Only types the merchant made visible to the storefront are readable; a type that does not exist or is hidden answers 404. With a signed-in customer’s token, types the merchant opened to customers are readable too. Page with cursor and limit (20 by default, at most 50), and narrow with filter[key]=value on the type’s filter keys.

type
required
string

The metaobject type handle.

storeRef
required
string

The store’s ref, as returned by GET /stores.

cursor
string
<= 512 characters

The next_cursor of the previous page; omit for the first page.

limit
number
>= 1 <= 50

Number of entries per page, 20 by default and at most 50.

Media typeapplication/json
object
items
required

The entries on this page, in ascending ID order.

Array<object>
object
fields
required

The field values, keyed by field key. Reference fields are resolved to the referenced resource’s public data.

object
key
additional properties
object
value
required

The value in the form its type defines. A reference type resolves to the referenced resource’s public data.

nullable
One of:
string
type
required

The metafield’s type, such as single_line_text_field or list.number_integer.

string
type
required

The type handle of the entry’s definition.

string
handle
required

The entry’s handle, unique within its type.

string
display_name
required

The text that names the entry: the display-name field’s value, or the handle.

string
updated_at
required

When the entry was last updated, as an ISO 8601 timestamp.

string
next_cursor
required

Pass as the cursor query parameter to get the next page, or null on the last page.

string
nullable

Example generated

{
"items": [
{
"fields": {
"additionalProperty": {
"value": {},
"type": "example"
}
},
"type": "example",
"handle": "example",
"display_name": "example",
"updated_at": "example"
}
],
"next_cursor": "example"
}

The request is malformed or failed validation.

Media typeapplication/json
One of:
object
statusCode
required

The HTTP status code.

number
message
required

What went wrong; validation failures list one message per problem.

One of:
string
error

The HTTP status text, such as Bad Request.

string

Example generated

{
"statusCode": 1,
"message": [
"example"
],
"error": "example"
}

The key is missing, invalid, revoked or expired.

Media typeapplication/json
One of:
object
statusCode
required

The HTTP status code.

number
message
required

What went wrong; validation failures list one message per problem.

One of:
string
error

The HTTP status text, such as Bad Request.

string

Example generated

{
"statusCode": 1,
"message": [
"example"
],
"error": "example"
}

The key may not do this: a missing scope, a readonly key, a publishable key on a Store API route, or a disallowed origin.

Media typeapplication/json
One of:
object
statusCode
required

The HTTP status code.

number
message
required

What went wrong; validation failures list one message per problem.

One of:
string
error

The HTTP status text, such as Bad Request.

string

Example generated

{
"statusCode": 1,
"message": [
"example"
],
"error": "example"
}

The resource does not exist in this store.

Media typeapplication/json
One of:
object
statusCode
required

The HTTP status code.

number
message
required

What went wrong; validation failures list one message per problem.

One of:
string
error

The HTTP status text, such as Bad Request.

string

Example generated

{
"statusCode": 1,
"message": [
"example"
],
"error": "example"
}