Get all Hierarchies
GET/catalog/hierarchies
Returns all hierarchies from a catalog.
If you have multiple catalog rules defined, the rule that best matches the shoppers context is used to determine which catalog is retrieved. For information about how rules are matched, see Resolving Catalog Rules.
Filtering
This endpoint supports filtering. For general syntax, see Filtering.
Operator | Description | Supported Attributes | Example |
---|---|---|---|
Eq | Checks if the values of two operands are equal. If they are, the condition is true. | name , slug | filter=eq(name,some-name) |
In | Checks if the values are included in the specified string. If they are, the condition is true. | id | filter=in(id,some-id) |
Building breadcrumbs in a storefront
In a catalog, you can use a filter to return a list of nodes in a hierarchy structure that a product belongs to. You can use this to build breadcrumbs in your storefront. An example is shown below.
filter=in(id,c83bfe55-0d87-4302-a86d-ab19e7e323f1,6003d7ef-84f3-49bb-a8bd-4cbfa203dcbb)
- Specify the node Ids in the filter expression.
- You can have as many node Ids as you want.
- It does not matter what order you specify the node Ids. The nodes are returned in the order they were last updated.
Request
Responses
- 200
- default
The hierarchies of the catalog.
An unexpected error.