# Feed categories (/ai/reference/channels/feed-categories)

Toolset `feed_categories`, 13 tools.

## Records [#records]

### `feed_category_attributes` [#feed_category_attributes]

The attributes a site requires for the category a store category maps to, and what each is filled from (fixed values, a product attribute or an option). Get takes &lt;tree id>/&lt;store category id>.

- Permission: `feeds.read`
- Tools: `feed_category_attributes_get`

### `feed_category_node` [#feed_category_node]

A category of a site's list, found by words, to map a store category to. List only; node_id is what feed_category_map takes.

- Permission: `feeds.read`
- Tools: `feed_category_node_list`

Filters on the list:

| Filter | Type | Required | Description |
| --- | --- | --- | --- |
| `tree_id` | string | yes | Category tree ID (a site's category list), from feed_category_tree_list. at least 1 characters |
| `language` | string | yes | Language of the site's category names. 2 to 35 characters |
| `q` | string |  | Words of the category path. at most 200 characters |
| `category_id` | string |  | Rank the nodes by their fit to this store category. at least 1 characters |

### `feed_category_status` [#feed_category_status]

How a feed's categories stand: which store categories its products are in and whether each is mapped. Pass the feed ID.

- Permission: `feeds.read`
- Tools: `feed_category_status_get`

### `feed_category_tree` [#feed_category_tree]

A site's category list that store categories are mapped to. List shows each tree with its size and mapping progress. Get takes &lt;tree id>@&lt;language> and returns the mapping screen: every store category with the site category it maps to, its suggestion and the products it relists.

- Permission: `feeds.read`
- Tools: `feed_category_tree_list`, `feed_category_tree_get`

Filters on the list:

| Filter | Type | Required | Description |
| --- | --- | --- | --- |
| `locale` | string |  | Admin language for labels |

### `feed_product_category` [#feed_product_category]

The site category a product goes into on each tree: from its store category mapping, or its own override. Pass the product ID.

- Permission: `feeds.read`
- Tools: `feed_product_category_get`

## Actions [#actions]

### `feed_category_accept_suggestions` [#feed_category_accept_suggestions]

Apply exactly the store-category to site-category matches the merchant accepted.

- Action key: `feed_category.accept_suggestions`
- Permission: `feeds.write`
- Approval: Always waits for a person to approve it.
- Effect: Changes the live store.
- Retries: safe to repeat with the same input.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `tree_id` | string | yes | Category tree ID (a site's category list), from feed_category_tree_list. at least 1 characters |
| `pairs` | list of object | yes | 1 to 1000 items |
| `pairs[].category_id` | string | yes | Store product category ID. at least 1 characters |
| `pairs[].node_id` | string | yes | Node ID of the site's category, from feed_category_node_list. at least 1 characters |

Example input:

```json
{
  "tree_id": "google-hu",
  "pairs": [
    {
      "category_id": "019bb50f-c863-7fa2-b8ae-0d6b18758e24",
      "node_id": "187"
    }
  ]
}
```

### `feed_category_attributes_set` [#feed_category_attributes_set]

Set what the attributes a site requires for a category are filled from.

Each value is fixed values (&#123;kind: fixed, values&#125;), a product attribute (&#123;kind: product_attribute, key&#125;) or a variant option (&#123;kind: option, key&#125;); null clears it. Read feed_category_attributes_get for the attribute keys the site requires.

- Action key: `feed_category_attributes.set`
- Permission: `feeds.write`
- Approval: Waits for approval when the store requires it for this action.
- Effect: Changes the live store.
- Retries: safe to repeat with the same input.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `tree_id` | string | yes | Category tree ID (a site's category list), from feed_category_tree_list. at least 1 characters |
| `category_id` | string | yes | Store product category ID. at least 1 characters |
| `values` | list of object | yes | 1 to 100 items |
| `values[].attribute_key` | string | yes | at least 1 characters |
| `values[].value` | object, one shape of: or null | yes |  |
| `values[].value[kind=fixed].kind` | string | yes | always "fixed" |
| `values[].value[kind=fixed].values` | list of string | yes | at least 1 items. at least 1 characters |
| `values[].value[kind=product_attribute].kind` | string | yes | always "product_attribute" |
| `values[].value[kind=product_attribute].key` | string | yes | at least 1 characters |
| `values[].value[kind=option].kind` | string | yes | always "option" |
| `values[].value[kind=option].key` | string | yes | at least 1 characters |

Example input:

```json
{
  "tree_id": "google-hu",
  "category_id": "019bb50f-c863-7fa2-b8ae-0d6b18758e24",
  "values": [
    {
      "attribute_key": "color",
      "value": {
        "kind": "product_attribute",
        "key": "colour"
      }
    }
  ]
}
```

### `feed_category_map` [#feed_category_map]

Map a store product category to a site category, or remove its mapping.

Mapping changes where the category's live products are listed on the site, relisting them. A dry run reports the live products it would relist, per site, and writes nothing. node_id null removes the mapping. copy_down also applies it to the subcategories without their own mapping.

- Action key: `feed_category.map`
- Permission: `feeds.write`
- Approval: Always waits for a person to approve it.
- Effect: Changes the live store.
- Retries: safe to repeat with the same input.
- Dry run: supported, with `dry_run` set to true.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `tree_id` | string | yes | Category tree ID (a site's category list), from feed_category_tree_list. at least 1 characters |
| `category_id` | string | yes | Store product category ID. at least 1 characters |
| `node_id` | string or null | yes | at least 1 characters |
| `copy_down` | boolean |  |  |
| `accepted_suggestion` | boolean |  | True when node_id is a suggestion the merchant accepted |

Example inputs:

```json
{
  "tree_id": "google-hu",
  "category_id": "019bb50f-c863-7fa2-b8ae-0d6b18758e24",
  "node_id": "187"
}
```

```json
{
  "tree_id": "google-hu",
  "category_id": "019bb50f-c863-7fa2-b8ae-0d6b18758e24",
  "node_id": null
}
```

### `feed_category_set_copy_down` [#feed_category_set_copy_down]

Switch whether a mapped store category also applies to its subcategories without their own mapping.

- Action key: `feed_category.set_copy_down`
- Permission: `feeds.write`
- Approval: Always waits for a person to approve it.
- Effect: Changes the live store.
- Retries: safe to repeat with the same input.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `tree_id` | string | yes | Category tree ID (a site's category list), from feed_category_tree_list. at least 1 characters |
| `category_id` | string | yes | Store product category ID. at least 1 characters |
| `copy_down` | boolean | yes |  |

Example input:

```json
{
  "tree_id": "google-hu",
  "category_id": "019bb50f-c863-7fa2-b8ae-0d6b18758e24",
  "copy_down": true
}
```

### `feed_category_suggest` [#feed_category_suggest]

Ask the site and AI for the site categories the name matching left open; suggestions are kept, never applied.

Spends AI credits and asks the site per category, so one round can take up to two minutes. Pass the next of the previous answer as after to continue. Apply the suggestions the merchant accepts with feed_category_accept_suggestions.

- Action key: `feed_category.suggest`
- Permission: `feeds.write`
- Approval: Always waits for a person to approve it.
- Effect: Changes a draft; nothing goes live until it is published.
- Retries: safe to repeat with the same input.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `tree_id` | string | yes | Category tree ID (a site's category list), from feed_category_tree_list. at least 1 characters |
| `language` | string | yes | Language of the site's category names. 2 to 35 characters |
| `category_ids` | list of string |  | Only these store categories. at least 1 characters |
| `after` | string |  | The next of the previous answer. at least 1 characters |

Example input:

```json
{
  "tree_id": "google-hu",
  "language": "hu"
}
```

### `feed_category_tree_load` [#feed_category_tree_load]

Load a site's category list in a language, or take the site's much shorter list.

list full loads every category of the site in that language (and the feeds' languages); shorter takes the site's much shorter list.

- Action key: `feed_category_tree.load`
- Permission: `feeds.write`
- Approval: Waits for approval when the store requires it for this action.
- Effect: Changes the live store.
- Retries: safe to repeat with the same input.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `tree_id` | string | yes | Category tree ID (a site's category list), from feed_category_tree_list. at least 1 characters |
| `language` | string | yes | Language of the site's category names. 2 to 35 characters |
| `list` | string | yes | one of "full", "shorter" |

Example input:

```json
{
  "tree_id": "google-hu",
  "language": "hu",
  "list": "full"
}
```

### `feed_product_category_set` [#feed_product_category_set]

Put one product into a site category whatever its store category maps to, or remove that override.

- Action key: `feed_product_category.set`
- Permission: `feeds.write`
- Approval: Waits for approval when the store requires it for this action.
- Effect: Changes the live store.
- Retries: safe to repeat with the same input.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `tree_id` | string | yes | Category tree ID (a site's category list), from feed_category_tree_list. at least 1 characters |
| `product_id` | string | yes | at least 1 characters |
| `node_id` | string or null | yes | at least 1 characters |

Example inputs:

```json
{
  "tree_id": "google-hu",
  "product_id": "019bb58e-0ec1-79c1-9f40-d39d8d07674b",
  "node_id": "187"
}
```

```json
{
  "tree_id": "google-hu",
  "product_id": "019bb58e-0ec1-79c1-9f40-d39d8d07674b",
  "node_id": null
}
```
