Get all 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 the nodes directly attached to a product to build breadcrumbs in your storefront. This eliminates the need for additional queries to fetch hierarchy or parent node details. Each node contains all the necessary information in breadcrumbs metadata, such as its own details and the details of its parent hierarchy/node(s), to construct the complete breadcrumb path without requiring additional queries.
An example is shown below:
filter=in(id,c83bfe55-0d87-4302-a86d-ab19e7e323f1,6003d7ef-84f3-49bb-a8bd-4cbfa203dcbb)
- Specify the node IDs directly attached to the product in the filter expression.
- You can include as many node IDs as required.
- It does not matter what order you specify the node IDs. The nodes are returned in the order they were last updated.
Request
- Base URLhttps://euwest.api.elasticpath.com
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Query parameters
This endpoints supports filtering. See Filtering.
The maximum number of records per page for this response. You can set this value up to 100. If no page size is set, the page length store setting is used.
The current offset by number of records, not pages. Offset is zero-based. The maximum records you can offset is 10,000. You would normally increment the page offset by multiples of the page limit to paginate through the results.
Headers
The language and locale your storefront prefers. See Accept-Language.
The list of channels in which this catalog can be displayed. A channel is the shopping experience, such as a mobile app or web storefront. If empty, the catalog rule matches all channels. The channel will eventually be included in the bearer token that is used for authorization, but currently, you must set the EP-Channel header in your requests.
Tags are used to refine the eligibility criteria for a rule. Requests populate the catalog rule tag using the EP-Context-Tag header.
Response
The hierarchies of the catalog.
Example response
{
"data": [
{
"attributes": {
"created_at": "1970-01-01T00:00:00.000",
"published_at": "1970-01-01T00:00:00.000",
"description": "Formal dresswear",
"name": "Formal dresswear",
"slug": "formal",
"updated_at": "1970-01-01T00:00:00.000"
},
"id": "e871df93-c769-49a9-9394-a6fd555b8e8a",
"type": "hierarchy",
"meta": {
"language": "en-GB",
"breadcrumbs": [
{
"id": "e871df93-c769-49a9-9394-a6fd555b8e8a",
"name": "Formal dresswear",
"slug": "formal"
}
],
"has_children": true
}
}
]
}Changes
No recorded changes to this operation across all 1 revision of this API.