Skip to main content

categoryCreate

Create a category and place it within the hierarchy.

When no parent is supplied the category becomes a root category. The catalogue's default language must be present in the localized name list. External system integrators can supply a source / source identifier pair so the catalogue can resolve the category later without needing the internal identifier.

Possible errors:

  • PARENT_CATEGORY_NOT_FOUND: The supplied parent reference did not match any category.
  • CATEGORY_ALREADY_EXISTS: A category with the supplied source / source identifier or slug already exists.
  • CATEGORY_NOT_ALLOWED: The combination of inputs violates a catalogue business rule.
  • SCHEMA_VALIDATION: One or more input fields failed validation.

AUTH: Role=[product.OWNER]

categoryCreate(
input: CreateCategoryInput!
): Category!

Arguments

categoryCreate.input ● CreateCategoryInput! non-null input

Category creation data including localized content, parent reference, SEO metadata, and visibility flag.

Contains the information needed to place a new category in the catalogue tree.

Type

Category object

Category entity representing product classification and organization.

External entity from the catalog service that provides category identification and hierarchy information. Used as a reference for category-specific attributes and organizational relationships within the attribute system.