Category

Structured object for representing a category in PureClarity.

Properties

Property Type Description Mandatory
Id string The unique Id of the category Yes
DisplayName string This is the name that will be displayed for each category in recommenders. Yes
Image string An absolute URL pointing to the location of the image. This image will be used when displaying category recommenders and will be used in the PureClarity admin. If possible, specify the URL without a protocol e.g. // instead of http:// or https:// No
Link string This can be a relative or absolute URL pointing to category listing page. If using an absolute URL, specify the URL without a protocol e.g. // instead of http:// or https:// Yes
ParentIds string[] The Id’s of the parent categories for this category. This means that a category can exist in more than one parent category, for example a category of “Shirts” could be in both of the categories “Mens” and “Sale” No
Breadcrumbs string Optional breadcrumb trail to the category listing page. If not set, then it is automatically generated from the ParentId’s. No
Description string A short, non-formatted description of the category. This field should not contain any HTML No

Constructor

Category(string id, string displayName, string link)

Note that all parameters on the constructor are mandatory.

Remarks

The optional breadcrumb should only be used if you want the breadcrumb trail to be different from what would be generated by using the ParentIds. Note that the generated breadcrumb trail will use the DisplayName value of each category.