Skip to main content

Get all hierarchies

GET 

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

Get all hierarchies

Filtering

Many Commerce API endpoints support filtering. The general syntax is described in Filtering.

The following attributes and operators are supported.

OperatorAttributeDescriptionExample
eqid, hierarchy_id, owner, parent_id, name, slug, description, has_children, created_at, updated_at, locales.[locale].name, locales.[locale].description, breadcrumbs.id, breadcrumbs.name, breadcrumbs.slug, breadcrumbs.locales.[locale].nameEquals. Checks if the value of the attribute matches the specified value.filter=eq(name,some-name), filter=eq(locales.fr-FR.name,Nom-du-produit)
inid, hierarchy_id, parent_id, breadcrumbs.idChecks if the value of the attribute is included in the specified list.filter=in(id,1,2,3,4)
lt, le, gt, geid, hierarchy_id, parent_id, created_at, updated_atComparison operators. lt: Less than, le: Less than or equal to, gt: Greater than, ge: Greater than or equal to.filter=lt(id,100), filter=ge(created_at,2022-01-01)
likename, slug, description, locales.[locale].name, locales.[locale].description, breadcrumbs.name, breadcrumbs.slug, breadcrumbs.locales.[locale].nameLike. Checks if the attribute contains the specified string (wildcards supported).filter=like(name,*some-name*), filter=like(locales.es-ES.description,*descripción*)

Request

Query Parameters

    page[offset] int64

    Possible values: <= 10000

    The number of records to offset the results by.

    page[limit] int64

    Possible values: <= 10000

    The number of records per page. The maximum limit is 100.

    filter string

    Many Commerce API endpoints support filtering. The general syntax is described here.

Responses

Returns a list of all hierarchies.

Schema
    data object[]required
  • Array [
  • 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_atdate-time

    The date and time a hierarchy is created.

    Example: 2020-09-22T09:00:00
    updated_atdate-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.

  • ]
  • ]
  • links object

    Links are used to allow you to move between requests.

    firststring

    Always the first page.

    Example: /pcm/hierarchies?page[offset]=0&page[limit]=10
    laststring

    This is null if there is only one page.

    Example: /pcm/hierarchies?page[offset]=20&page[limit]=10
    nextstring

    This is null if there is only one page.

    Example: /pcm/hierarchies?page[offset]=10&page[limit]=10
    prevstring

    This is null if you on the first page.

    Example: /pcm/hierarchies?page[offset]=8&page[limit]=10
    meta object
    results object

    Contains the results for the entire collection.

    totalinteger

    Total number of results for the entire collection.

    Example: 30

Authorization: http

name: bearerAuthtype: httpscheme: bearer
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://euwest.api.elasticpath.com/pcm/hierarchies");
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
— query
— query
— query
ResponseClear

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

We use cookies to enhance your experience. By continuing to visit this site you agree to our use of cookies.