Get a metaobject entry
const url = 'https://apibase.ecomweb.app/api/v1/public/stores/example/metaobjects/example/example';const options = {method: 'GET', headers: {'x-storefront-api-key': '<x-storefront-api-key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://apibase.ecomweb.app/api/v1/public/stores/example/metaobjects/example/example \ --header 'x-storefront-api-key: <x-storefront-api-key>'Returns one active entry by its handle, with reference fields resolved to the referenced resource’s public data. A type that does not exist or is hidden, and an entry that does not exist or is a draft, answer 404. With a signed-in customer’s token, types the merchant opened to customers are readable too.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The metaobject type handle.
The entry’s handle.
The store’s ref, as returned by GET /stores.
Responses
Section titled “Responses”object
The field values, keyed by field key. Reference fields are resolved to the referenced resource’s public data.
object
object
The metafield’s type, such as single_line_text_field or list.number_integer.
The type handle of the entry’s definition.
The entry’s handle, unique within its type.
The text that names the entry: the display-name field’s value, or the handle.
When the entry was last updated, as an ISO 8601 timestamp.
Example generated
{ "fields": { "additionalProperty": { "value": {}, "type": "example" } }, "type": "example", "handle": "example", "display_name": "example", "updated_at": "example"}The key is missing, invalid, revoked or expired.
object
The HTTP status code.
What went wrong; validation failures list one message per problem.
The HTTP status text, such as Bad Request.
object
A stable, machine-readable error code.
A human-readable explanation.
Extra context about the error, when there is any.
object
When the error happened, as an ISO 8601 timestamp.
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.
object
The HTTP status code.
What went wrong; validation failures list one message per problem.
The HTTP status text, such as Bad Request.
object
A stable, machine-readable error code.
A human-readable explanation.
Extra context about the error, when there is any.
object
When the error happened, as an ISO 8601 timestamp.
Example generated
{ "statusCode": 1, "message": [ "example" ], "error": "example"}The resource does not exist in this store.
object
The HTTP status code.
What went wrong; validation failures list one message per problem.
The HTTP status text, such as Bad Request.
object
A stable, machine-readable error code.
A human-readable explanation.
Extra context about the error, when there is any.
object
When the error happened, as an ISO 8601 timestamp.
Example generated
{ "statusCode": 1, "message": [ "example" ], "error": "example"}