Get a metaobject entry
const url = 'https://apibase.ecomweb.app/api/v1/stores/example/metaobjects/example/entries/example';const options = {method: 'GET', headers: {'x-api-key': '<x-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/stores/example/metaobjects/example/entries/example \ --header 'x-api-key: <x-api-key>'Returns one entry with references, which says what each ID in its reference fields points to, so a client can show names and images without further requests.
Required scopes: read:metaobjects
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The metaobject definition’s type handle.
The entry ID.
The store’s ref, as returned by GET /stores.
Responses
Section titled “Responses”object
Entry ID, as a string.
ID of the metaobject definition the entry belongs to.
Active or draft. Always active when the definition has no status.
The field values, keyed by field key. Fields without a value are left out.
object
ID of the user who created the entry, or null.
ID of the user who last updated the entry, or null.
When the entry was created, as an ISO 8601 timestamp.
When the entry was last updated, as an ISO 8601 timestamp.
For each reference field key, what each referenced ID points to, keyed by ID. Empty objects for other fields.
object
object
object
Its image, when it has one.
ID of the referenced record.
Its name or title. Falls back to the ID when the record is missing.
True when the referenced record no longer exists.
The entry’s handle, unique within its type. Generated from the display name when not given on create.
The text that names the entry: the display-name field’s value, or the handle.
The type handle of the entry’s definition.
Example
{ "status": "active"}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"}