Skip to main content

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.

OperatorDescriptionSupported AttributesExample
EqChecks if the values of two operands are equal. If they are, the condition is true.name, slugfilter=eq(name,some-name)
InChecks if the values are included in the specified string. If they are, the condition is true.idfilter=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

Query Parameters

    filter string

    This endpoints supports filtering. See Filtering.

    page[limit] int64

    Possible values: >= 1

    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.

    page[offset] int64

    Possible values: <= 10000

    The current offset by number of records, not pages. Offset is zero-based. The maximum records you can offset is 10,000. If no page size is set, the page length store setting is used.

Header Parameters

    accept-language string

    The language and locale your storefront prefers. See Accept-Language.

    EP-Channel string

    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.

    EP-Context-Tag string

    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

The hierarchies of the catalog.

Schema
    meta object

    Contains the results for the entire collection.

    results object

    Total number of results for the entire collection.

    total int64

    Total number of results for the entire collection.

    page object
    limit int64

    The maximum number of records for all pages.

    offset int64

    The current offset by number of pages.

    current int64

    The current number of pages.

    total int64

    The total number of records for the entire collection.

    data object[]
  • Array [
  • attributes object

    Resource attributes of a catalog hierarchy.

    created_at date-time

    The date and time a hierarchy is created.

    published_at date-timenullable

    The date and time a hierarchy is published in a catalog.

    description string

    A description of a hierarchy.

    name string

    The name of a hierarchy.

    slug string

    A unique slug for a hierarchy.

    updated_at date-time

    The date and time a hierarchy was updated.

    id string

    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.

    related stringrequired

    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.

    related stringrequired

    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.

    related stringrequired

    A URL to a related object, for example, catalog rules, hierarchies, price books, products and deltas.

    type string

    This represents the type of object being returned. Always hierarchy.

    meta object

    A hierarchy's metadata.

    language string

    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.

    self urinullable

    Single entities use a self parameter with a link the specific resource.

    first urinullable

    Always the first page.

    last urinullable

    This is null if there is only one page.

    prev urinullable

    This is null if there is only one page.

    next urinullable

    This is null if there is only one page.

Loading...