# List metafield definition types

> Retrieve the available metafield definition types.

`GET /rest/api/metafield_definition_types`

Retrieves the collection of MetafieldDefinitionType resources.

Returns every metafield definition type, each with the `allowedValidations` you may attach to a definition of that type.

## Headers

| Name                         | Type     | Required | Description                                                                                                                                      |
| ---------------------------- | -------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| `X-Flowkiwi-Organization-Id` | `string` | Yes      | The organization the request acts as. Determines the identity, permissions and ownership applied when reading or modifying data on the instance. |

## Response

**200** - MetafieldDefinitionType collection

| Property           | Type                        | Required | Description |
| ------------------ | --------------------------- | -------- | ----------- |
| `hydra:totalItems` | `integer`                   | -        |             |
| `hydra:search`     | `object`                    | -        |             |
| `hydra:member`     | `MetafieldDefinitionType[]` | Yes      |             |

## Examples

### Example request

```bash
curl -X GET 'https://<tenant>.product-management.flowkiwi.net/rest/api/metafield_definition_types' \
  -H 'Authorization: Bearer {token}' \
  -H 'X-Flowkiwi-Organization-Id: <org_id>' \
  -H 'Accept: application/ld+json'
```

### Example response

```json
{
  "@context": "/contexts/MetafieldDefinitionType",
  "@id": "/rest/api/metafield_definition_types",
  "@type": "hydra:Collection",
  "hydra:totalItems": 2,
  "hydra:member": [
    {
      "@context": "/contexts/MetafieldDefinitionType",
      "@id": "/rest/api/metafield_definition_types/number_decimal",
      "@type": "https://schema.org/Enumeration",
      "id": "number_decimal",
      "description": "A number with decimal.",
      "example": 10.4,
      "allowedValidations": [
        "/rest/api/metafield_definition_validation_types/min_value",
        "/rest/api/metafield_definition_validation_types/max_value",
        "/rest/api/metafield_definition_validation_types/max_precision"
      ]
    },
    {
      "@context": "/contexts/MetafieldDefinitionType",
      "@id": "/rest/api/metafield_definition_types/json",
      "@type": "https://schema.org/Enumeration",
      "id": "json",
      "description": "A JSON-serializable value. This can be an object, an array, a string, a number, a boolean, or a null value.",
      "example": "{ \"ingredient\": \"flour\", \"amount\": 0.3 }",
      "allowedValidations": [
        "/rest/api/metafield_definition_validation_types/json_schema"
      ]
    }
  ]
}
```
