# Categories

> This page documents the **new** Vitrin categories function and shows the old Zid equivalent.

All functions are available via **`window.zid.categories`**.

---

## List Categories

**New:** `zid.categories.list()`
**Old:** `zid.store.product.fetchCategories()`

**Description:** Retrieve all categories defined in the store.

### Usage

```js
const categories = await zid.categories.list();
console.log(categories);

// Or using then/catch
zid.categories.list()
  .then(categories => {
    console.log(categories);
  })
  .catch(error => {
    console.log(error.status, error.responseData);
  });
```

