Elastic Path Hierarchies API

```mdx-code-block import HierarchyOverview from '/docs/partials/pxm/hierarchies/hierarchies.mdx'; import HierarchyCatalog from '/docs/partials/pxm/hierarchies/hierarchycatalogs.mdx'; ## Creating Hierarchies and Nodes You can create the **Major Appliances** hierarchy by performing the following steps. 1. Using [**Create a Hierarchy**](/docs/api/pxm/products/create-hierarchy), create a hierarchy whose name is **Major Appliances**. Each hierarchy has a hierarchy ID. In other words, the hierarchy ID is the ID of the root node. 1. Using [**Create a Node in a hierarchy**](/docs/api/pxm/products/create-node), create the following child nodes. When you create a node in a hierarchy, by default, the node is a child of the root node. Specify `sort_order` to configure the order of the nodes. - **Ranges** - **Refrigerators** - **Dishwashers** 1. Using [**Create a Node in a hierarchy**](/docs/api/pxm/products/create-node), create the **Electric Ranges** node, specifying **Ranges** as the parent node. 1. Using [**Create a Node in a hierarchy**](/docs/api/pxm/products/create-node), create the following nodes, specifying **Electric Ranges** as the parent node. - **Electric Ranges 24ˮ** - **Electric Ranges 30ˮ** - **Double Oven** 1. Using [**Create a Node in a hierarchy**](/docs/api/pxm/products/create-node), create the **Gas Ranges** node, specifying **Ranges** as the parent node. 1. Using [**Create a Node in a hierarchy**](/docs/api/pxm/products/create-node), create the following nodes, specifying **Gas Ranges** as the parent node. - **Gas Ranges 24ˮ** - **Gas Ranges 30ˮ** - **Gas Ranges 32"** - **Double Oven** 1. Using [**Create a Node in a hierarchy**](/docs/api/pxm/products/create-node), create the following nodes, specifying **Dishwashers** as the parent node. - **Built-in** - **Standalone** ## Hierarchies and Catalogs ```

Operations 21

POST /pcm/hierarchies Create a hierarchy #
GET /pcm/hierarchies Get all hierarchies #
GET /pcm/hierarchies/nodes List all nodes #
GET /pcm/hierarchies/{hierarchyID} Get a hierarchy #
PUT /pcm/hierarchies/{hierarchyID} Update a hierarchy #
DELETE /pcm/hierarchies/{hierarchyID} Delete a hierarchy #
POST /pcm/hierarchies/{hierarchyID}/nodes Create a node #
GET /pcm/hierarchies/{hierarchyID}/nodes Get all nodes in a hierarchy #
GET /pcm/hierarchies/{hierarchyID}/nodes/{nodeID} Get a node #
PUT /pcm/hierarchies/{hierarchyID}/nodes/{nodeID} Update a node #
DELETE /pcm/hierarchies/{hierarchyID}/nodes/{nodeID} Deletes a node #
GET /pcm/hierarchies/{hierarchyID}/children Get a hierarchy's children #
POST /pcm/hierarchies/{hierarchyID}/relationships/children Create relationships between a hierarchy and child nodes #
POST /pcm/hierarchies/{hierarchyID}/nodes/{nodeID}/relationships/children Create relationships between a node and child nodes #
GET /pcm/hierarchies/{hierarchyID}/nodes/{nodeID}/children Get a node's children #
PUT /pcm/hierarchies/{hierarchyID}/nodes/{nodeID}/relationships/parent Update a node's parent #
DELETE /pcm/hierarchies/{hierarchyID}/nodes/{nodeID}/relationships/parent Delete a node's parent #
POST /pcm/hierarchies/{hierarchyID}/nodes/{nodeID}/relationships/products Create a node's product relationships #
DELETE /pcm/hierarchies/{hierarchyID}/nodes/{nodeID}/relationships/products Deletes a node's product relationships #
GET /pcm/hierarchies/{hierarchyID}/nodes/{nodeID}/products Get a node's products #
POST /pcm/hierarchies/{hierarchyID}/duplicate_job Duplicate a hierarchy #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/elastic-path-hierarchies-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

