Get a Hierarchy
GET/catalog/hierarchies/:hierarchy_id
Returns a hierarchy from the catalog.
If you have multiple catalog rules defined, the rule that best matches the shoppers context is used to determine which catalog to retrieve. For information about how catalog rules are matched, see Resolving Catalog Rules.
Request
Path Parameters
The catalog hierarchy ID.
Header Parameters
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.
Product tags are used to store or assign a key word against a product. The product tag can then be used to describe or label that product. Using product tags means that you can group your products together, for example, by brand, category, subcategory, colors, types, industries, and so on. You can enhance your product list using tags, enabling you to refine your product list and run targeted promotions. Tags are used to refine the eligibility criteria for a rule. Requests populate the catalog rule tag using the EP-Context-Tag
header.
Responses
- 200
- default
The catalog hierarchy.
- application/json
- Schema
- Example (from schema)
Schema
data object
A category hierarchy in a catalog. Hierarchies can have parent nodes and child nodes, as well as a list of attached products.
attributes object
Resource attributes of a catalog hierarchy.
The date and time a hierarchy is created.
The date and time a hierarchy is published in a catalog.
A description of a hierarchy.
The name of a hierarchy.
A unique slug for a hierarchy.
The date and time a hierarchy was updated.
A unique identifier of a hierarchy.
relationships object
Relationships to child nodes, and products.
products object
A URL to all the products associated with a hierarchy.
links object
A URL to a related object, for example, catalog rules, hierarchies, price books, products and deltas.
A URL to a related object, for example, catalog rules, hierarchies, price books, products and deltas.
children object
A URL to all the child products associated with a hierarchy.
links objectrequired
A URL to a related object, for example, catalog rules, hierarchies, price books, products and deltas.
A URL to a related object, for example, catalog rules, hierarchies, price books, products and deltas.
nodes object
A URL to all the nodes associated with a hierarchy.
links objectrequired
A URL to a related object, for example, catalog rules, hierarchies, price books, products and deltas.
A URL to a related object, for example, catalog rules, hierarchies, price books, products and deltas.
This represents the type of object being returned. Always hierarchy
.
meta object
A hierarchy's metadata.
Product Experience Manager supports localization of hierarchies. If your store supports multiple languages, you can localize hierarchy names and descriptions. This is three-letter language code that represents the name of the language you have used.
links object
Links allow you to move between requests.
Single entities use a self
parameter with a link the specific resource.
Always the first page.
This is null
if there is only one page.
This is null
if there is only one page.
This is null
if there is only one page.
{
"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",
"relationships": {
"products": {
"links": {
"related": "string"
}
},
"children": {
"links": {
"related": "string"
}
},
"nodes": {
"links": {
"related": "string"
}
}
},
"type": "hierarchy",
"meta": {
"language": "en-GB"
}
},
"links": {
"self": "string",
"first": "string",
"last": "string",
"prev": "string",
"next": "string"
}
}
The unexpected error.
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- ]
errors object[]
{
"errors": [
{
"detail": "not processable",
"status": "422",
"title": "There was a problem processing your request."
}
]
}