Crownpeak
  • Product Discovery Developer Guide
  • 🛒Item catalog management
    • What is the Items API?
    • How to work with Items
      • Item Schema
        • Attributes
        • Nested Item Schemas
        • Using the Item Schema API
        • DefaultLocale API
        • Onboarding on/migrating to Fredhopper
        • List of Reserved Attributes
      • Category Tree
        • Using the Category Tree API
        • Onboarding on XO
      • Item Catalog
        • Using the Catalog API
      • Items
        • Using the streaming Items API
        • Using the batch Items API
    • Step by Step guide
      • Step by step guide for Fredhopper customers
    • Feedback
      • Using the Feedback API
    • Authorization to APIs
    • Troubleshooting API errors
  • 🎯XO Recommendations
    • Introduction
    • Using the Recommendations API
    • Setting up the Chrome extension
    • Micro-segmentation
    • XO Legacy APIs
  • 🔎XO Search
    • Introduction
    • Getting started
    • API Reference
      • Search API
      • Autocomplete API (Beta)
      • Product Suggest API
    • API Parameters
      • Search
      • Pagination
      • Faceting
      • Sorting
      • Grouping
      • Filtering
      • Disable features
      • Response mask
      • Context
    • Configuration limitation
  • 🧪A/B testing
    • Fredhopper A/B testing
      • Integration steps for a non-caching solution
      • Integration steps for a caching solution
        • Java SDK Integration
          • Setup
          • Retrieve running A/B tests - Java SDK
          • Filter and request variant - Java SDK
          • Extending the SDK
        • Manual A/B tests integration
          • Retrieve running A/B tests
          • Filter out irrelevant A/B tests
          • Assign variants to user
          • Request variant for page
        • Limitations and Best Practices
  • 📚Resources
    • Glossary
    • Best Practices
      • Tracker Best Practices
      • Items API Best Practices
      • Fredhopper Data Configuration Best Practices
      • Fredhopper Query Response Best Practices
      • Fredhopper Merchandising Studio Best Practices
    • Privacy Notice
  • Archived Pages
    • FHR Tracking plan
    • XO Tracking plan
    • The Tracking API and JS Library
      • What to Track
        • Generic Actions
          • View
          • Click
          • Add to Cart
          • Remove from Cart
          • Purchase
        • Custom Actions
      • Initializing the JavaScript Library
      • REST API Technical Documentation
Powered by GitBook
On this page
  • FHR to Items API data type mapping
  • Attribute type Object/ObjectList
  • FHR data model validation
  1. Item catalog management
  2. How to work with Items
  3. Item Schema

Onboarding on/migrating to Fredhopper

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

categories attribute (i.e. hierarchical type) is mandatory on parent item creation (POST operation) and contains a list of item's leaf category ids.

FHR
Items API
Translatable

int

INTEGER

✘

float

FLOAT

✘

text

TEXT

✘

asset

LOCALIZEDTEXT

✔

list/list64

OBJECT

✔

set/set64

OBJECTLIST

✔

hierarchical

LIST

✔

INTEGER (FHR int)

{
    "attributes": {
        "in_stock": 1
    }
}

FLOAT (FHR float)

{
    "attributes": {
        "price": 33.3
    }
}

TEXT (FHR text)

{
    "attributes": {
        "_imageurl": "https://example.com/media/main_img.jpg"
    }
}

LOCALIZEDTEXT (FHR asset)

{
    "attributes": {
        "display_name": {
            "en_GB": "World Cup Boots",
            "fr_FR": "Chaussures World Cup"
        }
    }
}

OBJECT (FHR list/list64)

{
    "attributes": {
        "color": {
            "value_id": "red",
            "value": {
                "en_GB": "Red",
                "de_DE": "Rot"
            }
        }
    }
}

OBJECTLIST (FHR set/set64)

{
    "attributes": {
        "colors": [
            {
                "value_id": "red",
                "value": {
                    "en_GB": "Red",
                    "de_DE": "Rot"
                }
            },
            {
                "value_id": "blue",
                "value": {
                    "en_GB": "Blue",
                    "de_DE": "Blau"
                }
            }
        ]
    }
}

Fredhopper requires for localisable attributes the locale to be sent, even if the catalogue contains only a single locale

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.

PreviousDefaultLocale APINextList of Reserved Attributes

Last updated 7 months ago

🛒