---
search:
  tags:
    - Categories
    - POST
seo:
  description: >-
    Adds multiple products to multiple categories… Reference for the POST
    /api/v1/{team_slug}/{app_slug}/categories/products/bulk endpoint in the
    Management API.
sidebar:
  label: Bulk Add Products to Categories
  badge: POST
title: Bulk Add Products to Categories
type: openapi-operation
---
Adds multiple products to multiple categories simultaneously in a single bulk operation. Supports up to 50 category-product relationship items per request, automatically handling sort order and publishing update events for affected products and categories.

`POST /api/v1/{team_slug}/{app_slug}/categories/products/bulk`

**Request body** (`application/json`, required)

Product and category relationships to create

- `items` (internal_pkg_webserver_v1.BulkCategoryProductRelationshipItem[], required)

Request body example:

```json
{
  "items": [
    {
      "category_id": "string",
      "products": [
        {
          "is_main_category": true,
          "order": 0,
          "product_id": "string"
        }
      ]
    }
  ]
}
```

**Responses**

- `200` — Products added to categories successfully
- `400` — Invalid request
- `401` — Unauthorized access
- `500` — Internal server error

Response example, 200:

```json
{
  "data": {
    "failed": [
      {
        "category_id": "string",
        "product_id": "string",
        "reason": "string"
      }
    ],
    "successful": [
      {
        "category_id": "string",
        "products": [
          {
            "is_main_category": true,
            "order": 0,
            "product_id": "string"
          }
        ]
      }
    ]
  },
  "details": [
    "string"
  ],
  "success": true
}
```
