Skip to main content

Get a hierarchy

GET 

https://euwest.api.elasticpath.com/pcm/hierarchies/:hierarchyID

Retrieves the specified hierarchy.

Request

Path Parameters

    hierarchyID stringrequired

    A unique identifier for the hierarchy.

Responses

Returns a hierarchy with the following attributes.

Schema
    data objectrequired
    idstringrequired

    A unique identifier generated when a hierarchy is created.

    typestringrequired

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

    Possible values: [hierarchy]

    attributes objectrequired
    namestring

    The name of a hierarchy, such as Major Appliances.

    descriptionstring

    A description for a hierarchy.

    slugstring

    A unique slug for a hierarchy.

    admin_attributes object

    admin_attributes are not displayed in catalogs. This means admin_attributes can only be viewed by administrators. If you want a custom attribute to be displayed in a catalog, you must add it to shopper_attributes.

    admin_attributes are structured as key-value pairs. Both the keys and values are strings. You can have up to 100 keys.

    property name*stringnullable
    shopper_attributes object

    shopper_attributes are displayed in catalogs. This means shopper_attributes can be viewed by both shoppers and administrators. If you do not want a custom attribute to be displayed in a catalog, you must add it to admin_attributes.

    shopper_attributes are structured as key-value pairs. Both the keys and values are strings. You can have up to 100 keys.

    property name*stringnullable
    locales object

    Product Experience Manager supports localization of hierarchies and nodes. If you store supports multiple languages, you can localize hierarchy and node names and descriptions.

    property name* object

    A three-letter language code that represents the name of language you have used.

    namestring

    A localized hierarchy or node name.

    descriptionstring

    A localized hierarchy or node description.

    relationships objectrequired
    children object

    The child nodes related to the hierarchy.

    dataarray

    An array of child nodes.

    links object

    Links allow you to move between requests.

    relatedstring

    A link to a related resource.

    meta objectrequired
    created_atstring<date-time>

    The date and time a hierarchy is created.

    Example: 2020-09-22T09:00:00
    updated_atstring<date-time>

    The date and time a hierarchy is updated.

    Example: 2020-09-22T09:00:00
    ownerstring

    The owner of a resource, either organization or store.

    Possible values: [store, organization]

    breadcrumbs object[]

    Breadcrumbs

  • Array [
  • idstring

    A unique identifier generated when a hierarchy is created.

    namestring

    The name of a hierarchy, such as Major Appliances.

    slugstring

    A unique slug for a hierarchy.

    locales object

    Product Experience Manager supports localization of hierarchies and nodes. If you store supports multiple languages, you can localize hierarchy and node names and descriptions.

    property name* object

    A three-letter language code that represents the name of language you have used.

    namestring

    A localized hierarchy or node name.

  • ]

Authorization: http

name: bearerAuthtype: httpscheme: bearer
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://euwest.api.elasticpath.com/pcm/hierarchies/:hierarchyID");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "Bearer <token>");
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
Request Collapse all
Base URL
https://euwest.api.elasticpath.com
Auth
Parameters
— pathrequired
ResponseClear

Click the Send API Request button above and see the response here!