---
title: "Categorize products with AI"
method: POST
path: "/ops/sellers/{seller_id}/catalog/categorize"
tags: ["ops", "ops-sellers"]
---

# Categorize products with AI

`POST /ops/sellers/{seller_id}/catalog/categorize`

## Request

- Base URL: `https://api.topi-staging.eu`
- URL: `https://api.topi-staging.eu/ops/sellers/{seller_id}/catalog/categorize`
- Auth: OAuth 2
  - Authorization code: `/oauth2/authorize`
  - Token URL: `/oauth2/token` scopes: `catalog:edit`

For the given product IDs, categorize them automatically with AI (open AI ChatGPT) For categorizing all seller products (that are not categorized) send an empty list for ids

## Path parameters

- `seller_id` string, regexp, required: Seller ID

## Query parameters

- `batch_size` integer: number of products per batch to be sent to openAI
- `num_workers` integer: number of workers to use for processing product batches

## Request body

- ProductIDList
  - `ids` string[], required: List of IDs of topi products

## Response `200`

OK response.

- CategorizeProductsResponseBody
  - `result` CategorizationResult
    - `errors` string[], required: a list of error strings
    - `total_categorized` integer, required: The total number of categorized products
    - `total_errors` integer, required: The total number of errors that occurred
    - `total_products` integer, required: The total number of products being processed

## Other responses

- `400`: BadRequest: Bad Request response.
- `401`: Unauthorized: Unauthorized response.
- `403`: InvalidScopes: Forbidden response.
- `503`: CategorizeAPIError: Service Unavailable response.

## Changes

- **2026-10-27** `ac6979514123`: 1 info
  - api operation id `catalog.CategorizeProducts` removed and replaced with `catalog#CategorizeProducts`
- **2026-10-26** `7ff7ee94b30e`: 2 info
  - api operation id `catalog#CategorizeProducts` removed and replaced with `catalog.CategorizeProducts`
  - api tag `ops-sellers` added

[Operation history](https://skmtc.dev/topi/apis/topi-public-api/changes/ops/sellers/:seller_id/catalog/categorize/post.md)

---

[API](https://skmtc.dev/topi/apis/topi-public-api.md) - [All operations](https://skmtc.dev/topi/apis/topi-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/topi/apis/topi-public-api/revisions/09f585e29aa8?raw)
