BizKitHub
DocsAPI ReferenceProduct/bff/product/bulk-set-main-category
postProductAdmin BFF

/bff/product/bulk-set-main-category

Assigns the same main category to every matched product in a single UPDATE. Soft-deleted rows are skipped. Pass an empty categoryCode to unset. An unknown category is a 500 (the write helper throws).

ProductpostBffProductBulk-set-main-category

Parameters

JSON body

Request body

application/json
productCodesstring[]Required

Product codes to update.

categoryCodestringRequired

Category code to assign as main. Empty string clears the main category.

Exampleelectronics

Response schema

1 status code documented

200Success
success"true"Required
matchednumberRequired
requestednumberRequired

Response example

application/json
{
  "success": true,
  "matched": 0,
  "requested": 0
}

Request example

POST /bff/product/bulk-set-main-category

post
curl -X POST "https://api.bizkithub.com/bff/product/bulk-set-main-category" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
  "productCodes": [
    "my-product"
  ],
  "categoryCode": "electronics"
}'

Need an API key?

All BizKitHub public API endpoints require authentication via API key.

Get API Key