Skip to content
Esc
↑↓navigate↵open⌘Jpreview

Bulk Add Products to Categories

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
Authorization
AuthorizationBearer token · headerrequired

Management API token, sent as Authorization: Bearer <token>.

Path parameters
team_slugstringrequired

Team slug

app_slugstringrequired

App slug

Request body
requiredapplication/json

Product and category relationships to create

itemsinternal_pkg_webserver_v1.BulkCategoryProductRelationshipItem[]required
max items 50
Show properties
Array of internal_pkg_webserver_v1.BulkCategoryProductRelationshipItem
category_idstringrequired
productsinternal_pkg_webserver_v1.BulkCategoryProductRef[] | nullrequired
min items 1
Show properties
Array of internal_pkg_webserver_v1.BulkCategoryProductRef
is_main_categoryboolean
orderinteger
product_idstringrequired
Responses
200

Products added to categories successfully

datainternal_pkg_webserver_v1.BulkAddProductsToCategoriesResponserequired
Show properties
failedinternal_pkg_webserver_v1.BulkCategoryProductFailedOp[] | null
Show properties
Array of internal_pkg_webserver_v1.BulkCategoryProductFailedOp
category_idstring
product_idstring
reasonstring
successfulinternal_pkg_webserver_v1.BulkCategoryProductRelationshipItem[] | null
Show properties
Array of internal_pkg_webserver_v1.BulkCategoryProductRelationshipItem
category_idstringrequired
productsinternal_pkg_webserver_v1.BulkCategoryProductRef[] | nullrequired
min items 1
Show properties
Array of internal_pkg_webserver_v1.BulkCategoryProductRef
is_main_categoryboolean
orderinteger
product_idstringrequired
detailsstring[]

Additional contextual information about the response. Used to provide supplementary details beyond the main data payload, such as validation warnings or processing notes

successbooleanrequired
400

Invalid request

detailsstring[]
messagestring
successbooleanrequired
401

Unauthorized access

detailsstring[]
messagestring
successbooleanrequired
500

Internal server error

detailsstring[]
messagestring
successbooleanrequired
Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X POST 'https://api.enad.io/api/v1/string/string/categories/products/bulk' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "items": [
    {
      "category_id": "string",
      "products": [
        {
          "is_main_category": true,
          "order": 0,
          "product_id": "string"
        }
      ]
    }
  ]
}'
Response
{
  "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
}