Metaobjects
Entries of a metaobject definition, like one designer or one FAQ. Values are strings, the same as metafield values.
Endpoints#
- GET
/metaobjects.jsonList metaobject entries - GET
/metaobjects/count.jsonCount metaobject entries - GET
/metaobjects/{id}.jsonGet a metaobject entry - POST
/metaobjects.jsonCreate a metaobject entry - PUT
/metaobjects/{id}.jsonUpdate a metaobject entry - DELETE
/metaobjects/{id}.jsonDelete a metaobject entry
Paths are relative to https://store.weftgrid.com/api/admin/2026-10. The examples read the token from $STORELOOM_TOKEN and ids from variables like $ORDER_ID.
The metaobject object#
What the endpoints below return for one metaobject, and the payload of the metaobjects/create, metaobjects/update webhooks.
{
"id": "cm2mobj001",
"type": "designer",
"handle": "mira-okafor",
"display_name": "Mira Okafor",
"status": "active",
"definition_id": "cm2mdef001",
"fields": [
{
"key": "name",
"type": "single_line_text_field",
"value": "Mira Okafor"
},
{
"key": "bio",
"type": "rich_text_field",
"value": "<p>Weaves linen in Portland.</p>"
},
{
"key": "portrait",
"type": "file_reference",
"value": "gid://storeloom/File/cm2file001"
}
],
"updated_by": "Sam Rivera",
"admin_graphql_api_id": "gid://storeloom/Metaobject/cm2mobj001",
"created_at": "2026-10-31T09:05:00.000Z",
"updated_at": "2026-10-31T09:05:00.000Z"
}List metaobject entries#
/metaobjects.jsonread_metaobjectsEntries of one definition, oldest first.
| Parameter | Description |
|---|---|
type | Required: the definition's type, like designer. |
limit | Results per page, 1–250 (default 50). |
page_info | Cursor from the Link header. |
status | active or draft. |
handle | Only the entry with this handle. |
ids | Comma-separated ids. |
updated_at_min / updated_at_max | ISO 8601 bounds. |
fields | Comma-separated fields to return. |
curl "https://store.weftgrid.com/api/admin/2026-10/metaobjects.json" \
-H "X-Storeloom-Access-Token: $STORELOOM_TOKEN"Example responseShowHide
{ "metaobjects": [ … ] }Count metaobject entries#
/metaobjects/count.jsonread_metaobjects| Parameter | Description |
|---|---|
type | Required: the definition's type. |
status | active or draft. |
curl "https://store.weftgrid.com/api/admin/2026-10/metaobjects/count.json" \
-H "X-Storeloom-Access-Token: $STORELOOM_TOKEN"Example responseShowHide
{ "count": 3 }Get a metaobject entry#
/metaobjects/{id}.jsonread_metaobjectscurl "https://store.weftgrid.com/api/admin/2026-10/metaobjects/$METAOBJECT_ID.json" \
-H "X-Storeloom-Access-Token: $STORELOOM_TOKEN"Example responseShowHide
{
"metaobject": {
"id": "cm2mobj001",
"type": "designer",
"handle": "mira-okafor",
"display_name": "Mira Okafor",
"status": "active",
"definition_id": "cm2mdef001",
"fields": [
{ "key": "name", "type": "single_line_text_field", "value": "Mira Okafor" },
{ "key": "bio", "type": "rich_text_field", "value": "<p>Weaves linen in Portland.</p>" },
{ "key": "portrait", "type": "file_reference", "value": "gid://storeloom/File/cm2file001" }
],
"updated_by": "Sam Rivera",
"admin_graphql_api_id": "gid://storeloom/Metaobject/cm2mobj001",
"created_at": "2026-10-31T09:05:00.000Z",
"updated_at": "2026-10-31T09:05:00.000Z"
}
}Create a metaobject entry#
/metaobjects.jsonwrite_metaobjectstype names the definition. handle is optional (made from the display name). status: active or draft (definitions with drafts). Required fields need a value unless the entry is a draft. Values are strings like metafield values: references are gids (gid://storeloom/Product/<id>, …/File/<id>, …/Metaobject/<id>) of this store's records, lists are JSON arrays, money is {"amount":"5.99","currency_code":"USD"}, measurements {"value":30,"unit":"cm"}. Objects and arrays may be sent as JSON instead of strings. An empty string removes a value.
{
"metaobject": {
"type": "designer",
"handle": "mira-okafor",
"fields": { "name": "Mira Okafor", "website": "https://mira.example" }
}
}curl -X POST "https://store.weftgrid.com/api/admin/2026-10/metaobjects.json" \
-H "X-Storeloom-Access-Token: $STORELOOM_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"metaobject": {
"type": "designer",
"handle": "mira-okafor",
"fields": { "name": "Mira Okafor", "website": "https://mira.example" }
}
}'Example responseShowHide
{
"metaobject": {
"id": "cm2mobj001",
"type": "designer",
"handle": "mira-okafor",
"display_name": "Mira Okafor",
"status": "active",
"definition_id": "cm2mdef001",
"fields": [
{ "key": "name", "type": "single_line_text_field", "value": "Mira Okafor" },
{ "key": "bio", "type": "rich_text_field", "value": "<p>Weaves linen in Portland.</p>" },
{ "key": "portrait", "type": "file_reference", "value": "gid://storeloom/File/cm2file001" }
],
"updated_by": "Sam Rivera",
"admin_graphql_api_id": "gid://storeloom/Metaobject/cm2mobj001",
"created_at": "2026-10-31T09:05:00.000Z",
"updated_at": "2026-10-31T09:05:00.000Z"
}
}Update a metaobject entry#
/metaobjects/{id}.jsonwrite_metaobjectsFields sent replace their values; fields left out keep theirs. The type can't change. Values are strings like metafield values: references are gids (gid://storeloom/Product/<id>, …/File/<id>, …/Metaobject/<id>) of this store's records, lists are JSON arrays, money is {"amount":"5.99","currency_code":"USD"}, measurements {"value":30,"unit":"cm"}. Objects and arrays may be sent as JSON instead of strings. An empty string removes a value.
{ "metaobject": { "fields": { "website": "https://miraokafor.example" }, "status": "active" } }curl -X PUT "https://store.weftgrid.com/api/admin/2026-10/metaobjects/$METAOBJECT_ID.json" \
-H "X-Storeloom-Access-Token: $STORELOOM_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "metaobject": { "fields": { "website": "https://miraokafor.example" }, "status": "active" } }'Example responseShowHide
{
"metaobject": {
"id": "cm2mobj001",
"type": "designer",
"handle": "mira-okafor",
"display_name": "Mira Okafor",
"status": "active",
"definition_id": "cm2mdef001",
"fields": [
{ "key": "name", "type": "single_line_text_field", "value": "Mira Okafor" },
{ "key": "bio", "type": "rich_text_field", "value": "<p>Weaves linen in Portland.</p>" },
{ "key": "portrait", "type": "file_reference", "value": "gid://storeloom/File/cm2file001" }
],
"updated_by": "Sam Rivera",
"admin_graphql_api_id": "gid://storeloom/Metaobject/cm2mobj001",
"created_at": "2026-10-31T09:05:00.000Z",
"updated_at": "2026-10-31T09:05:00.000Z"
}
}Delete a metaobject entry#
/metaobjects/{id}.jsonwrite_metaobjectsMetafields that point at it keep the reference, which then reads as empty.
curl -X DELETE "https://store.weftgrid.com/api/admin/2026-10/metaobjects/$METAOBJECT_ID.json" \
-H "X-Storeloom-Access-Token: $STORELOOM_TOKEN"Example responseShowHide
{}