Category Tree
It represents a hierarchical category list
Definition
A category tree represents a hierarchical category list. The category tree contains a principal node. This node can have multiple children. Each child is composed of the name and an array of localized names.
As the item schema, the category tree is versioned to be associated in a catalog.
Category Trees aren't mandatory unless you want to associate an item with a category.
Structure
name
String
Name of the root node
tenant
String
Tenant of the account
environment
String
Environment to use
version
Int
The version of the category tree - manage by the API
localizedNames
List
List of objects providing available translations per locale:
{
"locale": "<langcode_countrycode>",
"name": "<translation>"
}
children
List
list of CategoryTree Category
The root name can't be 0
Localized Name Structure
name
String
Name of the category
locale
String
Based on the Java locale format <languagecode>_<countrycode>
CategoryTree Category
name
String
Name of the root node
localizedNames
List
List of objects providing available translations per locale:
{
"locale": "<langcode_countrycode>",
"name": "<translation>"
}
children
List
list of CategoryTree Category
Example
Validation
Additional validation for category trees:
root name should not be empty or “0”
categories should have localized names with valid locales
each category name should be unique
FHR data model validation
The query parameter fhrValidation=true can be added to enforce Fredhopper specific validation to the category API. This includes the following additional checks to the schema:
Category names (aka Category_ids) only contain the alphanumerical characters [A-Za-z0-9] i.e. must only contain uppercase and lowercase Latin letters:
A-Z
,a-z
, and digits:0-9
Last updated