interface AttributeDefinition {
    attributeConstraint: string;
    inputHint: string;
    inputTip: LocalizedString;
    isRequired: boolean;
    isSearchable: boolean;
    label: LocalizedString;
    name: string;
    type: AttributeType;
}

Properties

attributeConstraint: string
inputHint: string
inputTip: LocalizedString
isRequired: boolean

Whether the attribute is required to have a value.

isSearchable: boolean

Whether the attribute's values should generally be enabled in product search. This determines whether the value is stored in products for matching terms in the context of full-text search queries and can be used in facets & filters as part of product search queries. The exact features that are enabled/disabled with this flag depend on the concrete attribute type and are described there. The max size of a searchable field is restricted to 10922 characters. This constraint is enforced at both product creation and product update. If the length of the input exceeds the maximum size an InvalidField error is returned.

name: string

The unique name of the attribute used in the API. The name must be between two and 256 characters long and can contain the ASCII letters A to Z in lowercase or uppercase, digits, underscores (_) and the hyphen-minus (-). When using the same name for an attribute in two or more product types all fields of the AttributeDefinition of this attribute need to be the same across the product types, otherwise an AttributeDefinitionAlreadyExists error code will be returned. An exception to this are the values of an enum or lenum type and sets thereof.