> ## Documentation Index
> Fetch the complete documentation index at: https://developers-docs.easyorders.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Categories

> Read and write the store's product categories and their subcategories.

Scopes: `read_products` to read, `write_products` to change (it includes `read_products`), the same as [products](https://developers-docs.easyorders.ai/api-reference/products/overview.md).

## The category

```json theme={"dark"}
{
  "id": "5c1d2e3f-4a5b-4c6d-8e7f-9a0b1c2d3e4f",
  "name": "T-Shirts",
  "slug": "t-shirts",
  "thumb": "https://cdn.example.com/categories/t-shirts.jpg",
  "parent_id": "3b4c5d6e-7f80-4a1b-9c2d-3e4f5a6b7c8d",
  "position": 0,
  "hidden": false,
  "show_in_header": true,
  "created_at": "2026-12-04T09:00:00Z",
  "updated_at": "2026-12-04T09:00:00Z"
}
```

| Field | |
| - | - |
| `name` | One line, 1 to 255 characters. |
| `slug` | Letters `a-z`, `A-Z`, digits and `-`, up to 255. Unique among the store's categories (`409 slug_taken`). |
| `thumb` | An https image URL, up to 2048 bytes. |
| `parent_id` | The category this one is under, or `null` for a top-level category. |
| `position` | The merchant's order. Subcategories come highest first. |

`name`, `slug` and `thumb` are required on create. A product lists its categories in `category_ids`: set them on the product with [Update a product](https://developers-docs.easyorders.ai/api-reference/products/update-a-product.md).

## The HTML content is not part of the API

A category can have HTML content that the merchant writes in the dashboard. Apps can neither read nor write it: it is in no answer, and sending `content` or `is_advanced_content` answers `400 invalid_request`. A category you create starts with none, as in the dashboard, and an update leaves what the merchant wrote.

## Subcategories

* `parent_id` must be a category of the store. It cannot be the category itself, nor one of its own subcategories (`422`, rule `parent`). A `PATCH` with `parent_id: null` makes the category a top-level one.
* [List categories](https://developers-docs.easyorders.ai/api-reference/categories/list-categories.md) lists every level. Filter it with `filter=parent_id||$isnull` for the top level, or `filter=parent_id||$eq||<id>` for one category's subcategories.
* [Get a category](https://developers-docs.easyorders.ai/api-reference/categories/get-a-category.md) adds subcategories as `children` with `join=children`, up to three levels (`children.children.children`). One read joins at most 100 subcategories over all levels (`422 join_too_large`); list them instead.

## Deleting

[Delete a category](https://developers-docs.easyorders.ai/api-reference/categories/delete-a-category.md) removes it from lists and reads (`404`), and products stop listing it in `category_ids`. It cannot be restored through the API. A category that still has subcategories answers `409 category_has_children`: delete them or move them first.

## Changes

The storefront shows a change right away. Category changes send no events.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.