Skip to main content

Create a hierarchy

POST 

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

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

Custom Attributes

Custom attributes allow you to extend the data model with your own key-value data.

You can define up to 100 custom attributes in each group (shopper_attributes and admin_attributes). Both keys and values must be strings.

  • shopper_attributes are visible in shopper-facing catalogs and accessible to both shoppers and administrators. Ideal for customer-facing data, such as promotional labels or product tags.
  • admin_attributes are private and not visible in catalogs. Best suited for internal operational data, such as cost tracking or workflow metadata.

See Custom Attributes.

Request

Responses

Returns a created hierarchy with the following attributes.

Authorization: http

name: bearerAuthtype: httpscheme: bearer

Request Collapse all
Base URL
https://euwest.api.elasticpath.com
Auth
Body required
{
  "data": {
    "type": "hierarchy",
    "attributes": {
      "name": "string",
      "description": "string",
      "slug": "string",
      "admin_attributes": {
        "cost_of_goods": "42.0",
        "charge_type": "credit card"
      },
      "shopper_attributes": {
        "cost_of_goods": "42.0",
        "charge_type": "credit card"
      },
      "locales": {}
    }
  }
}
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.