Skip to main content

categoryAddProductsClusters

Add products and clusters to a category.

Associates individual products and/or clusters with the specified category, enabling product organization and categorization. This operation updates the category's product associations immediately.

Possible errors:

  • CATEGORY_NOT_FOUND_ERROR: Category with the specified ID does not exist
  • PRODUCT_NOT_FOUND_ERROR: One or more specified products do not exist
  • CATEGORY_ADD_PRODUCTS_CLUSTERS_ERROR: Failed to add products/clusters to category
  • MISSING_ARGUMENT_ERROR: Neither productIds nor clusterIds provided
  • UNAUTHENTICATED: Invalid or missing authentication
  • FORBIDDEN: Insufficient permissions to modify categories

AUTH: Role=[product.OWNER,product.EDITOR]

categoryAddProductsClusters(
id: Int!
input: CategoryAddProductsClustersInput!
): CategoryAddProductsClustersResponse!

Arguments

categoryAddProductsClusters.id ● Int! non-null scalar

Unique identifier of the category to modify.

Must be a positive integer representing a valid category ID in the system.

categoryAddProductsClusters.input ● CategoryAddProductsClustersInput! non-null input

Products and clusters to add to the category.

Contains arrays of product IDs and/or cluster IDs to associate with the category. At least one array must be provided.

Type

CategoryAddProductsClustersResponse object