# List metafield definitions

> Retrieve a paginated list of metafield definitions.
{/* generated:versioned-pages - edit _pm-authored, not this file */}

`GET /api/metafield_definitions`

Retrieves the collection of MetafieldDefinition resources.

Returns a paginated collection of metafield definitions in the current organization. Filter by `ownerType` to see the custom fields defined for a given resource.

## Query parameters

| Name               | Type       | Required | Description                                                                                                                                                                                                                                                                          |
| ------------------ | ---------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `page`             | `integer`  | -        | The collection page number                                                                                                                                                                                                                                                           |
| `itemsPerPage`     | `integer`  | -        | The number of items per page                                                                                                                                                                                                                                                         |
| `properties[]`     | `string[]` | -        | Allows you to reduce the response to contain only the properties you need. If your desired property is nested, you can address it using nested arrays. Example: properties[]={propertyName}&properties[]={anotherPropertyName}&properties[{nestedPropertyParent}][]={nestedProperty} |
| `id[]`             | `string[]` | -        | Only the items with one of these ids, each a UUID or the item IRI.                                                                                                                                                                                                                   |
| `ownerType`        | `string`   | -        | MetafieldDefinition ownerType                                                                                                                                                                                                                                                        |
| `ownerType[]`      | `string[]` | -        | MetafieldDefinition ownerType                                                                                                                                                                                                                                                        |
| `type`             | `string`   | -        | MetafieldDefinition type                                                                                                                                                                                                                                                             |
| `type[]`           | `string[]` | -        | MetafieldDefinition type                                                                                                                                                                                                                                                             |
| `name`             | `string`   | -        | MetafieldDefinition name                                                                                                                                                                                                                                                             |
| `name[]`           | `string[]` | -        | MetafieldDefinition name                                                                                                                                                                                                                                                             |
| `order[name]`      | `string`   | -        | MetafieldDefinition order[name]                                                                                                                                                                                                                                                      |
| `order[createdAt]` | `string`   | -        | MetafieldDefinition order[createdAt]                                                                                                                                                                                                                                                 |
| `order[updatedAt]` | `string`   | -        | MetafieldDefinition order[updatedAt]                                                                                                                                                                                                                                                 |

## Response

**200** - MetafieldDefinition collection

| Property     | Type                    | Required | Description |
| ------------ | ----------------------- | -------- | ----------- |
| `search`     | `object`                | -        |             |
| `totalItems` | `integer`               | -        |             |
| `view`       | `object`                | -        |             |
| `member`     | `MetafieldDefinition[]` | Yes      |             |

## Errors

**403** - Access denied. The caller is missing one or more permissions required for this operation.

| Property             | Type               | Required | Description                                                                                                            |
| -------------------- | ------------------ | -------- | ---------------------------------------------------------------------------------------------------------------------- |
| `@context`           | `string \| object` | -        |                                                                                                                        |
| `@id`                | `string`           | Yes      |                                                                                                                        |
| `@type`              | `string`           | Yes      |                                                                                                                        |
| `detail`             | `string`           | -        |                                                                                                                        |
| `missingPermissions` | `string[]`         | -        | Permissions that the caller is missing for this operation. Present only when the 403 is caused by a denied permission. |
| `status`             | `integer`          | -        |                                                                                                                        |
| `title`              | `string`           | -        |                                                                                                                        |
| `type`               | `string`           | -        |                                                                                                                        |

## Examples

### Example request

```bash
curl -X GET 'https://<tenant>.product-management.flowkiwi.net/api/metafield_definitions' \
  -H 'Authorization: Bearer {access_token}' \
  -H 'Flowkiwi-Api-Version: unstable' \
  -H 'Accept: application/ld+json'
```

### Example response

```json
{
  "@context": "/api/contexts/MetafieldDefinition",
  "@id": "/api/metafield_definitions",
  "@type": "Collection",
  "member": [
    {
      "@context": "/api/contexts/MetafieldDefinition",
      "@id": "/api/metafield_definitions/019afb01-1a2b-7c3d-8e4f-0a1b2c3d4e5f",
      "@type": "MetafieldDefinition",
      "constraints": [],
      "createdAt": "2026-01-15T09:30:00+00:00",
      "description": "Washing and care guidance shown on the product page.",
      "id": "019afb01-1a2b-7c3d-8e4f-0a1b2c3d4e5f",
      "key": "care_instructions",
      "metafieldsCount": 1,
      "name": "Care instructions",
      "namespace": "custom",
      "ownerType": "/api/metafield_owner_types/products",
      "type": "/api/metafield_definition_types/multi_line_text_field",
      "updatedAt": "2026-02-03T14:45:12+00:00",
      "validations": [
        {
          "name": "/api/metafield_definition_validation_types/max_length",
          "value": "500"
        }
      ]
    }
  ],
  "totalItems": 1
}
```
