younifyd
Menu

Get By Context Hierarchy

Get a Hierarchy

GET/catalog/hierarchies/{hierarchy_id}

Use it in a workflow

  1. Add a step and choose the Elastic Path connector.
  2. Pick the Get By Context Hierarchy action (under Catalog).
  3. Fill in the fields below, then reference the result from later steps as {{getByContextHierarchy.response.data}}.

Request

Path parameters

hierarchy_idstringrequired

The catalog hierarchy ID.

Headers

accept-languagestring

The language and locale your storefront prefers. See [Accept-Language](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Language).

EP-Channelstring

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-Tagstring

Tags are used to refine the eligibility criteria for a rule. Requests populate the catalog rule tag using the `EP-Context-Tag` header.

Response

Returns 200 with an object. Read it in later steps with {{getByContextHierarchy.response.data.<field>}}.

dataobject

A category hierarchy in a catalog. Hierarchies can have parent nodes and child nodes, as well as a list of attached products.

attributesobject7 fields

Resource attributes of a catalog hierarchy.

idstring

A unique identifier of a hierarchy.

relationshipsobject3 fields

Relationships to child nodes, and products.

typestring

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

metaobject3 fields

A hierarchy's metadata.

linksobject

Links allow you to move between requests.

selfstring (uri)

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

firststring (uri)

Always the first page.

laststring (uri)

This is `null` if there is only one page.

prevstring (uri)

This is `null` if there is only one page.

nextstring (uri)

This is `null` if there is only one page.

json
{
  "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",
      "shopper_attributes": {},
      "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",
      "breadcrumbs": [
        {
          "id": "e871df93-c769-49a9-9394-a6fd555b8e8a",
          "name": "Formal dresswear",
          "slug": "formal"
        }
      ],
      "has_children": true
    }
  },
  "links": {
    "self": "string",
    "first": "string",
    "last": "string",
    "prev": "string",
    "next": "string"
  }
}

Need more? See the Elastic Path guide for connection setup and behaviour shared by every action.