---
title: metafieldDefinition - Shop Partners API
description: Retrieve a single metafield definition by identifier
api_version: unstable latest
source_url:
  html: https://shopify.dev/docs/api/shop-partners/latest/queries/metafieldDefinition
  md: https://shopify.dev/docs/api/shop-partners/latest/queries/metafieldDefinition.md
---

# metafield​Definition

query

Retrieve a single metafield definition by identifier

## Arguments

* identifier

  [Custom​Data​Key​Pair​Input!](https://shopify.dev/docs/api/shop-partners/latest/input-objects/CustomDataKeyPairInput)

  required

  Key and namespace pair that together form the path to the definition. Key is required, Namespace defaults to the Client's implicit, reserved namespace if not provided. Leave blank to see everything available to the client.

***

## Possible returns

* Metafield​Definition

  [Metafield​Definition](https://shopify.dev/docs/api/shop-partners/latest/objects/MetafieldDefinition)

  A MetafieldDefinition is a Permissible type. It is managed by a Client and defines the shape of the data stored in in a Metafield. Control and access of a MetafieldDefinition is determined by AccessGrants that link the definition to Clients or Namespaces.

  * access

    [Custom​Data​Access​Type](https://shopify.dev/docs/api/shop-partners/latest/objects/CustomDataAccessType)

    List of the active policies associated with this Definition. Policies represent ownership of the Definition and can be granted to Clients and Nampespaces.

  * description

    [String](https://shopify.dev/docs/api/shop-partners/latest/scalars/String)

    Developer facing description.

  * key

    [String!](https://shopify.dev/docs/api/shop-partners/latest/scalars/String)

    non-null

    Developer facing identifier for the resource.

  * name

    [String](https://shopify.dev/docs/api/shop-partners/latest/scalars/String)

    Developer facing display name.

  * namespace

    [String](https://shopify.dev/docs/api/shop-partners/latest/scalars/String)

    Developer facing path to identifier for the resource.

  * type

    [Metafield​Definition​Type!](https://shopify.dev/docs/api/shop-partners/latest/objects/MetafieldDefinitionType)

    non-null

    One of the types available in the Metafield developer documentation (<https://shopify.dev/docs/apps/custom-data/metafields/types>), except JSON.

  * uuid

    [ID!](https://shopify.dev/docs/api/shop-partners/latest/scalars/ID)

    non-null

    Internal identifier for the resource.

  * validations

    [\[Custom​Data​Metafield​Definition​Validation​Type!\]](https://shopify.dev/docs/api/shop-partners/latest/objects/CustomDataMetafieldDefinitionValidationType)

    A list of validation options for the metafields that belong to the metafield definition.

***

## Examples

* ### metafieldDefinition reference