# metadata (https://docs.salla.dev/twilight/react/sdk/metadata)



Use `Salla.metadata` to read **metadata**: extra fields the merchant adds to products and other entities, such as a care guide or a material.

```ts
const { data } = await Salla.metadata.fetchValues('product', [101, 102, 103]);
```

## Methods [#methods]

| Method        | Parameters    | Returns                                                                                                        |
| ------------- | ------------- | -------------------------------------------------------------------------------------------------------------- |
| `fetchValues` | `entity, ids` | The metadata values of those entities. `entity` is the kind, such as `'product'`. `ids` is one id or an array. |

## Events [#events]

| Event                         | Fires when           | Arguments |
| ----------------------------- | -------------------- | --------- |
| `metadata::value.fetched`     | `fetchValues` worked | response  |
| `metadata::value.not.fetched` | `fetchValues` failed | error     |

## Gotchas [#gotchas]

* `fetchValues` without an entity or ids rejects at once with "Please provide entity type and entity ids."
* Old Twig examples import a `MetadataApi` class. In a theme, call `Salla.metadata.fetchValues` instead.

## See also [#see-also]

* [Product](https://docs.salla.dev/twilight/react/sdk/product)
* [Overview](https://docs.salla.dev/twilight/react/sdk)
