catalogInfo
Important: Only call parameters that you need. Personalization Cloud operates off a set of APIs that support many applications and clients concurrently. Personalization Cloud may update and enhance these APIs at any time. If you are building a mobile app, please use our mobile SDKs.
http://recs.richrelevance.com/rrserver/api/rrPlatform/catalogInfo/
This returns the children of a given category down to a specified depth. To see the siblings of a category, use catalogInfo/siblings.
Note: The URL requires the API key and parameter(s) to function properly. See below for more information on example URL requests.
Parameters
Note: All paramets are case sensitive.
Name | Required or Optional | Description |
---|---|---|
apiKey | Required | |
apiClientKey | Required | |
categoryId | Required | |
depth | Optional |
Example Request
http://recs.richrelevance.com/rrserver/api/rrPlatform/catalogInfo/?&apiClientKey=e9c9e05289be70e6&apiKey=showcaseparent&categoryId=Baby.Feeding&depth=2
Example Response
[{ "hasChildren": true, "name": "Feeding", "childCategories": [{ "hasChildren": false, "name": "Formula", "childCategories": [], "id": "Baby.Feeding.Formula" }, { "hasChildren": false, "name": "Baby Formula", "childCategories": [], "id": "Baby.Feeding.Baby Formula" }], "ancestorCategories": [{ "hasChildren": true, "name": "Baby", "id": "Baby" }], "id": "Baby.Feeding" }]
Response Definition
The response will be a JSON object containing the following fields:
Field | Description |
---|---|
id | The category ID. |
name | The name of the category. |
hasChildren | Does the category have subcategories? Valid values= true, false |
childCategories | The subcategories of this category, an array of CategoryInfo objects. Depending on the context (including the value of the depth parameter), this field may or may not be populated. If it is not populated, the category may have subcategories–use the hasChildren field to check for subcategories. Set to an empty array when the category has no subcategories. |
ancestorCategories | The ancestor categories of this category, an array of CategoryInfo objects. |