Data Types in the Items API

If you are onboarding on Fredhopper or migration from previous FHR DATA API based on CSV or JSON files, please follow mapping below how to represent Fredhopper data types in the items API.

FHR to Items API data type mapping

triangle-exclamation
FHR
Items API
Translatable

int

INTEGER

✘

float

FLOAT

✘

text

TEXT

✘

asset

LOCALIZEDTEXT

βœ”

list/list64

OBJECT

βœ”

set/set64

OBJECTLIST

βœ”

hierarchical

LIST

βœ”

circle-exclamation

Attribute type Object/ObjectList

The attribute type Object and ObjectList must have the following structure and be set at the root level of the schema or variant:

[
    {
        "name": {attribute_name},
        "type": "OBJECT" | "OBJECTLIST",
        "attributes": [
            { "name": "value", "type": "LOCALIZEDTEXT"},
            { "name": "valueId", "type": "TEXT"}
        ]
    }
]

FHR data model validation

The new items API supports a more flexible data model which may not always be supported by the Fredhopper platform. The query parameter fhrValidation=true can be added to enforces Fredhopper specific validation to the schema API, the category API and the items API to ensure all the data can correctly be indexed.

Last updated