Browse the API docs

Metaobjects

Entries of a metaobject definition, like one designer or one FAQ. Values are strings, the same as metafield values.

Endpoints#

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.

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"
}

List metaobject entries#

GET/metaobjects.jsonread_metaobjects

Entries of one definition, oldest first.

Query parameters
ParameterDescription
typeRequired: the definition's type, like designer.
limitResults per page, 1–250 (default 50).
page_infoCursor from the Link header.
statusactive or draft.
handleOnly the entry with this handle.
idsComma-separated ids.
updated_at_min / updated_at_maxISO 8601 bounds.
fieldsComma-separated fields to return.
Request
curl "https://store.weftgrid.com/api/admin/2026-10/metaobjects.json" \
  -H "X-Storeloom-Access-Token: $STORELOOM_TOKEN"
Example responseShow
{ "metaobjects": [ … ] }

Count metaobject entries#

GET/metaobjects/count.jsonread_metaobjects
Query parameters
ParameterDescription
typeRequired: the definition's type.
statusactive or draft.
Request
curl "https://store.weftgrid.com/api/admin/2026-10/metaobjects/count.json" \
  -H "X-Storeloom-Access-Token: $STORELOOM_TOKEN"
Example responseShow
{ "count": 3 }

Get a metaobject entry#

GET/metaobjects/{id}.jsonread_metaobjects
Request
curl "https://store.weftgrid.com/api/admin/2026-10/metaobjects/$METAOBJECT_ID.json" \
  -H "X-Storeloom-Access-Token: $STORELOOM_TOKEN"
Example responseShow
{
  "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#

POST/metaobjects.jsonwrite_metaobjects

type 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.

Request body
{
  "metaobject": {
    "type": "designer",
    "handle": "mira-okafor",
    "fields": { "name": "Mira Okafor", "website": "https://mira.example" }
  }
}
Request with curl
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 responseShow
{
  "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#

PUT/metaobjects/{id}.jsonwrite_metaobjects

Fields 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.

Request body
{ "metaobject": { "fields": { "website": "https://miraokafor.example" }, "status": "active" } }
Request with curl
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 responseShow
{
  "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#

DELETE/metaobjects/{id}.jsonwrite_metaobjects

Metafields that point at it keep the reference, which then reads as empty.

Request
curl -X DELETE "https://store.weftgrid.com/api/admin/2026-10/metaobjects/$METAOBJECT_ID.json" \
  -H "X-Storeloom-Access-Token: $STORELOOM_TOKEN"
Example responseShow
{}