Skip to main content

addProduct

Creates a new product with the provided information.

Authentication Requirements

Requires authentication and 'products:add' permission for the target brand.

Validation Rules

  • SKU must be unique within the brand
  • Referenced entities (color, size, style, category, parent) must exist
  • Tag names must be unique within the product
  • When packaging flags are enabled, corresponding input data must be provided

Possible Errors

  • **Authentication Error**: User not authenticated or lacks permissions
  • **Validation Error**: Invalid data or business rule violations
  • **Not Found Error**: Referenced entities don't exist
  • **Uniqueness Error**: SKU already exists within the brand
addProduct(
input: AddProductInput!
): Product!

Arguments

addProduct.input ● AddProductInput! non-null input

Parameters for AddProduct

Type

Product object

Represents a product in the system with all its attributes and relationships.