Skip to main content

productAddAttribute

Registers a product's attribute.

Authentication Requirements

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

Validation Rules

  • Product must exist and be accessible to the authenticated user
  • Referenced attribute must not exist for the product's brand
  • Referenced attribute definition must exist in the product's brand
  • The attribute definition must belong to the product
  • The attribute value can't be blank

Possible Errors

  • **Authentication Error**: User not authenticated or lacks permissions
  • **Validation Error**: Any validation rule is violated
productAddAttribute(
input: AddProductAttributeInput!
): ProductAttribute!

Arguments

productAddAttribute.input ● AddProductAttributeInput! non-null input

Parameters for AddProductAttribute

Type

ProductAttribute object