**Version: 202201**

# Metafield Definition List

**GET** `/openapi/2022-01/metafield_definition/:owner_resource`

Retrieve a list of all metafield definitions.

## Request

**Path Parameters**

- `owner_resource` string (required)

  Owner resource type of meta field definition, for example: `product_variant` | `product` | `collection`

## Responses

**200 | 422**

200

**application/json**

**Schema | Example | Result**

**Schema**

- `definitions` object[]

  *   Array [

  - `id` string

    **Example:** `374034306256875562`
  - `key` string

    **Example:** `key2`
  - `name` string

    **Example:** `Big`
  - `namespace` string

    **Example:** `test`
  - `owner_resource` string

    **Example:** `product`
  - `type` string

    **Example:** `boolean`
  - `description` string

    **Example:** `boolean`
  - `create_at` string

    **Example:** `2024-04-28T03:18:59Z`
  - `updated_at` string

    **Example:** `2024-04-28T03:18:59Z`
  *   ]
- `total` integer

  **Default value:** `0`

  **Example:** `3`

```json
{
  "definitions": [
    {
      "id": "374034306256875562",
      "key": "key2",
      "name": "Big",
      "namespace": "test",
      "owner_resource": "product",
      "type": "boolean",
      "description": "boolean",
      "create_at": "2024-04-28T03:18:59Z",
      "updated_at": "2024-04-28T03:18:59Z"
    }
  ],
  "total": 3
}
```

```json
{
  "definitions": [
    {
      "id": "374034306256875562",
      "key": "key2",
      "name": "Big",
      "namespace": "test",
      "owner_resource": "product",
      "type": "boolean",
      "description": "boolean",
      "create_at": "2024-04-28T03:18:59Z",
      "updated_at": "2024-04-28T03:18:59Z"
    },
    {
      "id": "374032579801653802",
      "key": "key1",
      "name": "Big",
      "namespace": "test",
      "owner_resource": "product",
      "type": "boolean",
      "description": "boolean",
      "create_at": "2024-04-28T03:13:49Z",
      "updated_at": "2024-04-28T03:13:49Z"
    },
    {
      "id": "373310224787861546",
      "key": "config",
      "name": "config",
      "namespace": "custom",
      "owner_resource": "product",
      "type": "date",
      "description": "desc",
      "create_at": "2024-04-26T05:33:18Z",
      "updated_at": "2024-04-26T05:33:18Z"
    }
  ],
  "total": 3
}
```

422

**application/json**

**Schema | Example | Result**

**Schema**

- `errors` string[]

```json
{
  "errors": [
    "invalid own resources"
  ]
}
```

```json
{
  "errors": [
    "invalid own resources"
  ]
}
```
