attributes.json
What each attribute value means.
attributes
array of objects
What an attribute's values mean: their type, unit, known values and how they are used. Facets are laid out in categories.json, searched fields in types.json.
The code of an attribute definition, such as color or seat_height. The reserved words any, all, not, category, brand, price, on_sale, availability, delivery_days and rating cannot be attribute codes.
8 values
Free text: searchable, never a filter.
GTIN, MPN, ISBN and similar: exact match after normalization.
Enumerated values with labels, aliases, order, groups and swatches.
A number without a unit.
A number with a unit of one dimension.
A minimum and a maximum with a unit, such as age 3 to 6.
A date or a point in time.
A plain value, or a map from locale to value such as { "de": "Farbe", "en": "Color" }.
The value is a list, such as several materials.
The value differs per locale. For text and, rarely, option.
Quantities and ranges: the one canonical unit every value is converted to.
27 values
Quantities and ranges: the one canonical unit every value is converted to.
Quantities and ranges: the one canonical unit every value is converted to.
Quantities and ranges: the one canonical unit every value is converted to.
Quantities and ranges: the one canonical unit every value is converted to.
Quantities and ranges: the one canonical unit every value is converted to.
Quantities and ranges: the one canonical unit every value is converted to.
Quantities and ranges: the one canonical unit every value is converted to.
Quantities and ranges: the one canonical unit every value is converted to.
Quantities and ranges: the one canonical unit every value is converted to.
Quantities and ranges: the one canonical unit every value is converted to.
Quantities and ranges: the one canonical unit every value is converted to.
Quantities and ranges: the one canonical unit every value is converted to.
Quantities and ranges: the one canonical unit every value is converted to.
Quantities and ranges: the one canonical unit every value is converted to.
Quantities and ranges: the one canonical unit every value is converted to.
Quantities and ranges: the one canonical unit every value is converted to.
Quantities and ranges: the one canonical unit every value is converted to.
Quantities and ranges: the one canonical unit every value is converted to.
Quantities and ranges: the one canonical unit every value is converted to.
Quantities and ranges: the one canonical unit every value is converted to.
Quantities and ranges: the one canonical unit every value is converted to.
Quantities and ranges: the one canonical unit every value is converted to.
Quantities and ranges: the one canonical unit every value is converted to.
Quantities and ranges: the one canonical unit every value is converted to.
Quantities and ranges: the one canonical unit every value is converted to.
Quantities and ranges: the one canonical unit every value is converted to.
Quantities and ranges: the one canonical unit every value is converted to.
Numbers, quantities and ranges: the decimal places shown.
Options: the known values, in display order. Their aliases merge other spellings into them; a value nobody listed becomes a value of its own and a merge suggestion in the panel, so nothing is dropped.
A known value of an option attribute.
9 fields
The code of an option value or option group, such as grey or 160x230.
A plain value, or a map from locale to value such as { "de": "Farbe", "en": "Color" }.
Spellings that mean this value, matched without regard to case, such as Rot and rouge for red.
Its word in URLs, per locale, such as anthrazit. It is made from the label when the value is created and stays when the label changes, so a URL that holds it never moves by accident. A release that leaves it out has it made from the label at every run, and the run report names it.
The slugs it had before, per locale: a URL that holds one is read as the value and leads to its slug. A write that changes the slug keeps the old one here; deleting one is deliberate.
The group or groups the value is shown under.
A swatch color in hexadecimal notation, such as #C62828.
A swatch image, such as a pattern or a mix of colors that no single color shows; its URL.
What the value means, shown under it in a facet and read with it, such as "Coated fabric with the look of leather".
Options: groups that show different values under one filter, such as burgundy and red under Red.
Values shown under one filter. A selector naming a group means every value in it; a code that is both a value and a group means the group.
8 fields
The code of an option value or option group, such as grey or 160x230.
A plain value, or a map from locale to value such as { "de": "Farbe", "en": "Color" }.
Words in a query that mean the group, such as grau for grey.
Its word in URLs, per locale, such as anthrazit. It is made from the label when the value is created and stays when the label changes, so a URL that holds it never moves by accident. A release that leaves it out has it made from the label at every run, and the run report names it.
The slugs it had before, per locale: a URL that holds one is read as the value and leads to its slug. A write that changes the slug keeps the old one here; deleting one is deliberate.
A swatch color in hexadecimal notation, such as #C62828.
A swatch image, such as the pattern that stands for "mixed colors"; its URL.
What the group holds, shown under it in a facet and read with it.
Options: the import places values that have no group in a color group, by the built-in color words and by their swatch. An attribute without groups of its own has the built-in ones.
Selectors, filters and facets may use the attribute. Changing it needs an index run.
Sort options may use the attribute. Changing it needs an index run.
The query is searched for the attribute's values, so "grauer teppich" filters on grey.
Column names the import maps onto this attribute, in any language.
$schema
string
The JSON Schema an editor checks this file against; kept as written.
Example
{
"$schema": "../../../contracts/schema/attributes.json",
"attributes": [
{
"code": "color",
"type": "option",
"label": { "de": "Farbe", "en": "Color" },
"level": "variant",
"values": [
{
"code": "white",
"label": { "de": "Weiß", "en": "White" },
"aliases": ["weiß"],
"slug": { "de": "weiss", "en": "white" },
"group": "white",
"swatch": "#FFFFFF"
}
],
"groups": [
{
"code": "white",
"label": { "de": "Weiß", "en": "White" },
"aliases": ["weiß"],
"slug": { "de": "weiss", "en": "white" },
"swatch": "#FFFFFF"
}
],
"color_groups": true,
"filterable": true
}
]
}Guide: Types and attributes