---
title: "metaobject"
description: "Get a metaobject."
doc_type: graphql
doc_category: storefront
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/docs/storefront-api/metaobjects/queries/metaobject'
  md: 'https://developer.shopline.com/docs/storefront-api/metaobjects/queries/metaobject.md'
---
# metaobject

Get a metaobject.

- **Required Scopes:** `unauthenticated_read_metaobjects`
- **API Version:** v20270301
- **API Type:** Storefront
- **API Protocol:** GraphQL
- **Operation Type:** Query

## Required Permissions

* `unauthenticated_read_metaobjects`

An access token is required to call this API. Refer to [Authorization](https://developer.shopline.com/docs/apps/api-instructions-for-use/graph-ql-admin-api/overview.md) for more information about how to obtain the token.

## Arguments

* `id`

  [String](https://developer.shopline.com/docs/storefront-api/common/scalars/string.md)

  The ID of the metaobject.

* `handle`

  [MetaobjectHandleInput](https://developer.shopline.com/docs/storefront-api/metaobjects/objects/metaobject-handle-input.md)

  The identifier of the metaobject. 

## Returns

* `fields`

  [[MetaobjectField!]!](https://developer.shopline.com/docs/storefront-api/metaobjects/objects/metaobject-field.md)

  List of metafields.    
  

* `handle`

  [String!](https://developer.shopline.com/docs/storefront-api/common/scalars/string.md)

  The unique identifier of the metaobject. 

* `id`

  [ID!](https://developer.shopline.com/docs/storefront-api/common/scalars/id.md)

  The ID of the metaobject.   
  

* `type`

  [String!](https://developer.shopline.com/docs/storefront-api/common/scalars/string.md)

  The type of the metaobject. 

* `updatedAt`

  [Date!](https://developer.shopline.com/docs/storefront-api/common/scalars/date.md)

  The date and time when the metaobject was updated.  
  Format: [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html).

* `createdAt`

  [Date!](https://developer.shopline.com/docs/storefront-api/common/scalars/date.md)

  The date and time when the metaobject was created.  
  Format: [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html).

## Examples

### Get a metaobject

Get a metaobject

**Request:**

```json
query GetMetaobject($id: String!) {
  metaobject(id: $id) {
    id
    type
    handle
    fields {
      key
      type
      value
    }
    createdAt
    updatedAt
  }
}

```

**Response:**

```json
{
  "data": {
    "data": {
      "metaobject": {
        "updatedAt": "2026-04-08T03:20:00Z",
        "createdAt": "2026-04-08T02:40:00Z",
        "fields": [
          {
            "value": "100% Organic Cotton",
            "key": "fabric_name",
            "type": "single_line_text_field"
          },
          {
            "key": "washing_temperature",
            "type": "number_integer",
            "value": "40"
          },
          {
            "key": "is_machine_washable",
            "type": "boolean",
            "value": "true"
          },
          {
            "key": "care_instructions",
            "type": "multi_line_text_field",
            "value": "Machine wash warm. Do not bleach. Line dry in shade."
          }
        ],
        "handle": "cotton_basic_care",
        "id": "9876543210",
        "type": "material_care_guide"
      }
    }
  }
}
```

## Error Handling

For detailed information about common codes, see [Status and error codes](https://developer.shopline.com/docs/apps/api-instructions-for-use/storefront-api/overview.md#status-and-error-codes).

