Attribute Feed

The fields of the attribute feed, which lets Athena XAI index your product attributes and build filters.

Last updated

On this page

Overview

The attribute feed lets Athena XAI index the product attributes on your website. All attributes you provide in this feed can be visible on the Athena XAI Dashboard under Settings > Filters. Format your data using the fields and the example below.

Fields

Field nameData typeDescriptionRequirement
idintYour attribute’s unique identifier. Use a unique value for each attribute.required
codestringYour attribute’s unique code. This code is used to set attribute values on your product.required
optionsarray of objectsAll options of the attribute. For each option you can submit a value or unique ID, and a label or visible name. You can submit hex_code for specific fields, for example when there is an attribute code color.required

Fields in the options array

The fields in the options array must have these data types:

Field nameData typeDescription
valueintegerUnique value for every attribute option.
labelstringOption label.
hashCodestringAdditional information about the attribute option, for example a color hex_code or a swatch image path.
typeintegerDistinguishes between hashCode types, for example a swatch image path and a color hex code, so the frontend can easily recognize which attribute option it has.

Example

JSON
[
   {
      "id": "93",
      "code": "color",
      "options": [
         {
            "value": "5476",
            "label": "Black",
            "hex_code": "#000000"
         },
         {
            "value": "5485",
            "label": "Red",
            "hex_code": "#ff0000"
         },
         {
            "value": "5486",
            "label": "White",
            "hex_code": "#ffffff"
         },
         {
            "value": "5487",
            "label": "Yellow",
            "hex_code": "#ffff00"
         }
      ]
   },
   {
      "id": "139",
      "code": "material",
      "options": [
         {
            "value": "5460",
            "label": "Cotton"
         },
         {
            "value": "5465",
            "label": "Polyester"
         },
         {
            "value": "5471",
            "label": "Plastic"
         },
         {
            "value": "5473",
            "label": "Synthetic"
         },
         {
            "value": "5475",
            "label": "Silicone"
            "label": "Silicone"
         }
      ]
   }
]