elastic-path-hierarchies-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Product Experience Manager Introduction Hierarchies API
  description: '

    Product Experience Manager uses the PIM service to manage product information, hierarchies, and price books. Ideally, Product Experience Manager becomes the single source of truth for product data across your organization.


    In Commerce, the product data is stored separately from pricing, catalogs, and inventory. This separation means that you retrieve all product data only when you are managing product data and assets. Otherwise, when setting prices or managing inventory, you retrieve a reference to the product rather than the entire product, which makes the response times very fast.


    You also have the flexibility to create catalogs for different scenarios by combining hierarchies of products with a price book. Scenarios might include:


    - **Multiple geographical regions**. Display different catalogs in different regions with suitable pricing or combine product hierarchies from two different regions to display in a third region.

    - **Multiple channels**. Display different catalogs based on how a shopper accesses your store, such as through a mobile app or a web storefront.

    - **Direct to business versus direct to customers**. Offer different products and prices for business customers versus retail customers.

    - **Preferred customers**. Offer special pricing to preferred customers while displaying a standard price catalog to all other shoppers.

    - **Reward programs**. Enable reward programs where catalog prices drop after a certain spending level is reached.

    - **Product sales**. Offer sale items for a limited time.


    Scenarios are created by defining the context within which a catalog is displays. Contexts can be a customer ID, a channel, or any other user-defined tag that can be passed to the APIs from the front-end shopper experiences.

    '
  version: 26.0612.7739142
  x-version-timestamp: 2026-06-12 10:52:50+00:00
servers:
- url: https://euwest.api.elasticpath.com
  description: EU West Production Server
- url: https://useast.api.elasticpath.com
  description: US East Production Server
security:
- bearerAuth: []
tags:
- name: Hierarchies
  description: "```mdx-code-block\nimport HierarchyOverview from '/docs/partials/pxm/hierarchies/hierarchies.mdx';\nimport HierarchyCatalog from '/docs/partials/pxm/hierarchies/hierarchycatalogs.mdx';\n\n<HierarchyOverview />\n\n## Creating Hierarchies and Nodes\n\nYou can create the **Major Appliances** hierarchy by performing the following steps.\n\n1. Using [**Create a Hierarchy**](/docs/api/pxm/products/create-hierarchy), create a hierarchy whose name is **Major Appliances**. Each hierarchy has a hierarchy ID. In other words, the hierarchy ID is the ID of the root node.\n1. Using [**Create a Node in a hierarchy**](/docs/api/pxm/products/create-node), create the following child nodes. When you create a node in a hierarchy, by default, the node is a child of the root node. Specify `sort_order` to configure the order of the nodes.\n   - **Ranges**\n   - **Refrigerators**\n   - **Dishwashers**\n1. Using [**Create a Node in a hierarchy**](/docs/api/pxm/products/create-node), create the **Electric Ranges** node, specifying **Ranges** as the parent node.\n1. Using [**Create a Node in a hierarchy**](/docs/api/pxm/products/create-node), create the following nodes, specifying **Electric Ranges** as the parent node.\n   - **Electric Ranges 24ˮ**\n   - **Electric Ranges 30ˮ**\n   - **Double Oven**\n1. Using [**Create a Node in a hierarchy**](/docs/api/pxm/products/create-node), create the **Gas Ranges** node, specifying **Ranges** as the parent node.\n1. Using [**Create a Node in a hierarchy**](/docs/api/pxm/products/create-node), create the following nodes, specifying **Gas Ranges** as the parent node.\n   - **Gas Ranges 24ˮ**\n   - **Gas Ranges 30ˮ**\n   - **Gas Ranges 32\"**\n   - **Double Oven**\n1. Using [**Create a Node in a hierarchy**](/docs/api/pxm/products/create-node), create the following nodes, specifying **Dishwashers** as the parent node.\n    - **Built-in**\n    - **Standalone**\n\n## Hierarchies and Catalogs\n\n<HierarchyCatalog />\n\n```\n"
paths:
  /pcm/hierarchies:
    post:
      summary: Create a hierarchy
      description: '```mdx-code-block

        import CASummary from ''/docs/partials/pxm/custom-attributes/custom-attribute-spec-summary.mdx'';


        Creates a hierarchy with a name, description, and slug to organize products in your catalog.


        <CASummary />

        ```

        '
      operationId: createHierarchy
      tags:
      - Hierarchies
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/create_hierarchy'
            examples:
              create-hierarchy:
                $ref: '#/components/examples/create_hierarchy'
        required: true
      responses:
        '201':
          description: Returns a created hierarchy with the following attributes.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/single_hierarchy'
              examples:
                created-hierarchy:
                  $ref: '#/components/examples/hierarchy_created'
        '422':
          $ref: '#/components/responses/unprocessable_entity'
        '500':
          $ref: '#/components/responses/internal'
    get:
      operationId: getHierarchy
      parameters:
      - $ref: '#/components/parameters/page_offset'
      - $ref: '#/components/parameters/page_limit'
      - $ref: '#/components/parameters/filter_nodes'
      summary: Get all hierarchies
      description: "Get all hierarchies\n\n#### Pagination\n\nThis endpoint supports offset-based pagination using `page[offset]` and `page[limit]` query parameters.\n\n:::caution Planned pagination changes — on or after 1 September 2026\n\nThe pagination links returned by this endpoint currently differ from the Elastic Path Commerce Cloud platform standard. Specifically, the `current` link is not returned, `first`/`last` are not always present, `prev` is incorrectly omitted on the second page, and `next` is incorrectly omitted on the second-to-last page.\n\nOn or after **1 September 2026**, this endpoint will be updated so that `current` and `first` are always present, `last` is present on every page except the final page, `next` is present on every page except the last, and `prev` is present on every page except the first. See the [links](#links) schema for full details.\n\nIf your integration iterates through pages using these links, please verify that it will handle the updated behaviour correctly before this date.\n\n:::\n\n#### Filtering\n             \nMany Commerce API endpoints support filtering. The general syntax is described in [**Filtering**](/guides/Getting-Started/filtering).\n\nThe following attributes and operators are supported.\n\n| Operator        | Attribute                                                                                 | Description                                                                                      | Example                                  |\n|----------------|------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------|------------------------------------------|\n| `eq`           | `id`, `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].name` | Equals. 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)` |\n| `in`           | `id`, `hierarchy_id`,  `parent_id`, `breadcrumbs.id`                                              | Checks if the value of the attribute is included in the specified list.                        | `filter=in(id,1,2,3,4)`                 |\n| `lt`, `le`, `gt`, `ge` | `id`, `hierarchy_id`,  `parent_id`, `created_at`, `updated_at`         | Comparison 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)` |\n| `like`         | `name`, `slug`, `description`, `locales.[locale].name`, `locales.[locale].description`, `breadcrumbs.name`, `breadcrumbs.slug`, `breadcrumbs.locales.[locale].name` | Like. Checks if the attribute contains the specified string (wildcards supported).            | `filter=like(name,*some-name*)`, `filter=like(locales.es-ES.description,*descripción*)` |\n"
      tags:
      - Hierarchies
      responses:
        '200':
          description: Returns a list of all hierarchies.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/multi_hierarchy'
              examples:
                list-hierarchies:
                  $ref: '#/components/examples/resp_multi_hierarchy'
        '400':
          $ref: '#/components/responses/bad_request'
        '500':
          $ref: '#/components/responses/internal'
  /pcm/hierarchies/nodes:
    get:
      parameters:
      - $ref: '#/components/parameters/page_offset'
      - $ref: '#/components/parameters/filter_nodes'
      - $ref: '#/components/parameters/page_limit'
      - $ref: '#/components/parameters/include_hierarchies'
      summary: List all nodes
      operationId: getAllNodes
      description: 'A fully paginated view of all nodes in all hierarchies regardless of depth.


        #### Filtering


        Many Commerce API endpoints support filtering. The general syntax is described in [**Filtering**](/guides/Getting-Started/filtering).


        The following attributes and operators are supported.


        | Operator        | Attribute                                                                                 | Description                                                                                      | Example                                  |

        |----------------|------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------|------------------------------------------|

        | `eq`           | `id`, `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].name` | Equals. 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)` |

        | `in`           | `id`, `hierarchy_id`,  `parent_id`, `breadcrumbs.id`                                              | Checks if the value of the attribute is included in the specified list.                        | `filter=in(id,1,2,3,4)`                 |

        | `lt`, `le`, `gt`, `ge` | `id`, `hierarchy_id`,  `parent_id`, `created_at`, `updated_at`         | Comparison 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)` |

        | `like`         | `name`, `slug`, `description`, `locales.[locale].name`, `locales.[locale].description`, `breadcrumbs.name`, `breadcrumbs.slug`, `breadcrumbs.locales.[locale].name` | Like. Checks if the attribute contains the specified string (wildcards supported).            | `filter=like(name,*some-name*)`, `filter=like(locales.es-ES.description,*descripción*)` |

        | `ilike`        | `name`, `slug`, `description`, `locales.[locale].name`, `locales.[locale].description`, `breadcrumbs.name`, `breadcrumbs.slug`, `breadcrumbs.locales.[locale].name` | Case-insensitive like. Same as `like` but ignores case when matching. | `filter=ilike(name,*some-name*)` |

        '
      tags:
      - Hierarchies
      responses:
        '200':
          description: Returns a list of nodes
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/nodes_or_hierarchies'
              examples:
                get-all-nodes:
                  $ref: '#/components/examples/resp_multi_nodes_or_hierarchies'
        '400':
          $ref: '#/components/responses/bad_request'
        '404':
          $ref: '#/components/responses/not_found'
        '500':
          $ref: '#/components/responses/internal'
  /pcm/hierarchies/{hierarchyID}:
    get:
      parameters:
      - $ref: '#/components/parameters/hierarchy_id'
      summary: Get a hierarchy
      description: Retrieves the specified hierarchy.
      operationId: getHierarchyChild
      tags:
      - Hierarchies
      responses:
        '200':
          description: Returns a hierarchy with the following attributes.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/single_hierarchy'
              examples:
                get-hierarchy:
                  $ref: '#/components/examples/hierarchy_created'
        '400':
          $ref: '#/components/responses/bad_request'
        '404':
          $ref: '#/components/responses/not_found'
        '500':
          $ref: '#/components/responses/internal'
    put:
      operationId: updateHierarchy
      parameters:
      - $ref: '#/components/parameters/hierarchy_id'
      summary: Update a hierarchy
      description: '```mdx-code-block

        import CASummary from ''/docs/partials/pxm/custom-attributes/custom-attribute-spec-summary.mdx'';


        Updates a hierarchy. You can do a partial update, where you specify only the field value to change.


        <CASummary />

        ```

        '
      tags:
      - Hierarchies
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/update_hierarchy'
            examples:
              update-hierarchy:
                $ref: '#/components/examples/update_hierarchy'
        required: true
      responses:
        '200':
          description: Successfully returns the updated hierarchy
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/single_hierarchy'
              examples:
                updated-hierarchy:
                  $ref: '#/components/examples/hierarchy_updated'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/not_found'
        '422':
          $ref: '#/components/responses/unprocessable_entity'
        '500':
          $ref: '#/components/responses/internal'
    delete:
      operationId: deleteHierarchy
      parameters:
      - $ref: '#/components/parameters/hierarchy_id'
      summary: Delete a hierarchy
      description: Deletes the specified hierarchy and all its children.
      tags:
      - Hierarchies
      responses:
        '204':
          description: No Content
        '403':
          $ref: '#/components/responses/forbidden'
        '500':
          $ref: '#/components/responses/internal'
  /pcm/hierarchies/{hierarchyID}/nodes:
    post:
      parameters:
      - $ref: '#/components/parameters/hierarchy_id'
      summary: Create a node
      description: "```mdx-code-block\nimport CASummary from '/docs/partials/pxm/custom-attributes/custom-attribute-spec-summary.mdx';\n\nCreates a node in the specified hierarchy.\n\n<CASummary />         \n```\n\n ### Sorting Nodes in a Hierarchy\n  \n You can sort the order of your nodes, regardless of where the nodes are in the hierarchy.\n\n You can do this by adding a `meta` object to the body of your request and specifying a `sort_order` value.\n  \n The node with the highest value of `sort_order` is displayed first. For example, a node with a `sort_order` value of `3` appears before a node with a `sort_order` value of `2`.\n\n - If you don’t provide `sort_order` when creating nodes, all child nodes in the response for Get a Node’s Children request are ordered by the `updated_at` time in descending order, with the most recently updated child node first.\n - If you set `sort_order` for only a few child nodes, the child nodes with a `sort_order` value appear first and then other child nodes appear in the order of `updated_at` time.\n\n You can also specify a `sort_order` when creating a node relationship.\n\n - If you create a node (**Node A**) with a `sort_order` and then you create a relationship for **Node A** with another node (**Node B**), the `sort_order` you specified when creating **Node A** is overwritten.\n - If you create **Node A** and then you create a relationship with **Node B** but do not configure a `sort_order`, the `sort_order` you specified when you created **Node A** is not overwritten.\n  \n ### Curating Products in a Node\n  \n  You can curate the products in a node. Product curation allows you to promote specific products within each node of your hierarchies, enabling you to create unique product collections in your storefront. For example, you may find you have an abundance of cotton T-Shirts and you want to promote these products to the top of the product list. When a shopper navigates to T-shirts, the cotton T-Shirts are displayed first.\n  \n  You can do this by adding a `curated_products` attribute to the body of your request and adding an array of product IDs to the attribute. You should add the products IDs in the order you want them to be displayed in your node. The first product ID is displayed first in the product list.\n  \n  You can only curate 20 products or less. You cannot have more than 20 curated products.\n  \n  - The product IDs you provide must exist in the specified node.\n  - If a curated product is removed from a node, the product is also removed from the curated_products list.\n  - Once you have curated the products in a node, you can use the get node products endpoint to retrieve a list of curated products.\n  \n  You can then display your curated products in your catalogs using the following catalog endpoints.\n  \n  - Get a node in your latest catalog release.\n  - Get a node in a catalog.\n  - Get all nodes in your latest catalog release.\n  - Get all nodes in a catalog.\n  - Get node children in your latest catalog release.\n  - Get node children in a catalog.\n"
      operationId: createNode
      tags:
      - Hierarchies
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/create_node'
            examples:
              create-node:
                $ref: '#/components/examples/create_node'
      responses:
        '201':
          description: Successfully returns the created node
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/single_node'
              examples:
                created-node:
                  $ref: '#/components/examples/node_created'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/not_found'
        '422':
          $ref: '#/components/responses/unprocessable_entity'
        '500':
          $ref: '#/components/responses/internal'
    get:
      parameters:
      - $ref: '#/components/parameters/hierarchy_id'
      - $ref: '#/components/parameters/filter_nodes'
      - $ref: '#/components/parameters/page_offset'
      - $ref: '#/components/parameters/page_limit'
      summary: Get all nodes in a hierarchy
      description: 'A fully paginated view of all nodes in a hierarchy regardless of depth.


        #### Filtering


        Many Commerce API endpoints support filtering. The general syntax is described in [**Filtering**](/guides/Getting-Started/filtering).


        The following attributes and operators are supported.


        | Operator        | Attribute                                                                                 | Description                                                                                      | Example                                  |

        |----------------|------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------|------------------------------------------|

        | `eq`           | `id`, `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].name` | Equals. 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)` |

        | `in`           | `id`, `hierarchy_id`,  `parent_id`, `breadcrumbs.id`                                              | Checks if the value of the attribute is included in the specified list.                        | `filter=in(id,1,2,3,4)`                 |

        | `lt`, `le`, `gt`, `ge` | `id`, `hierarchy_id`,  `parent_id`, `created_at`, `updated_at`         | Comparison 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)` |

        | `like`         | `name`, `slug`, `description`, `locales.[locale].name`, `locales.[locale].description`, `breadcrumbs.name`, `breadcrumbs.slug`, `breadcrumbs.locales.[locale].name` | Like. Checks if the attribute contains the specified string (wildcards supported).            | `filter=like(name,*some-name*)`, `filter=like(locales.es-ES.description,*descripción*)` |

        | `ilike`        | `name`, `slug`, `description`, `locales.[locale].name`, `locales.[locale].description`, `breadcrumbs.name`, `breadcrumbs.slug`, `breadcrumbs.locales.[locale].name` | Case-insensitive like. Same as `like` but ignores case when matching. | `filter=ilike(name,*some-name*)` |

        '
      operationId: getAllNodesInHierarchy
      tags:
      - Hierarchies
      responses:
        '200':
          description: Successfully returns the node's children
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/multi_nodes'
              examples:
                get-all-nodes:
                  $ref: '#/components/examples/resp_multi_nodes'
        '400':
          $ref: '#/components/responses/bad_request'
        '404':
          $ref: '#/components/responses/not_found'
        '500':
          $ref: '#/components/responses/internal'
  /pcm/hierarchies/{hierarchyID}/nodes/{nodeID}:
    get:
      parameters:
      - $ref: '#/components/parameters/hierarchy_id'
      - $ref: '#/components/parameters/node_id'
      summary: Get a node
      description: Retrieves a node from a hierarchy.
      operationId: getHierarchyNode
      tags:
      - Hierarchies
      responses:
        '200':
          description: Returns a node with the following attributes.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/single_node'
              examples:
                get-node:
                  $ref: '#/components/examples/node_created'
        '400':
          $ref: '#/components/responses/bad_request'
        '404':
          $ref: '#/components/responses/not_found'
        '500':
          $ref: '#/components/responses/internal'
    put:
      parameters:
      - $ref: '#/components/parameters/hierarchy_id'
      - $ref: '#/components/parameters/node_id'
      summary: Update a node
      description: "```mdx-code-block\nimport CASummary from '/docs/partials/pxm/custom-attributes/custom-attribute-spec-summary.mdx';\n\nUpdates the specified node in a hierarchy. You can do a partial update, where you specify only the field value to change.\n\n<CASummary />  \n```\n\n### Sorting Nodes in a Hierarchy\n\nYou can sort the order of your nodes, regardless of where the nodes are in the hierarchy.\n  \n The node with the highest value of sort_order is displayed first. For example, a node with a `sort_order` value of `3` appears before a node with a `sort_order` value of `2`.\n  \n - If you don’t provide `sort_order` when creating nodes, all child nodes in the response for Get a Node’s Children request are ordered by the `updated_at` time in descending order, with the most recently updated child node first.\n - If you set `sort_order` for only a few child nodes or not all, the child nodes with a `sort_order` value appear first and then other child nodes appear in the order of `updated_at` time.\n  \n You can also specify a sort_order when creating a node relationship.\n\n - If you update a node (**Node A**) with a `sort_order` and then you create a relationship for **Node A** with another node (**Node B**), the `sort_order` you specified when updating **Node A** is overwritten.\n - If you have updated **Node A** and then you create a relationship with **Node B** but do not configure a `sort_order`, the `sort_order` you specified when you updated **Node A** is not overwritten.\n  \n ### Curating Products in a Node\n\n You can curate the products in a node. Product curation allows you to promote specific products within each node of your hierarchies, enabling you to create unique product collections in your storefront. For example, you may find you have an abundance of cotton T-Shirts and you want to promote these products to the top of the product list. When a shopper navigates to T-shirts, the cotton T-Shirts are displayed first.\n\n You can do this by adding a `curated_products` attribute to the body of your request and adding an array of product IDs to the attribute. You should add the products IDs in the order you want them to be displayed in your node. The first product ID is displayed first in the product list.\n\n You can only curate 20 products or less. You cannot have more than 20 curated products.\n  \n - The product IDs you provide must exist in the specified node.\n - If a curated product is removed from a node, the product is also removed from the curated_products list.\n - Once you have curated the products in a node, you can use the get node products endpoint to retrieve a list of curated products.\n  \n You can then display your curated products in your catalogs using the following catalog endpoints.\n  \n - [Get a node in your latest catalog release](/docs/api/pxm/catalog/get-node)\n - [Get a node in a catalog](/docs/api/pxm/catalog/get-by-context-node)\n - [Get all nodes in your latest catalog release](/docs/api/pxm/catalog/get-all-nodes)\n - [Get all nodes in a catalog](/docs/api/pxm/catalog/get-by-context-all-nodes)\n - [Get node children in your latest catalog release](/docs/api/pxm/catalog/get-child-nodes)\n - [Get node children in a catalog](/docs/api/pxm/catalog/get-by-context-child-nodes)\n"
      operationId: updateNode
      tags:
      - Hierarchies
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/update_node'
            examples:
              update-node:
                $ref: '#/components/examples/update_node'
      responses:
        '200':
          description: Successfully returns the updated node
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/single_node'
              examples:
                updated-node:
                  $ref: '#/components/examples/node_updated'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/not_found'
        '422':
          $ref: '#/components/responses/unprocessable_entity'
        '500':
          $ref: '#/components/responses/internal'
    delete:
      parameters:
      - $ref: '#/components/parameters/hierarchy_id'
      - $ref: '#/components/parameters/node_id'
      summary: Deletes a node
      description: Deletes a node by the node ID
      operationId: deleteNode
      tags:
      - Hierarchies
      responses:
        '204':
          description: No Content
        '403':
          $ref: '#/components/responses/forbidden'
        '422':
          $ref: '#/components/responses/unprocessable_entity'
        '500':
          $ref: '#/components/responses/internal'
  /pcm/hierarchies/{hierarchyID}/children:
    get:
      parameters:
      - $ref: '#/components/parameters/hierarchy_id'
      - $ref: '#/components/parameters/filter_nodes'
      - $ref: '#/components/parameters/page_offset'
      - $ref: '#/components/parameters/page_limit'
      summary: Get a hierarchy's children
      description: 'Get a hierarchy''s children


        #### Filtering


        Many Commerce API endpoints support filtering. The general syntax is described in [**Filtering**](/guides/Getting-Started/filtering).


        The following attributes and operators are supported.


        | Operator        | Attribute                                                                                 | Description                                                                                      | Example                                  |

        |----------------|------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------|------------------------------------------|

        | `eq`           | `id`, `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].name` | Equals. 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)` |

        | `in`           | `id`, `hierarchy_id`,  `parent_id`, `breadcrumbs.id`                                              | Checks if the value of the attribute is included in the specified list.                        | `filter=in(id,1,2,3,4)`                 |

        | `lt`, `le`, `gt`, `ge` | `id`, `hierarchy_id`,  `parent_id`, `created_at`, `updated_at`         | Comparison 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)` |

        | `like`         | `name`, `slug`, `description`, `locales.[locale].name`, `locales.[locale].description`, `breadcrumbs.name`, `breadcrumbs.slug`, `breadcrumbs.locales.[locale].name` | Like. Checks if the attribute contains the specified string (wildcards supported).            | `filter=like(name,*some-name*)`, `filter=like(locales.es-ES.description,*descripción*)` |

        | `ilike`        | `name`, `slug`, `description`, `locales.[locale].name`, `locales.[locale].description`, `breadcrumbs.name`, `breadcrumbs.slug`, `breadcrumbs.locales.[locale].name` | Case-insensitive like. Same as `like` but ignores case when matching. | `filter=ilike(name,*some-name*)` |

        '
      operationId: getAllChildren
      tags:
      - Hierarchies
      responses:
        '200':
          description: Returns the hierarchy's children.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/multi_nodes'
              examples:
                get-hierarchy-children:
                  $ref: '#/components/examples/resp_multi_nodes'
        '400':
          $ref: '#/components/responses/bad_request'
        '404':
          $ref: '#/components/responses/not_found'
        '500':
          $ref: '#/components/responses/internal'
  /pcm/hierarchies/{hierarchyID}/relationships/children:
    post:
      parameters:
      - $ref: '#/components/parameters/hierarchy_id'
      summary: Create relationships between a hierarchy and child nodes
      description: 'Use this endpoint to create relationships between a hierarchy and one or more child nodes. You can create a relationship only if:


        - All child nodes already exist.

        - Every child node in the request body must belong 

# --- truncated at 32 KB (129 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/elastic-path/refs/heads/main/openapi/elastic-path-hierarchies-api-openapi.yml